Skip to content

Commit

Permalink
test: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
icfor committed Nov 14, 2023
1 parent 28facd0 commit 2683314
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions e2e/main.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ test.describe.parallel("Main Pages", () => {
test("Main components", async ({ page }) => {
await page.goto("/");

await page.waitForTimeout(200);

await expect(page.locator('[data-test="footer"]')).toBeVisible();
await expect(page.locator('[data-test="nav"]')).toBeVisible();
});
Expand All @@ -25,6 +27,8 @@ test.describe.parallel("Main Pages", () => {
test("Main components", async ({ page }) => {
await page.goto("/contact");

await page.waitForTimeout(200);

await expect(page.locator('[data-test="contact-submit"]')).toBeVisible();
});
});
Expand All @@ -33,6 +37,8 @@ test.describe.parallel("Main Pages", () => {
test("Main components", async ({ page }) => {
await page.goto("/developer-tools");

await page.waitForTimeout(200);

await expect(page.locator('[data-test="devtools-cta"]')).toBeVisible();
});
});
Expand All @@ -42,6 +48,8 @@ test.describe.parallel("Blog", () => {
test("Main components", async ({ page }) => {
await page.goto("/blog");

await page.waitForTimeout(200);

expect(
await page.locator('[data-test="post-summary-item"]').count(),
).toBeGreaterThan(1);
Expand All @@ -52,9 +60,23 @@ test.describe.parallel("Staking", () => {
test("Main components", async ({ page }) => {
await page.goto("/staking");

await page.waitForTimeout(200);

expect(
await page.locator('[data-test="network-item"]').count(),
).toBeGreaterThan(1);
expect(await page.locator('[data-test="stats-cards"]').count()).toEqual(1);
});
});

test.describe.parallel("Staking Details", () => {
test("Main components", async ({ page }) => {
await page.goto("/staking/how-to-stake-bld-on-agoric");

await page.waitForTimeout(200);

await expect(
page.locator('[data-test="staking-guide-info"]'),
).toBeVisible();
});
});
1 change: 1 addition & 0 deletions src/screens/network_guides/components/guide/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const Guide = ({ post }: any) => {
return (
<Box
alignItems="center"
data-test="staking-guide-info"
display="flex"
flexDirection="column"
justifyContent="center"
Expand Down

0 comments on commit 2683314

Please sign in to comment.