Skip to content
Snippets Groups Projects
Commit 35413c63 authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Include the `waitUntilGone` helper in the other project load tests

parent 8daed6d1
No related branches found
No related tags found
No related merge requests found
......@@ -4,13 +4,15 @@ import path from 'path';
import SeleniumHelper from '../helpers/selenium-helper';
const {
findByText,
clickButton,
clickText,
clickXpath,
findByXpath,
getDriver,
getLogs,
loadUri
loadUri,
waitUntilGone
} = new SeleniumHelper();
let driver;
......@@ -29,7 +31,7 @@ describe('player example', () => {
test('Load a project by ID', async () => {
const projectId = '96708228';
await loadUri(`${uri}#${projectId}`);
await new Promise(resolve => setTimeout(resolve, 2000));
await waitUntilGone(findByText('Loading'));
await clickXpath('//img[@title="Go"]');
await new Promise(resolve => setTimeout(resolve, 2000));
await clickXpath('//img[@title="Stop"]');
......@@ -60,7 +62,7 @@ describe('blocks example', () => {
test('Load a project by ID', async () => {
const projectId = '96708228';
await loadUri(`${uri}#${projectId}`);
await new Promise(resolve => setTimeout(resolve, 2000));
await waitUntilGone(findByText('Loading'));
await clickXpath('//img[@title="Go"]');
await new Promise(resolve => setTimeout(resolve, 2000));
await clickXpath('//img[@title="Stop"]');
......
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