Skip to content
Snippets Groups Projects
Commit 5c77aee1 authored by Lotte Hofstede's avatar Lotte Hofstede
Browse files

Fixed e2e search page test

parent 39488a56
No related branches found
No related tags found
No related merge requests found
......@@ -39,8 +39,8 @@ export class ProtractorPage {
getRandomScopeOption(): promise.Promise<string> {
const options = element(by.css('select[name="scope"]')).all(by.tagName('option'));
return options.count().then((c: number) => {
const index: number = Math.floor(Math.random() * c);
return options.get(index).getAttribute('value');
const index: number = Math.floor(Math.random() * (c - 1));
return options.get(index + 1).getAttribute('value');
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment