diff --git a/test/helpers/selenium-helper.js b/test/helpers/selenium-helper.js index 7063fc555b2053f607af4fca3f1967363bb0c9bd..f10f0800a557413590e4b181bc862faf8b57d5ce 100644 --- a/test/helpers/selenium-helper.js +++ b/test/helpers/selenium-helper.js @@ -26,8 +26,7 @@ class SeleniumHelper { 'getSauceDriver', 'getLogs', 'loadUri', - 'rightClickText', - 'waitUntilGone' + 'rightClickText' ]); } @@ -129,10 +128,6 @@ class SeleniumHelper { return this.clickXpath(`//button//*[contains(text(), '${text}')]`); } - waitUntilGone (element, timeoutMessage = 'waitUntilGone timed out') { - return this.driver.wait(until.stalenessOf(element), DEFAULT_TIMEOUT_MILLISECONDS, timeoutMessage); - } - getLogs (whitelist) { if (!whitelist) { // Default whitelist diff --git a/test/integration/examples.test.js b/test/integration/examples.test.js index aa867b0414503bbb5ab1460c24cfb6c8633aea75..c7b9836a24d11991eb0283285c59baca5f825723 100644 --- a/test/integration/examples.test.js +++ b/test/integration/examples.test.js @@ -11,8 +11,7 @@ const { findByXpath, getDriver, getLogs, - loadUri, - waitUntilGone + loadUri } = new SeleniumHelper(); let driver; @@ -31,7 +30,6 @@ describe('player example', () => { test('Load a project by ID', async () => { const projectId = '96708228'; await loadUri(`${uri}#${projectId}`); - await waitUntilGone(findByText('Loading')); await clickXpath('//img[@title="Go"]'); await new Promise(resolve => setTimeout(resolve, 2000)); await clickXpath('//img[@title="Stop"]'); diff --git a/test/integration/menu-bar.test.js b/test/integration/menu-bar.test.js index 7c653a9079d9f6f4df40c8d511de8df8ebaa3962..3f6457e5208ae171685e62f70327a3f3463a5f4c 100644 --- a/test/integration/menu-bar.test.js +++ b/test/integration/menu-bar.test.js @@ -9,8 +9,7 @@ const { getDriver, loadUri, rightClickText, - scope, - waitUntilGone + scope } = new SeleniumHelper(); const uri = path.resolve(__dirname, '../../build/index.html'); @@ -78,7 +77,6 @@ describe('Menu bar settings', () => { await clickText('File'); const input = await findByXpath('//input[@accept=".sb,.sb2,.sb3"]'); await input.sendKeys(path.resolve(__dirname, '../fixtures/project1.sb3')); - await waitUntilGone(findByText('Loading')); // No replace alert since no changes were made await findByText('project1-sprite'); }); @@ -95,7 +93,6 @@ describe('Menu bar settings', () => { await input.sendKeys(path.resolve(__dirname, '../fixtures/project1.sb3')); await driver.switchTo().alert() .accept(); - await waitUntilGone(findByText('Loading')); await findByText('project1-sprite'); }); }); diff --git a/test/integration/project-loading.test.js b/test/integration/project-loading.test.js index e0c5e5d1f9dc27392780ae5a345fd6b157a9fb14..00a0b0ee86b71637d6f18e1e9c3907fdffd241e4 100644 --- a/test/integration/project-loading.test.js +++ b/test/integration/project-loading.test.js @@ -9,8 +9,7 @@ const { getDriver, getLogs, loadUri, - scope, - waitUntilGone + scope } = new SeleniumHelper(); const uri = path.resolve(__dirname, '../../build/index.html'); @@ -39,7 +38,6 @@ describe('Loading scratch gui', () => { const projectId = '96708228'; await loadUri(`${uri}#${projectId}`); - await waitUntilGone(findByText('Loading')); await clickXpath('//img[@title="Go"]'); await new Promise(resolve => setTimeout(resolve, 2000)); await clickXpath('//img[@title="Stop"]'); @@ -60,7 +58,6 @@ describe('Loading scratch gui', () => { .setSize(1920, 1080); const projectId = '96708228'; await loadUri(`${uri}#${projectId}`); - await waitUntilGone(findByText('Loading')); await clickXpath('//img[@title="Full Screen Control"]'); await new Promise(resolve => setTimeout(resolve, 500)); await clickXpath('//img[@title="Go"]');