mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Fixed e2e search page test
This commit is contained in:
@@ -39,8 +39,8 @@ export class ProtractorPage {
|
|||||||
getRandomScopeOption(): promise.Promise<string> {
|
getRandomScopeOption(): promise.Promise<string> {
|
||||||
const options = element(by.css('select[name="scope"]')).all(by.tagName('option'));
|
const options = element(by.css('select[name="scope"]')).all(by.tagName('option'));
|
||||||
return options.count().then((c: number) => {
|
return options.count().then((c: number) => {
|
||||||
const index: number = Math.floor(Math.random() * c);
|
const index: number = Math.floor(Math.random() * (c - 1));
|
||||||
return options.get(index).getAttribute('value');
|
return options.get(index + 1).getAttribute('value');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user