♻️ (langflowShortcuts.spec.ts): move user agent detection logic to after modal handling to improve test flow
This commit is contained in:
parent
04277fae7e
commit
f66eb32e68
1 changed files with 9 additions and 10 deletions
|
|
@ -3,16 +3,6 @@ import uaParser from "ua-parser-js";
|
|||
test("LangflowShortcuts", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
|
||||
const getUA = await page.evaluate(() => navigator.userAgent);
|
||||
const userAgentInfo = uaParser(getUA);
|
||||
let control = "Control";
|
||||
|
||||
if (userAgentInfo.os.name.includes("Mac")) {
|
||||
control = "Meta";
|
||||
}
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
let modalCount = 0;
|
||||
try {
|
||||
const modalTitleElement = await page?.getByTestId("modal-title");
|
||||
|
|
@ -28,6 +18,15 @@ test("LangflowShortcuts", async ({ page }) => {
|
|||
await page.waitForTimeout(5000);
|
||||
modalCount = await page.getByTestId("modal-title")?.count();
|
||||
}
|
||||
|
||||
const getUA = await page.evaluate(() => navigator.userAgent);
|
||||
const userAgentInfo = uaParser(getUA);
|
||||
let control = "Control";
|
||||
|
||||
if (userAgentInfo.os.name.includes("Mac")) {
|
||||
control = "Meta";
|
||||
}
|
||||
|
||||
await page.waitForSelector('[data-testid="blank-flow"]', {
|
||||
timeout: 30000,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue