DEV: Fix smoke test when full_page_login is enabled (#31732)

Smoke test worked only when `full_page_login` site setting was disabled
as it expected specific elements from the login modal to exist. This
commit replaces those selectors with more specific ones (prefer IDs over
classes), but which are present in both the modal or the full page.
This commit is contained in:
Bianca Nenciu
2025-03-10 21:09:04 +02:00
committed by GitHub
parent 25048b5a8d
commit cf3dde8c62

View File

@ -98,12 +98,12 @@ import puppeteer from "puppeteer-core";
}
const login = async function () {
await exec("open login modal", () => {
await exec("open login modal or page", () => {
return page.click(".login-button");
});
await exec("login modal is open", () => {
return page.waitForSelector(".login-modal", { visible: true });
await exec("login form is visible", () => {
return page.waitForSelector("#login-form", { visible: true });
});
await exec("type in credentials & log in", () => {
@ -120,7 +120,7 @@ import puppeteer from "puppeteer-core";
});
promise = promise.then(() => {
return page.click(".login-modal .btn-primary");
return page.click("#login-button");
});
return promise;