fix UI test

This commit is contained in:
2026-01-02 10:02:34 -07:00
parent b91d387815
commit 85e7682b90

View File

@@ -44,12 +44,12 @@ test('New offers for another user', async ({ page }) => {
// Wait for export data prompt alert to be ready before clicking
await page.waitForFunction(() => {
const buttons = document.querySelectorAll('div[role="alert"] button');
return Array.from(buttons).some(button => button.textContent?.includes('No, Not Now'));
return Array.from(buttons).some(button => button.textContent?.includes('No, Not Yet'));
}, { timeout: 5000 });
// Use a more robust approach to click the button
await page.waitForFunction(() => {
const buttons = document.querySelectorAll('div[role="alert"] button');
const noButton = Array.from(buttons).find(button => button.textContent?.includes('No, Not Now'));
const noButton = Array.from(buttons).find(button => button.textContent?.includes('No, Not Yet'));
if (noButton) {
(noButton as HTMLElement).click();
return true;