mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-20 12:26:20 +02:00
✨ Update notification flow (#548)
This commit is contained in:
parent
cb1fb23b19
commit
39a07558ee
41 changed files with 930 additions and 520 deletions
|
@ -51,15 +51,24 @@ test.describe.serial(() => {
|
|||
|
||||
await expect(title).toHaveText("Monthly Meetup");
|
||||
|
||||
pollUrl = page.url();
|
||||
});
|
||||
|
||||
test("verify poll", async ({ page, baseURL }) => {
|
||||
const { email } = await mailServer.captureOne("john.doe@email.com", {
|
||||
wait: 5000,
|
||||
});
|
||||
|
||||
expect(email.headers.subject).toBe("Monthly Meetup has been created");
|
||||
expect(email.headers.subject).toBe("Let's find a date for Monthly Meetup");
|
||||
|
||||
pollUrl = page.url();
|
||||
});
|
||||
|
||||
test("enable notifications", async ({ page, baseURL }) => {
|
||||
await page.goto(pollUrl);
|
||||
await page.getByTestId("notifications-toggle").click();
|
||||
|
||||
const { email } = await mailServer.captureOne("john.doe@email.com", {
|
||||
wait: 5000,
|
||||
});
|
||||
|
||||
expect(email.headers.subject).toBe("Please verify your email address");
|
||||
|
||||
const $ = load(email.html);
|
||||
const verifyLink = $("#verifyEmailUrl").attr("href");
|
||||
|
@ -72,6 +81,12 @@ test.describe.serial(() => {
|
|||
|
||||
await page.goto(verifyLink);
|
||||
|
||||
await expect(
|
||||
page.getByText("Notifications have been enabled for Monthly Meetup"),
|
||||
).toBeVisible();
|
||||
|
||||
page.getByText("Click here").click();
|
||||
|
||||
await expect(page.getByTestId("poll-title")).toHaveText("Monthly Meetup");
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue