From 326e4ec32281e64280b5639fa212d31de0db2c11 Mon Sep 17 00:00:00 2001 From: Finn Date: Wed, 8 Jan 2020 18:27:54 +0000 Subject: [PATCH] testing stuff --- e2e/login.e2e-spec.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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'); });