gns3-web-ui/e2e/helpers/common.po.ts

22 lines
397 B
TypeScript
Raw Permalink Normal View History

2021-04-12 11:46:28 +00:00
import { browser } from 'protractor';
2020-02-07 15:52:12 +00:00
export class TestHelper {
2021-04-12 11:15:45 +00:00
sleep(value: number) {
browser.sleep(value);
}
2020-02-26 12:43:30 +00:00
2021-04-12 11:15:45 +00:00
waitForLoading() {
browser.waitForAngular();
}
2020-02-26 12:43:30 +00:00
2021-04-12 11:15:45 +00:00
async asyncForEach(array, callback) {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array);
2020-02-26 12:43:30 +00:00
}
2021-04-12 11:15:45 +00:00
}
2020-02-26 12:43:30 +00:00
2021-04-12 11:15:45 +00:00
getCurrentUrl() {
return browser.getCurrentUrl();
}
2020-02-07 15:52:12 +00:00
}