mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-10 14:52:57 +00:00
[ci] stabilize flaky e2e assertions and non-secret deploy checks
This commit is contained in:
1 parent
3f4316f64e
commit
812bfb03d6
4 files changed
+23
-11
No files matched your search
@@ -195,9 +195,20 @@ test.describe("Login and authentication flows", () => {
|
||||
}) => {
|
||||
// Given: the login modal is open
|
||||
await gotoApp();
|
||||
await page.locator('[data-testid="login-button"]').click();
|
||||
const loginButton = page.locator('[data-testid="login-button"]');
|
||||
await loginButton.click();
|
||||
|
||||
const modal = page.locator('[data-testid="login-modal"]');
|
||||
await page.waitForFunction(
|
||||
() => {
|
||||
const loginModal = document.querySelector('[data-testid="login-modal"]');
|
||||
if (!(loginModal instanceof HTMLElement)) {
|
||||
return false;
|
||||
}
|
||||
return loginModal.getAttribute("data-open") === "true";
|
||||
},
|
||||
{ timeout: 15000 },
|
||||
);
|
||||
await expect(modal).toBeVisible({ timeout: 15000 });
|
||||
|
||||
// Then: at least one provider button is visible
|
||||
|
||||
@@ -309,14 +309,14 @@ test.describe("Profile management and moderation", () => {
|
||||
const diag = await startDiagnostics(page);
|
||||
|
||||
// When: a page error occurs
|
||||
await page.evaluate(() => {
|
||||
setTimeout(() => {
|
||||
throw new Error("intentional-test-error");
|
||||
}, 0);
|
||||
});
|
||||
|
||||
// Allow the async error to be caught
|
||||
await page.waitForTimeout(200);
|
||||
await Promise.all([
|
||||
page.waitForEvent("pageerror", { timeout: 5000 }),
|
||||
page.evaluate(() => {
|
||||
setTimeout(() => {
|
||||
throw new Error("intentional-test-error");
|
||||
}, 0);
|
||||
}),
|
||||
]);
|
||||
|
||||
// Then: error is captured
|
||||
const results = await diag.stop();
|
||||
|
||||
Reference in new issue
Block a user