Skip to content

chore: use user admin and template admin for even more e2e tests #16974

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

Merged
merged 8 commits into from
Mar 18, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
:)
  • Loading branch information
aslilac committed Mar 17, 2025
commit 81535bc4ae17e150c6254f7b4b40cc32e0443206
11 changes: 7 additions & 4 deletions site/e2e/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,8 @@ export const createTemplate = async (
);
}

// picker is disabled if only one org is available
// The organization picker will be disabled if there is only one option.
const pickerIsDisabled = await orgPicker.isDisabled();

if (!pickerIsDisabled) {
await orgPicker.click();
await page.getByText(orgName, { exact: true }).click();
Expand Down Expand Up @@ -1094,8 +1093,12 @@ export async function createUser(
const orgPicker = page.getByLabel("Organization *");
const organizationsEnabled = await orgPicker.isVisible();
if (organizationsEnabled) {
await orgPicker.click();
await page.getByText(orgName, { exact: true }).click();
// The organization picker will be disabled if there is only one option.
const pickerIsDisabled = await orgPicker.isDisabled();
if (!pickerIsDisabled) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: don't use no double negatives

await orgPicker.click();
await page.getByText(orgName, { exact: true }).click();
}
}

await page.getByLabel("Login Type").click();
Expand Down
Loading