April 2017
Beginner to intermediate
378 pages
7h 57m
English
Now that we have the required setup, we will start writing the tests. Create a new file named test.e2e-spec.ts inside the todoapp_v2/e2efolder.
As mentioned earlier, we are going to perform a simple test -- login to the app, validating login, logging out of the app, and validating logout. The required tests should look like this:
import { browser, element, by, ElementFinder } from 'protractor'; // https://www.joshmorony.com/e2e-end-to-end-testing-in-ionic-2-an-introduction/ describe('Check Navigation : ', () => { beforeEach(() => { browser.get(''); }); it('should have `Todo App (v2)` as the title text on the Login Page', () => { expect(element(by.css('.toolbar-title')) .getAttribute('innerText')) .toContain('Todo ...Read now
Unlock full access