Skip to content

Commit

Permalink
Allow local da-collab and da-admin for PW tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bosschaert committed May 28, 2024
1 parent a44c354 commit e292e45
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/e2e/utils/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,20 @@
*/
import ENV from './env.js';

function getQuery() {
const { GITHUB_HEAD_REF: branch } = process.env;
if (branch === 'local') {
return '?da-admin=local&da-collab=local';
}
return '';
}

const QUERY = getQuery();

function getTestURL(type, testIdentifier, workerInfo) {
const dateStamp = Date.now().toString(36);
const pageName = `pw-${testIdentifier}-${dateStamp}-${workerInfo.project.name}`;
return `${ENV}/${type}#/da-sites/da-status/tests/${pageName}`;
return `${ENV}/${type}${QUERY}#/da-sites/da-status/tests/${pageName}`;
}

/**
Expand Down

0 comments on commit e292e45

Please sign in to comment.