tests: create org via OrgSwitcher combobox selector
This commit is contained in:
@@ -16,14 +16,13 @@ describe("Organizations (PR #61)", () => {
|
|||||||
cy.visit("/boards");
|
cy.visit("/boards");
|
||||||
|
|
||||||
// Create a new org via OrgSwitcher.
|
// Create a new org via OrgSwitcher.
|
||||||
cy.contains(/org switcher/i, { timeout: 30_000 }).should("be.visible");
|
// The switcher is a Shadcn Select trigger (`role=combobox`).
|
||||||
|
cy.get('button[role="combobox"]', { timeout: 30_000 })
|
||||||
// Open select and click "Create new org".
|
.first()
|
||||||
cy.contains("button", /select organization/i)
|
|
||||||
.should("be.visible")
|
.should("be.visible")
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
cy.contains(/create new org/i).should("be.visible").click();
|
cy.contains(/create new org/i, { timeout: 30_000 }).should("be.visible").click();
|
||||||
|
|
||||||
const orgName = `Cypress Org ${Date.now()}`;
|
const orgName = `Cypress Org ${Date.now()}`;
|
||||||
cy.get("#org-name").should("be.visible").clear().type(orgName);
|
cy.get("#org-name").should("be.visible").clear().type(orgName);
|
||||||
|
|||||||
Reference in New Issue
Block a user