generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into platform/thetaurean/mass-dependabots
- Loading branch information
Showing
3 changed files
with
95 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
...ct/e2e/spec/chromium-only/authenticated/organization-settings-edit-page-user-flow.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import { expect } from "@playwright/test"; | ||
import { OrganizationEditPage } from "../../../pages/authenticated/admin/organization-edit"; | ||
import { test as baseTest } from "../../../test"; | ||
|
||
export interface OrganizationEditPageFixtures { | ||
organizationEditPage: OrganizationEditPage; | ||
} | ||
|
||
const test = baseTest.extend<OrganizationEditPageFixtures>({ | ||
organizationEditPage: async ( | ||
{ | ||
page: _page, | ||
isMockDisabled, | ||
adminLogin, | ||
senderLogin, | ||
receiverLogin, | ||
storageState, | ||
frontendWarningsLogPath, | ||
isFrontendWarningsLog, | ||
}, | ||
use, | ||
) => { | ||
const page = new OrganizationEditPage({ | ||
page: _page, | ||
isMockDisabled, | ||
adminLogin, | ||
senderLogin, | ||
receiverLogin, | ||
storageState, | ||
frontendWarningsLogPath, | ||
isFrontendWarningsLog, | ||
}); | ||
await page.goto(); | ||
await use(page); | ||
}, | ||
}); | ||
|
||
test.describe("Organization Edit Page", { | ||
tag: "@smoke", | ||
}, () => { | ||
test.describe("admin user", () => { | ||
test.use({storageState: "e2e/.auth/admin.json"}); | ||
|
||
test("has correct title", async ({organizationEditPage}) => { | ||
await organizationEditPage.testHeader(false); | ||
await expect(organizationEditPage.page.getByText(/Org name: ignore/)).toBeVisible(); | ||
}); | ||
|
||
test.describe("edit section", () => { | ||
test("has expected 'Meta'", async ({organizationEditPage}) => { | ||
const meta = organizationEditPage.page.getByTestId("gridContainer").getByTestId("grid").nth(2); | ||
await expect(meta).not.toBeEmpty(); | ||
}); | ||
|
||
test("has expected 'Description'", async ({organizationEditPage}) => { | ||
await expect(organizationEditPage.page.getByTestId("description")).not.toBeEmpty(); | ||
}); | ||
|
||
test("has expected 'Jurisdiction'", async ({organizationEditPage}) => { | ||
await expect(organizationEditPage.page.getByTestId("jurisdiction")).not.toBeEmpty(); | ||
}); | ||
}); | ||
|
||
test.describe("'Organization Sender Settings' section", () => { | ||
test.beforeEach(async ({ organizationEditPage }) => { | ||
await organizationEditPage.page.locator("#orgsendersettings .usa-table tbody").waitFor({ state: "visible" }); | ||
}); | ||
|
||
test("has at least one sender listed in the table", async ({organizationEditPage}) => { | ||
const rowCount = await organizationEditPage.page.locator("#orgsendersettings .usa-table tbody tr").count(); | ||
expect(rowCount).toBeGreaterThanOrEqual(1); | ||
}); | ||
}); | ||
|
||
test.describe("'Organization Receiver Settings' section", () => { | ||
test.beforeEach(async ({ organizationEditPage }) => { | ||
await organizationEditPage.page.locator("#orgreceiversettings .usa-table tbody").waitFor({ state: "visible" }); | ||
}); | ||
|
||
test("has at least one sender listed in the table", async ({organizationEditPage}) => { | ||
const rowCount = await organizationEditPage.page.locator("#orgreceiversettings .usa-table tbody tr").count(); | ||
expect(rowCount).toBeGreaterThanOrEqual(1); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters