Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test_hook for GWAS UI test #1003

Merged
merged 7 commits into from
Oct 17, 2023
15 changes: 15 additions & 0 deletions hooks/test_conditions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading