diff --git a/e2e/app.e2e-spec.ts b/e2e/app.e2e-spec.ts index f5ac9094d0..6856a6f01b 100644 --- a/e2e/app.e2e-spec.ts +++ b/e2e/app.e2e-spec.ts @@ -12,8 +12,8 @@ describe('protractor App', () => { expect(page.getPageTitleText()).toEqual('DSpace Angular :: Home'); }); - it('should display header "Welcome to DSpace"', () => { + it('should contain a news section', () => { page.navigateTo(); - expect(page.getFirstHeaderText()).toEqual('Welcome to DSpace'); + expect(page.getHomePageNewsText()).toBeDefined(); }); }); diff --git a/e2e/app.po.ts b/e2e/app.po.ts index d8d2acf120..54b5b55af3 100644 --- a/e2e/app.po.ts +++ b/e2e/app.po.ts @@ -9,11 +9,7 @@ export class ProtractorPage { return browser.getTitle(); } - getFirstPText() { - return element(by.xpath('//p[1]')).getText(); - } - - getFirstHeaderText() { - return element(by.xpath('//h1[1]')).getText(); + getHomePageNewsText() { + return element(by.xpath('//ds-home-news')).getText(); } }