Skip to content

Commit

Permalink
79327: Follow up fixes to test
Browse files Browse the repository at this point in the history
  • Loading branch information
YanaDePauw committed May 20, 2021
1 parent 926dd46 commit 579f98d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
9 changes: 7 additions & 2 deletions e2e/src/item-statistics/item-statistics.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ProtractorPage } from './item-statistics.po';
import { browser } from 'protractor';
import { UIURLCombiner } from '../../../src/app/core/url-combiner/ui-url-combiner';

describe('protractor Item statics', () => {
let page: ProtractorPage;
Expand All @@ -16,7 +17,9 @@ describe('protractor Item statics', () => {

it('should redirect to the entity page when navigating to an item page', () => {
page.navigateToItemPage();
expect(browser.getCurrentUrl()).toEqual('http://localhost:4000' + page.ENTITYPAGE);
expect(browser.getCurrentUrl()).toEqual(new UIURLCombiner(page.ENTITYPAGE).toString());
expect(browser.getCurrentUrl()).not.toEqual(new UIURLCombiner(page.ITEMSTATISTICSPAGE).toString());
expect(browser.getCurrentUrl()).not.toEqual(new UIURLCombiner(page.ITEMPAGE).toString());
});

it('should contain element ds-item-statistics-page when navigating when navigating to an item statistics page', () => {
Expand All @@ -26,6 +29,8 @@ describe('protractor Item statics', () => {
});
it('should contain the item statistics page url when navigating to an item statistics page', () => {
page.navigateToItemStatisticsPage();
expect(browser.getCurrentUrl()).toEqual('http://localhost:4000' + page.ITEMSTATISTICSPAGE);
expect(browser.getCurrentUrl()).toEqual(new UIURLCombiner(page.ITEMSTATISTICSPAGE).toString());
expect(browser.getCurrentUrl()).not.toEqual(new UIURLCombiner(page.ENTITYPAGE).toString());
expect(browser.getCurrentUrl()).not.toEqual(new UIURLCombiner(page.ITEMPAGE).toString());
});
});
5 changes: 0 additions & 5 deletions e2e/src/item-statistics/item-statistics.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,4 @@ export class ProtractorPage {
elementTagExists(tag: string) {
return element(by.tagName(tag)).isPresent();
}

verifyCurrentUrl(url) {
browser.getCurrentUrl().then((currentUrl) => currentUrl === url );
}

}

0 comments on commit 579f98d

Please sign in to comment.