Skip to content

Commit 9517b52

Browse files
fix: apply proper TypeScript formatting
Apply Biome formatter to fix indentation and formatting issues. Co-authored-by: jaaydenh <1858163+jaaydenh@users.noreply.github.com>
1 parent 55ef5e2 commit 9517b52

File tree

1 file changed

+45
-40
lines changed

1 file changed

+45
-40
lines changed

site/e2e/helpers.ts

Lines changed: 45 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,44 +1216,49 @@ export async function addUserToOrganization(
12161216
* dynamic parameters by unchecking the "Enable dynamic parameters" checkbox.
12171217
*/
12181218
export const disableDynamicParameters = async (
1219-
page: Page,
1220-
templateName: string,
1221-
orgName = defaultOrganizationName,
1219+
page: Page,
1220+
templateName: string,
1221+
orgName = defaultOrganizationName,
12221222
) => {
1223-
await page.goto(`/templates/${orgName}/${templateName}/settings`, {
1224-
waitUntil: "networkidle",
1225-
});
1226-
1227-
// Wait for the page to be fully loaded and the form to be visible
1228-
await page.waitForSelector("form", { state: "visible" });
1229-
1230-
// Find the "Enable dynamic parameters" checkbox and wait for it to be visible
1231-
const dynamicParamsCheckbox = page.getByRole("checkbox", {
1232-
name: /Enable dynamic parameters for workspace creation/,
1233-
});
1234-
1235-
// Wait for the checkbox to be visible and stable
1236-
await dynamicParamsCheckbox.waitFor({ state: "visible" });
1237-
1238-
// If the checkbox is checked, uncheck it
1239-
if (await dynamicParamsCheckbox.isChecked()) {
1240-
await dynamicParamsCheckbox.click();
1241-
1242-
// Wait a bit for the UI to update after the click
1243-
await page.waitForTimeout(100);
1244-
}
1245-
1246-
// Find and click the save button
1247-
const saveButton = page.getByRole("button", { name: /save/i });
1248-
await saveButton.waitFor({ state: "visible" });
1249-
await saveButton.click();
1250-
1251-
// Wait for the success message with a more robust selector
1252-
await page.locator("[role='alert']:has-text('Template updated successfully'), .MuiAlert-root:has-text('Template updated successfully')").first().waitFor({
1253-
state: "visible",
1254-
timeout: 15000,
1255-
});
1256-
1257-
// Additional wait to ensure the changes are persisted
1258-
await page.waitForTimeout(500);
1259-
};
1223+
await page.goto(`/templates/${orgName}/${templateName}/settings`, {
1224+
waitUntil: "networkidle",
1225+
});
1226+
1227+
// Wait for the page to be fully loaded and the form to be visible
1228+
await page.waitForSelector("form", { state: "visible" });
1229+
1230+
// Find the "Enable dynamic parameters" checkbox and wait for it to be visible
1231+
const dynamicParamsCheckbox = page.getByRole("checkbox", {
1232+
name: /Enable dynamic parameters for workspace creation/,
1233+
});
1234+
1235+
// Wait for the checkbox to be visible and stable
1236+
await dynamicParamsCheckbox.waitFor({ state: "visible" });
1237+
1238+
// If the checkbox is checked, uncheck it
1239+
if (await dynamicParamsCheckbox.isChecked()) {
1240+
await dynamicParamsCheckbox.click();
1241+
1242+
// Wait a bit for the UI to update after the click
1243+
await page.waitForTimeout(100);
1244+
}
1245+
1246+
// Find and click the save button
1247+
const saveButton = page.getByRole("button", { name: /save/i });
1248+
await saveButton.waitFor({ state: "visible" });
1249+
await saveButton.click();
1250+
1251+
// Wait for the success message with a more robust selector
1252+
await page
1253+
.locator(
1254+
"[role='alert']:has-text('Template updated successfully'), .MuiAlert-root:has-text('Template updated successfully')",
1255+
)
1256+
.first()
1257+
.waitFor({
1258+
state: "visible",
1259+
timeout: 15000,
1260+
});
1261+
1262+
// Additional wait to ensure the changes are persisted
1263+
await page.waitForTimeout(500);
1264+
};

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy