Skip to content

Commit 2d98f7e

Browse files
committed
fix: update test
1 parent 1f1086d commit 2d98f7e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

site/e2e/tests/deployment/idpOrgSync.spec.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,20 @@ test.describe("IdpOrgSyncPage", () => {
150150
waitUntil: "domcontentloaded",
151151
});
152152

153+
const syncField = page.getByRole("textbox", {
154+
name: "Organization sync field",
155+
});
156+
await syncField.fill("");
157+
153158
const idpOrgInput = page.getByLabel("IdP organization name");
154159
const addButton = page.getByRole("button", {
155160
name: /Add IdP organization/i,
156161
});
157162

158163
await expect(addButton).toBeDisabled();
159164

160-
await idpOrgInput.fill("new-idp-org");
165+
const idpOrgName = randomName();
166+
await idpOrgInput.fill(idpOrgName);
161167

162168
// Select Coder organization from combobox
163169
const orgSelector = page.getByPlaceholder("Select organization");
@@ -177,10 +183,10 @@ test.describe("IdpOrgSyncPage", () => {
177183
await addButton.click();
178184

179185
// Verify new mapping appears in table
180-
const newRow = page.getByTestId("idp-org-new-idp-org");
186+
const newRow = page.getByTestId(`idp-org-${idpOrgName}`);
181187
await expect(newRow).toBeVisible();
182188
await expect(
183-
newRow.getByRole("cell", { name: "new-idp-org" }),
189+
newRow.getByRole("cell", { name: idpOrgName }),
184190
).toBeVisible();
185191
await expect(newRow.getByRole("cell", { name: orgName })).toBeVisible();
186192

0 commit comments

Comments
 (0)