Skip to content

Commit

Permalink
chore(#8244): Fix upgrade e2e test when pushing a beta (#8245)
Browse files Browse the repository at this point in the history
Loosens selector to find beta upgrade button.

#8244
  • Loading branch information
dianabarsan authored and latin-panda committed May 17, 2023
1 parent 5aa9464 commit 0341ac9
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 0341ac9

Please sign in to comment.