mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
79327: Follow up fixes to test
This commit is contained in:
@@ -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;
|
||||
@@ -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', () => {
|
||||
@@ -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());
|
||||
});
|
||||
});
|
||||
|
@@ -15,9 +15,4 @@ export class ProtractorPage {
|
||||
elementTagExists(tag: string) {
|
||||
return element(by.tagName(tag)).isPresent();
|
||||
}
|
||||
|
||||
verifyCurrentUrl(url) {
|
||||
browser.getCurrentUrl().then((currentUrl) => currentUrl === url );
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user