Skip to content

Commit

Permalink
chore: Add e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloster committed Sep 23, 2024
1 parent 05c130b commit 8032f93
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .infra/rdev/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ stack:
services:
explorer:
image:
tag: sha-7d92494d
tag: sha-4e15df6f
replicaCount: 1
env:
# env vars common to all deployment stages
Expand Down
24 changes: 24 additions & 0 deletions client/__tests__/e2e/e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,30 @@ for (const testDataset of testDatasets) {
testInfo
);
});

test("newsletter signup modal opens and closes", async ({ page }) => {
await goToPage(page, url);

await page.getByTestId("newsletter-modal-open-button").click();

await expect(
page.getByTestId("newsletter-modal-content")
).toBeVisible();

await page.getByTestId("newsletter-email-input").fill("test");

await page.getByTestId("newsletter-subscribe-button").click();

await expect(
page.getByText("Please provide a valid email address.")
).toBeVisible();

await page.getByTestId("newsletter-modal-close-button").click();

await expect(
page.getByTestId("newsletter-modal-content")
).not.toBeVisible();
});
});

test("resize graph", async ({ page }, testInfo) => {
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/BottomBanner/BottomBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
BOTTOM_BANNER_NEWSLETTER_TEXT,
FORM_CONTAINER_ID,
} from "./constants";
import { NewsletterSignup } from "./components/NewsletterSignup/NewsletterModal";
import { NewsletterSignup } from "./components/NewsletterSignup/NewsletterSignup";
import { useConnect } from "./connect";

export interface BottomBannerProps {
Expand Down

0 comments on commit 8032f93

Please sign in to comment.