Show correct cancelled page after cancellation (#5664)
* fix cancelled page and cross out dates * delete old cancel success page * fix e2e tests Co-authored-by: CarinaWolli <[email protected]>
This commit is contained in:
1 parent
2de3e7fc59
commit
733a06a672
5 files changed
+23
-103
No files matched your search
@@ -112,11 +112,16 @@ test.describe("pro user", () => {
|
||||
});
|
||||
// --- fill form
|
||||
await page.locator('[data-testid="cancel"]').click();
|
||||
|
||||
await page.waitForNavigation({
|
||||
url(url) {
|
||||
return url.pathname === "/cancel/success";
|
||||
url: (url) => {
|
||||
return url.pathname.startsWith("/success");
|
||||
},
|
||||
});
|
||||
const successHeadling = await page.locator('[data-testid="success-headline"]').innerText();
|
||||
|
||||
await expect(successHeadling).toBe("This event is cancelled");
|
||||
|
||||
await page.goto(`/${pro.username}`);
|
||||
await bookFirstEvent(page);
|
||||
});
|
||||
|
||||
@@ -53,11 +53,15 @@ test("dynamic booking", async ({ page, users }) => {
|
||||
});
|
||||
// --- fill form
|
||||
await page.locator('[data-testid="cancel"]').click();
|
||||
|
||||
await page.waitForNavigation({
|
||||
url(url) {
|
||||
return url.pathname === "/cancel/success";
|
||||
url: (url) => {
|
||||
return url.pathname.startsWith("/success");
|
||||
},
|
||||
});
|
||||
const successHeadling = await page.locator('[data-testid="success-headline"]').innerText();
|
||||
|
||||
await expect(successHeadling).toBe("This event is cancelled");
|
||||
});
|
||||
|
||||
await users.deleteAll();
|
||||
|
||||
Reference in new issue
Block a user