fix: Toast Onclose is removing specific toast (#9960)
* toast behaviour fixed * Update showToast.tsx * Adjust E2E test for toast --------- Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
1 parent
06dcaaef3b
commit
50d2dad62c
4 files changed
+28
-27
No files matched your search
@@ -23,7 +23,7 @@ test.describe("Change Password Test", () => {
|
||||
|
||||
await page.locator("text=Update").click();
|
||||
|
||||
const toast = await page.waitForSelector("div[class*='data-testid-toast-success']");
|
||||
const toast = await page.waitForSelector('[data-testid="toast-success"]');
|
||||
|
||||
expect(toast).toBeTruthy();
|
||||
});
|
||||
|
||||
@@ -15,7 +15,7 @@ test.describe("Change Theme Test", () => {
|
||||
//Click the update button
|
||||
await page.click('[data-testid="update-theme-btn"]');
|
||||
//Wait for the toast to appear
|
||||
const toast = await page.waitForSelector("div[class*='data-testid-toast-success']");
|
||||
const toast = await page.waitForSelector('[data-testid="toast-success"]');
|
||||
expect(toast).toBeTruthy();
|
||||
//Go to the profile page and check if the theme is dark
|
||||
await page.goto(`/${pro.username}`);
|
||||
@@ -35,7 +35,7 @@ test.describe("Change Theme Test", () => {
|
||||
//Click the update theme button
|
||||
await page.click('[data-testid="update-theme-btn"]');
|
||||
//Wait for the toast to appear
|
||||
const toast = await page.waitForSelector("div[class*='data-testid-toast-success']");
|
||||
const toast = await page.waitForSelector('[data-testid="toast-success"]');
|
||||
expect(toast).toBeTruthy();
|
||||
//Go to the profile page and check if the theme is light
|
||||
await page.goto(`/${pro.username}`);
|
||||
|
||||
@@ -97,7 +97,7 @@ test.describe("Event Types tests", () => {
|
||||
return !!url.pathname.match(/\/event-types\/.+/);
|
||||
});
|
||||
await page.locator("[data-testid=update-eventtype]").click();
|
||||
const toast = await page.waitForSelector("div[class*='data-testid-toast-success']");
|
||||
const toast = await page.waitForSelector('[data-testid="toast-success"]');
|
||||
expect(toast).toBeTruthy();
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user