-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
651589b
commit da9ead0
Showing
4 changed files
with
101 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
import { expect, test } from "@playwright/test"; | ||
|
||
test.beforeEach(async ({ page }) => { | ||
await page.goto("/"); | ||
}); | ||
|
||
test("should display latest inputs section", async ({ page }) => { | ||
// Find latest inputs section | ||
const latestInputsSection = page.getByTestId("latest-inputs"); | ||
|
||
// Wait for the section to be visible | ||
await expect(latestInputsSection).toBeVisible(); | ||
|
||
// Verify section title | ||
await expect(latestInputsSection.getByText("Latest inputs")).toBeVisible(); | ||
|
||
// Verify that table with correct columns is visible | ||
await expect( | ||
latestInputsSection.getByRole("row", { name: "Address Age" }).first(), | ||
).toBeVisible(); | ||
|
||
// Find "View all inputs" link | ||
const viewAllLink = latestInputsSection.getByText("View all inputs"); | ||
await expect(viewAllLink).toBeVisible(); | ||
|
||
// Click the link | ||
await viewAllLink.click(); | ||
|
||
// Verify navigation to inputs page | ||
await page.waitForURL("/inputs"); | ||
}); | ||
|
||
test("should display latest applications section", async ({ page }) => { | ||
// Find latest applications section | ||
const latestApplicationsSection = page.getByTestId("latest-applications"); | ||
|
||
// Wait for the section to be visible | ||
await expect(latestApplicationsSection).toBeVisible(); | ||
|
||
// Verify section title | ||
await expect( | ||
latestApplicationsSection.getByText("Latest applications"), | ||
).toBeVisible(); | ||
|
||
// Verify that table with correct columns is visible | ||
await expect( | ||
latestApplicationsSection | ||
.getByRole("row", { name: "Address Age" }) | ||
.first(), | ||
).toBeVisible(); | ||
|
||
// Find "View all applications" link | ||
const viewAllLink = latestApplicationsSection.getByText( | ||
"View all applications", | ||
); | ||
await expect(viewAllLink).toBeVisible(); | ||
|
||
// Click the link | ||
await viewAllLink.click(); | ||
|
||
// Verify navigation to applications page | ||
await page.waitForURL("/applications"); | ||
}); | ||
|
||
test("should display inputs summary", async ({ page }) => { | ||
// Find entries summary section | ||
const entriesSummarySection = page.getByTestId("entries-summary"); | ||
|
||
// Wait for the section to be visible | ||
await expect(entriesSummarySection).toBeVisible(); | ||
|
||
// Verify section title | ||
await expect(entriesSummarySection.getByText("Inputs")).toBeVisible(); | ||
}); | ||
|
||
test("should display applications summary", async ({ page }) => { | ||
// Find entries summary section | ||
const entriesSummarySection = page.getByTestId("entries-summary"); | ||
|
||
// Wait for the section to be visible | ||
await expect(entriesSummarySection).toBeVisible(); | ||
|
||
// Verify section title | ||
await expect(entriesSummarySection.getByText("Applications")).toBeVisible(); | ||
}); |
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
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
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