Fixed some tests
This commit is contained in:
committed by
Erik Tiekstra
parent
d36e00c5a7
commit
dd743fd638
@@ -1,12 +1,14 @@
|
|||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
|
import { NavigationModule } from './components/navigation/navigation.module';
|
||||||
|
import { SkipToContentModule } from './components/skip-to-content/skip-to-content.module';
|
||||||
|
|
||||||
describe('AppComponent', () => {
|
describe('AppComponent', () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [AppComponent],
|
declarations: [AppComponent],
|
||||||
imports: [RouterTestingModule],
|
imports: [RouterTestingModule, SkipToContentModule, NavigationModule],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
<div class="navigation">
|
<div class="navigation">
|
||||||
<div class="navigation__logo-wrapper">
|
<div class="navigation__logo-wrapper">
|
||||||
<a id="logo-heading" [routerLink]="['/']">
|
<a [routerLink]="['/']" aria-label="Till startsidan för FA Mina sidor">
|
||||||
<img src="assets/logo/fa-mina-sidor-dark.svg" class="navigation__logo" alt="" />
|
<img src="assets/logo/fa-mina-sidor-dark.svg" class="navigation__logo" alt="" />
|
||||||
<span class="af__a11y-sr-only">Till startsidan för FA Mina sidor</span>
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<ul class="navigation__list dafa__hide-on-print">
|
<ul class="navigation__list dafa__hide-on-print">
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
|
import { IconModule } from '@dafa-shared/components/icon/icon.module';
|
||||||
import { NavigationComponent } from './navigation.component';
|
import { NavigationComponent } from './navigation.component';
|
||||||
|
|
||||||
describe('NavigationComponent', () => {
|
describe('NavigationComponent', () => {
|
||||||
@@ -9,6 +11,7 @@ describe('NavigationComponent', () => {
|
|||||||
waitForAsync(() => {
|
waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [NavigationComponent],
|
declarations: [NavigationComponent],
|
||||||
|
imports: [RouterTestingModule, IconModule],
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,17 +1,22 @@
|
|||||||
|
import { DigiNgIconArrowLeftModule } from '@af/digi-ng/_icon/icon-arrow-left';
|
||||||
|
import { DigiNgTypographyBaseModule } from '@af/digi-ng/_typography/typography-base';
|
||||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
|
import { HorizontalCenterModule } from '@dafa-shared/components/horizontal-center/horizontal-center.module';
|
||||||
import { PageNotFoundComponent } from './page-not-found.component';
|
import { PageNotFoundComponent } from './page-not-found.component';
|
||||||
|
|
||||||
|
|
||||||
describe('PageNotFoundComponent', () => {
|
describe('PageNotFoundComponent', () => {
|
||||||
let component: PageNotFoundComponent;
|
let component: PageNotFoundComponent;
|
||||||
let fixture: ComponentFixture<PageNotFoundComponent>;
|
let fixture: ComponentFixture<PageNotFoundComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(
|
||||||
TestBed.configureTestingModule({
|
waitForAsync(() => {
|
||||||
declarations: [ PageNotFoundComponent ]
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [PageNotFoundComponent],
|
||||||
|
imports: [RouterTestingModule, DigiNgTypographyBaseModule, DigiNgIconArrowLeftModule, HorizontalCenterModule],
|
||||||
|
}).compileComponents();
|
||||||
})
|
})
|
||||||
.compileComponents();
|
);
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(PageNotFoundComponent);
|
fixture = TestBed.createComponent(PageNotFoundComponent);
|
||||||
|
|||||||
@@ -1,15 +1,21 @@
|
|||||||
|
import { DigiNgTypographyBaseModule } from '@af/digi-ng/_typography/typography-base';
|
||||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
|
import { HorizontalCenterModule } from '@dafa-shared/components/horizontal-center/horizontal-center.module';
|
||||||
import { StartComponent } from './start.component';
|
import { StartComponent } from './start.component';
|
||||||
|
|
||||||
describe('StartComponent', () => {
|
describe('StartComponent', () => {
|
||||||
let component: StartComponent;
|
let component: StartComponent;
|
||||||
let fixture: ComponentFixture<StartComponent>;
|
let fixture: ComponentFixture<StartComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(
|
||||||
TestBed.configureTestingModule({
|
waitForAsync(() => {
|
||||||
declarations: [StartComponent],
|
TestBed.configureTestingModule({
|
||||||
}).compileComponents();
|
declarations: [StartComponent],
|
||||||
}));
|
imports: [RouterTestingModule, DigiNgTypographyBaseModule, HorizontalCenterModule],
|
||||||
|
}).compileComponents();
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(StartComponent);
|
fixture = TestBed.createComponent(StartComponent);
|
||||||
|
|||||||
Reference in New Issue
Block a user