mirror of
https://github.com/discourse/discourse.git
synced 2025-04-17 09:09:05 +08:00
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:
parent
25048b5a8d
commit
cf3dde8c62
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user