Skip to content

Commit

Permalink
chore(#8244): Fix upgrade e2e test when pushing a beta (#8250)
Browse files Browse the repository at this point in the history
Cherry-picked from 536e72f
  • Loading branch information
latin-panda authored May 17, 2023
1 parent 5aa9464 commit 618f0e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/page-objects/upgrade/upgrade.wdio.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ const deploymentInProgress = () => $('legend*=Deployment in progress');
const deploymentComplete = () => $('div*=Deployment complete');

const getInstallButton = async (branch, tag) => {
const element = tag ? await $(`span=${tag}`) : await $(`span*=${branch} (`);
let selector = `span*=${branch} (`;
if (tag) {
selector = tag.includes('beta') ? `span*=${tag}` : `span=${tag}`;
}
const element = await $(selector);
const parent = await (await element.parentElement()).parentElement();
return await parent.$('.btn-primary');
};
Expand Down

0 comments on commit 618f0e1

Please sign in to comment.