|
|
|
@ -9,11 +9,11 @@ export class BasePage {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async toastWait({message}: {message: string}) { |
|
|
|
|
const toast = await this.page.locator('.ant-message .ant-message-notice-content', {hasText: message}).last(); |
|
|
|
|
await toast.waitFor({state: 'visible'}); |
|
|
|
|
// const toast = await this.page.locator('.ant-message .ant-message-notice-content', {hasText: message}).last();
|
|
|
|
|
// await toast.waitFor({state: 'visible'});
|
|
|
|
|
|
|
|
|
|
// todo: text of toastr shows old one in the test assertion
|
|
|
|
|
await toast.last().textContent() |
|
|
|
|
await this.page.locator('.ant-message .ant-message-notice-content', {hasText: message}).last().textContent() |
|
|
|
|
.then((text) => expect(text).toContain(message)); |
|
|
|
|
} |
|
|
|
|
} |