From 9e7af7b9cef60c137749a3cbb8c07c05f6a258c2 Mon Sep 17 00:00:00 2001 From: Atharva Rane Date: Thu, 7 Sep 2023 15:38:39 -0400 Subject: [PATCH 1/3] increasing wait for the workspace element --- services/portal/exportToWorkspace/exportToWorkspaceTasks.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/portal/exportToWorkspace/exportToWorkspaceTasks.js b/services/portal/exportToWorkspace/exportToWorkspaceTasks.js index 29f01719e..b1867c942 100644 --- a/services/portal/exportToWorkspace/exportToWorkspaceTasks.js +++ b/services/portal/exportToWorkspace/exportToWorkspaceTasks.js @@ -10,7 +10,8 @@ const I = actor(); module.exports = { goToWorkspacePage() { I.amOnPage(exportToWorkspaceProps.workspacePath); - I.waitForVisible(exportToWorkspaceProps.workspaceDivClass, 10); + I.saveScreenshot('exportToWorkspace_workspacePage.png'); + I.waitForVisible(exportToWorkspaceProps.workspaceDivClass, 50); }, async goToExplorerPage() { From b7bef7c96e204fc09bb8f0557f16a53d2313b53f Mon Sep 17 00:00:00 2001 From: Atharva Rane Date: Thu, 7 Sep 2023 15:40:49 -0400 Subject: [PATCH 2/3] Revert "increasing wait for the workspace element" This reverts commit 9e7af7b9cef60c137749a3cbb8c07c05f6a258c2. --- services/portal/exportToWorkspace/exportToWorkspaceTasks.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/portal/exportToWorkspace/exportToWorkspaceTasks.js b/services/portal/exportToWorkspace/exportToWorkspaceTasks.js index b1867c942..29f01719e 100644 --- a/services/portal/exportToWorkspace/exportToWorkspaceTasks.js +++ b/services/portal/exportToWorkspace/exportToWorkspaceTasks.js @@ -10,8 +10,7 @@ const I = actor(); module.exports = { goToWorkspacePage() { I.amOnPage(exportToWorkspaceProps.workspacePath); - I.saveScreenshot('exportToWorkspace_workspacePage.png'); - I.waitForVisible(exportToWorkspaceProps.workspaceDivClass, 50); + I.waitForVisible(exportToWorkspaceProps.workspaceDivClass, 10); }, async goToExplorerPage() { From 9b5e0d8f02f8610b24ea96d62084870b9776431f Mon Sep 17 00:00:00 2001 From: Atharva Rane Date: Tue, 10 Oct 2023 15:28:36 -0400 Subject: [PATCH 3/3] Add test_hook for GWASUI test --- hooks/test_conditions.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hooks/test_conditions.js b/hooks/test_conditions.js index e829f0b5b..926e6583b 100644 --- a/hooks/test_conditions.js +++ b/hooks/test_conditions.js @@ -36,6 +36,21 @@ module.exports = async function () { } } + if (suite.title === 'GWAS App UI Test @requires-portal @requires-argo-wrapper @requires-cohort-middleware'){ + const analysisTools = bash.runCommand('gen3 secrets decode portal-config gitops.json | jq \'.analysisTools\'') + const analysisFlag = bash.runCommand('gen3 secrets decode portal-config gitops.json | jq \'.featureFlags.analysis\'') + if (!analysisTools || analysisFlag !== 'true') { + console.log('Skipping GWASUI tests as the GWAS app is not configured in the env') + console.dir(suite.tests); + suite.tests.forEach((test) => { + test.run = function skip() { // eslint-disable-line + console.log(`Ignoring test - ${test.title}`); + this.skip(); + }; + }); + } + } + if (suite.title === 'ExportToWorkspaceTest @requires-portal @requires-hatchery @requires-wts') { const workspaceButton = bash.runCommand('gen3 secrets decode portal-config gitops.json | jq -r \'.components.navigation.items[] | select(.link | contains ("/workspace"))\''); if (!workspaceButton) {