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

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:
Ho Ngoc Hai
2026-04-29 18:01:14 +07:00
parent 405f2a3623
commit 58209b2434
2 changed files with 4 additions and 28 deletions

View File

@@ -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>