frontend-toegevoegd
This commit is contained in:
19
agiledancers-fe/src/app/app.spec.ts
Normal file
19
agiledancers-fe/src/app/app.spec.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { provideRouter } from '@angular/router';
|
||||
import { App } from './app';
|
||||
|
||||
describe('Application shell', () => {
|
||||
it('provides navigation and a keyboard skip link', async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [App],
|
||||
providers: [provideRouter([])],
|
||||
}).compileComponents();
|
||||
const fixture = TestBed.createComponent(App);
|
||||
await fixture.whenStable();
|
||||
const page = fixture.nativeElement as HTMLElement;
|
||||
expect(page.querySelector('nav[aria-label="Hoofdnavigatie"] a')?.getAttribute('href')).toBe(
|
||||
'/schools',
|
||||
);
|
||||
expect(page.querySelector('.skip-link')?.getAttribute('href')).toBe('#main-content');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user