38248: updated pagenotfound tests

This commit is contained in:
Lotte Hofstede
2017-01-24 08:39:00 +01:00
parent 494e2c73af
commit 26c2eae142
2 changed files with 6 additions and 6 deletions

View File

@@ -8,12 +8,12 @@ describe('protractor PageNotFound', function() {
}); });
it('should contain element ds-pagenotfound when navigating to page that doesnt exist"', () => { it('should contain element ds-pagenotfound when navigating to page that doesnt exist"', () => {
page.navigateToRandomPage(); page.navigateToNonExistingPage();
expect(page.elementTagExists("ds-pagenotfound")).toEqual(true); expect(page.elementTagExists("ds-pagenotfound")).toEqual(true);
}); });
it('should contain element ds-home when navigating to /home"', () => { it('should not contain element ds-pagenotfound when navigating to existing page"', () => {
page.navigateToHomePage(); page.navigateToExistingPage();
expect(page.elementTagExists("ds-home")).toEqual(true); expect(page.elementTagExists("ds-pagenotfound")).toEqual(false);
}); });
}); });

View File

@@ -4,10 +4,10 @@ export class ProtractorPage {
HOMEPAGE : string = "/home"; HOMEPAGE : string = "/home";
NONEXISTINGPAGE : string = "/e9019a69-d4f1-4773-b6a3-bd362caa46f2"; NONEXISTINGPAGE : string = "/e9019a69-d4f1-4773-b6a3-bd362caa46f2";
navigateToRandomPage() { navigateToNonExistingPage() {
return browser.get(this.NONEXISTINGPAGE); return browser.get(this.NONEXISTINGPAGE);
} }
navigateToHomePage() { navigateToExistingPage() {
return browser.get(this.HOMEPAGE); return browser.get(this.HOMEPAGE);
} }