Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/root/root.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="inner-wrapper">
<ds-system-wide-alert-banner></ds-system-wide-alert-banner>
<ds-themed-header-navbar-wrapper></ds-themed-header-navbar-wrapper>
<main class="main-content">
<main class="main-content" id="main-content">
<ds-themed-breadcrumbs></ds-themed-breadcrumbs>

<div class="container d-flex justify-content-center align-items-center h-100" *ngIf="shouldShowRouteLoader">
Expand Down
9 changes: 9 additions & 0 deletions src/app/root/root.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,13 @@ describe('RootComponent', () => {
it('should create', () => {
expect(component).toBeTruthy();
});

// The SSR anti-flicker overlay (src/index.html) is removed event-driven only once
// AppComponent.dsAppHasRenderedContent() sees dsApp.querySelector('#main-content') (see
// src/app/app.component.ts). If the root template ever drops this id again (as it silently did
// on TUL, leaving the overlay to be removed only by the 10s settle cap on every hard reload -> a
// frozen, "unresponsive" page), this test fails instead of the regression reaching production.
it('renders the #main-content landmark required by the SSR overlay reveal', () => {
expect(fixture.nativeElement.querySelector('main#main-content')).not.toBeNull();
});
});
Loading