fix(web): remove hardcoded mock ticker from public layout
Some checks failed
CodeQL Analysis / CodeQL (javascript-typescript) (push) Failing after 37s
E2E Tests / Playwright E2E (push) Failing after 7s
CI / AI Services (Python) — Smoke (push) Failing after 5s
Deploy / Build API Image (push) Failing after 5s
Deploy / Build Web Image (push) Failing after 7s
Deploy / Build AI Services Image (push) Failing after 4s
Security Scanning / Dependency Audit (pnpm) (push) Failing after 5s
Security Scanning / Trivy Scan — API Image (push) Failing after 40s
Security Scanning / Trivy Scan — Web Image (push) Failing after 40s
Security Scanning / Trivy Scan — AI Services Image (push) Failing after 31s
Security Scanning / Trivy Filesystem Scan (push) Failing after 30s
Deploy / Deploy to Staging (push) Has been skipped
Deploy / Smoke Test Staging (push) Has been skipped
Deploy / Deploy to Production (push) Has been skipped
CI / Lint → Typecheck → Test → Build (22) (push) Failing after 5s
CI / E2E Tests (push) Has been skipped
Deploy / Smoke Test Production (push) Has been skipped
Security Scanning / Security Gate (push) Failing after 0s
Deploy / Rollback Staging (push) Has been skipped
Deploy / Rollback Production (push) Has been skipped
Some checks failed
CodeQL Analysis / CodeQL (javascript-typescript) (push) Failing after 37s
E2E Tests / Playwright E2E (push) Failing after 7s
CI / AI Services (Python) — Smoke (push) Failing after 5s
Deploy / Build API Image (push) Failing after 5s
Deploy / Build Web Image (push) Failing after 7s
Deploy / Build AI Services Image (push) Failing after 4s
Security Scanning / Dependency Audit (pnpm) (push) Failing after 5s
Security Scanning / Trivy Scan — API Image (push) Failing after 40s
Security Scanning / Trivy Scan — Web Image (push) Failing after 40s
Security Scanning / Trivy Scan — AI Services Image (push) Failing after 31s
Security Scanning / Trivy Filesystem Scan (push) Failing after 30s
Deploy / Deploy to Staging (push) Has been skipped
Deploy / Smoke Test Staging (push) Has been skipped
Deploy / Deploy to Production (push) Has been skipped
CI / Lint → Typecheck → Test → Build (22) (push) Failing after 5s
CI / E2E Tests (push) Has been skipped
Deploy / Smoke Test Production (push) Has been skipped
Security Scanning / Security Gate (push) Failing after 0s
Deploy / Rollback Staging (push) Has been skipped
Deploy / Rollback Production (push) Has been skipped
The public layout rendered its own TickerStrip with 8 hardcoded mock
values ('Quận 1 +2.40%', 'Thủ Đức -0.80%', …) above the navbar. The
homepage already has a live DashboardTicker driven by /price-movers,
so this static one was visual noise that disagreed with the real data
just below it. Drop the bar + its helper variables, and update the
layout test to assert the static ticker is gone.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -123,13 +123,15 @@ describe('PublicLayout', () => {
|
||||
expect(screen.getByTestId('navbar')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('renders the ticker strip', () => {
|
||||
it('does not render a static ticker strip in the layout', () => {
|
||||
// The layout-level mock ticker was removed in favour of the homepage's
|
||||
// live DashboardTicker driven by /price-movers.
|
||||
render(
|
||||
<PublicLayout>
|
||||
<div>Content</div>
|
||||
</PublicLayout>,
|
||||
);
|
||||
expect(screen.getByTestId('ticker-strip')).toBeInTheDocument();
|
||||
expect(screen.queryByTestId('ticker-strip')).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('renders the footer', () => {
|
||||
@@ -150,15 +152,6 @@ describe('PublicLayout', () => {
|
||||
expect(screen.getByTestId('compare-bar')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('ticker strip has 8 district items', () => {
|
||||
render(
|
||||
<PublicLayout>
|
||||
<div>Content</div>
|
||||
</PublicLayout>,
|
||||
);
|
||||
expect(screen.getByText('8 items')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('main content has id="main-content" for skip-nav', () => {
|
||||
const { container } = render(
|
||||
<PublicLayout>
|
||||
|
||||
@@ -5,7 +5,6 @@ import { useTranslations } from 'next-intl';
|
||||
import { CompareFloatingBar } from '@/components/comparison/compare-floating-bar';
|
||||
import { Footer } from '@/components/design-system/footer';
|
||||
import { Navbar } from '@/components/design-system/navbar';
|
||||
import { TickerStrip, type TickerItem } from '@/components/design-system/ticker-strip';
|
||||
import { NotificationBell } from '@/components/notifications/notification-bell';
|
||||
import { useTheme } from '@/components/providers/theme-provider';
|
||||
import { LanguageSwitcher } from '@/components/ui/language-switcher';
|
||||
@@ -78,17 +77,6 @@ export default function PublicLayout({ children }: { children: React.ReactNode }
|
||||
},
|
||||
];
|
||||
|
||||
const tickerItems: TickerItem[] = [
|
||||
{ id: 'q1', label: 'Quận 1', changePercent: 2.4, direction: 'up' },
|
||||
{ id: 'q2', label: 'Thành phố Thủ Đức', changePercent: -0.8, direction: 'down' },
|
||||
{ id: 'q3', label: 'Quận 3', changePercent: 1.1, direction: 'up' },
|
||||
{ id: 'q7', label: 'Quận 7', changePercent: 3.2, direction: 'up' },
|
||||
{ id: 'binhthanh', label: 'Bình Thạnh', changePercent: 0.0, direction: 'neutral' },
|
||||
{ id: 'thuduc', label: 'Thành phố Thủ Đức', changePercent: 1.7, direction: 'up' },
|
||||
{ id: 'tanbinhdistrict', label: 'Tân Bình', changePercent: -1.3, direction: 'down' },
|
||||
{ id: 'phuninh', label: 'Phú Nhuận', changePercent: 0.5, direction: 'up' },
|
||||
];
|
||||
|
||||
const footerLinkGroups = [
|
||||
{
|
||||
title: t('footer.propertyTypes'),
|
||||
@@ -120,11 +108,6 @@ export default function PublicLayout({ children }: { children: React.ReactNode }
|
||||
|
||||
return (
|
||||
<div className="min-h-screen w-full overflow-x-clip bg-background">
|
||||
{/* Ticker strip */}
|
||||
<div className="h-ticker-bar w-full min-w-0 overflow-hidden border-b border-border bg-background-elevated">
|
||||
<TickerStrip items={tickerItems} />
|
||||
</div>
|
||||
|
||||
<Navbar
|
||||
brand={t('common.goodgo')}
|
||||
links={navLinks}
|
||||
|
||||
Reference in New Issue
Block a user