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