diff --git a/e2e/login.e2e-spec.ts b/e2e/login.e2e-spec.ts index 2bb5bd5..b798ce3 100644 --- a/e2e/login.e2e-spec.ts +++ b/e2e/login.e2e-spec.ts @@ -1,13 +1,23 @@ +import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; +import { TestBed, ComponentFixture, async } from '@angular/core/testing'; +import { HttpClient, HttpErrorResponse } from '@angular/common/http'; import { LoginPageObject } from './login.po'; +import { ApiService } from '../src/app/providers/api-service'; describe('Login Page', () => { let page: LoginPageObject; + let api: ApiService; + let apiSpy: jasmine.SpyObj; beforeEach(() => { page = new LoginPageObject(); - page.navigateTo(); + const spy = jasmine.createSpyObj + TestBed.configureTestingModule({ providers: [ApiService] }); }); + api = TestBed.get(ApiService); + apiSpy = TestBed.get(ApiService); + it('should have a header saying login', () => { expect(page.getLoginHeaderText()).toEqual('Login'); });