From 331be3c384ae32b83eb37b4c6e66dd728d5f68bf Mon Sep 17 00:00:00 2001 From: Dmitry Lemeshko Date: Thu, 7 Nov 2019 09:57:53 -0500 Subject: [PATCH] [7.4] FTR: clear browser storage between test suites (#48683) (#49477) * FTR: clear browser storage between test suites (#48683) * clear browser storage on test suite completion * [logstash/pipeline_list] fix tests dependency * always load new index data * remove files --- test/functional/services/remote/remote.ts | 2 ++ .../functional/apps/logstash/pipeline_list.js | 16 ++++------------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/test/functional/services/remote/remote.ts b/test/functional/services/remote/remote.ts index 2db5056a73f5..6cb67851ba24 100644 --- a/test/functional/services/remote/remote.ts +++ b/test/functional/services/remote/remote.ts @@ -75,6 +75,8 @@ export async function RemoteProvider({ getService }: FtrProviderContext) { .manage() .window() .setRect({ width, height }); + await driver.executeScript('window.sessionStorage.clear();'); + await driver.executeScript('window.localStorage.clear();'); }); lifecycle.on('cleanup', async () => await driver.quit()); diff --git a/x-pack/test/functional/apps/logstash/pipeline_list.js b/x-pack/test/functional/apps/logstash/pipeline_list.js index d04f50690368..ce0c9d881f51 100644 --- a/x-pack/test/functional/apps/logstash/pipeline_list.js +++ b/x-pack/test/functional/apps/logstash/pipeline_list.js @@ -22,6 +22,9 @@ export default function ({ getService, getPageObjects }) { originalWindowSize = await browser.getWindowSize(); await browser.setWindowSize(1600, 1000); await esArchiver.load('logstash/example_pipelines'); + }); + + beforeEach(async () => { await PageObjects.logstash.gotoPipelineList(); }); @@ -86,10 +89,6 @@ export default function ({ getService, getPageObjects }) { await pipelineEditor.assertExists(); await pipelineEditor.assertDefaultInputs(); }); - - after(async () => { - await PageObjects.logstash.gotoPipelineList(); - }); }); describe('delete button', () => { @@ -122,15 +121,12 @@ export default function ({ getService, getPageObjects }) { describe('row links', () => { it('opens the selected row in the editor', async () => { + await PageObjects.logstash.gotoPipelineList(); await pipelineList.setFilter('tweets_and_beats'); await pipelineList.clickFirstRowId(); await pipelineEditor.assertExists(); await pipelineEditor.assertEditorId('tweets_and_beats'); }); - - after(async () => { - await PageObjects.logstash.gotoPipelineList(); - }); }); describe('next page button', () => { @@ -225,10 +221,6 @@ export default function ({ getService, getPageObjects }) { queueCheckpointWrites, }); }); - - after(async () => { - await PageObjects.logstash.gotoPipelineList(); - }); }); }); }