56434: e2e test fix

This commit is contained in:
Kristof De Langhe
2018-10-26 13:47:48 +02:00
committed by Bram Luyten
parent 47f6c24484
commit dc7e784b83
2 changed files with 4 additions and 8 deletions

View File

@@ -12,8 +12,8 @@ describe('protractor App', () => {
expect<any>(page.getPageTitleText()).toEqual('DSpace Angular :: Home'); expect<any>(page.getPageTitleText()).toEqual('DSpace Angular :: Home');
}); });
it('should display header "Welcome to DSpace"', () => { it('should contain a news section', () => {
page.navigateTo(); page.navigateTo();
expect<any>(page.getFirstHeaderText()).toEqual('Welcome to DSpace'); expect<any>(page.getHomePageNewsText()).toBeDefined();
}); });
}); });

View File

@@ -9,11 +9,7 @@ export class ProtractorPage {
return browser.getTitle(); return browser.getTitle();
} }
getFirstPText() { getHomePageNewsText() {
return element(by.xpath('//p[1]')).getText(); return element(by.xpath('//ds-home-news')).getText();
}
getFirstHeaderText() {
return element(by.xpath('//h1[1]')).getText();
} }
} }