mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
attempt to diagnose travis-only e2e issues
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { by, element } from 'protractor';
|
||||
import { ProtractorPage } from './app.po';
|
||||
|
||||
describe('protractor App', () => {
|
||||
@@ -13,7 +14,8 @@ describe('protractor App', () => {
|
||||
});
|
||||
|
||||
it('should contain a news section', () => {
|
||||
page.navigateTo();
|
||||
page.navigateTo()
|
||||
.then(() => element(by.css('.main-content')).getAttribute('innerHTML').then((v) => process.stdout.write(v)));
|
||||
expect<any>(page.getHomePageNewsText()).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
@@ -11,6 +11,6 @@ export class ProtractorPage {
|
||||
}
|
||||
|
||||
getHomePageNewsText() {
|
||||
return element(by.xpath('//ds-home-news')).getText();
|
||||
return element(by.css('ds-home-news')).getText();
|
||||
}
|
||||
}
|
||||
|
@@ -11,15 +11,17 @@ describe('protractor SearchPage', () => {
|
||||
|
||||
it('should contain query value when navigating to page with query parameter', () => {
|
||||
const queryString = 'Interesting query string';
|
||||
page.navigateToSearchWithQueryParameter(queryString);
|
||||
page.getCurrentQuery().then((query: string) => {
|
||||
page.navigateToSearchWithQueryParameter(queryString)
|
||||
.then(() => page.getCurrentQuery())
|
||||
.then((query: string) => {
|
||||
expect<string>(query).toEqual(queryString);
|
||||
});
|
||||
});
|
||||
|
||||
it('should have right scope selected when navigating to page with scope parameter', () => {
|
||||
const scope: promise.Promise<string> = page.getRandomScopeOption();
|
||||
scope.then((scopeString: string) => {
|
||||
page.navigateToSearch()
|
||||
.then(() => page.getRandomScopeOption())
|
||||
.then((scopeString: string) => {
|
||||
page.navigateToSearchWithScopeParameter(scopeString);
|
||||
page.getCurrentScope().then((s: string) => {
|
||||
expect<string>(s).toEqual(scopeString);
|
||||
@@ -28,8 +30,9 @@ describe('protractor SearchPage', () => {
|
||||
});
|
||||
|
||||
it('should redirect to the correct url when scope was set and submit button was triggered', () => {
|
||||
const scope: promise.Promise<string> = page.getRandomScopeOption();
|
||||
scope.then((scopeString: string) => {
|
||||
page.navigateToSearch()
|
||||
.then(() => page.getRandomScopeOption())
|
||||
.then((scopeString: string) => {
|
||||
page.setCurrentScope(scopeString);
|
||||
page.submitSearchForm();
|
||||
browser.wait(() => {
|
||||
|
Reference in New Issue
Block a user