mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-08-25 06:01:11 +00:00
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot Autofix powered by AI
parent
07b0d04b16
commit
66a8dfa988
@@ -231,20 +231,20 @@ test("amm liquidity: remove from the A/B pool", async (app) => {
|
||||
|
||||
// The dropdown entry's synthetic click may not take; fall back to the page's
|
||||
// openRemoveDialog(), the exact handler the entry's onActivated invokes.
|
||||
const dialogId = await idByObjectName(app, "removeLiquidityDialog");
|
||||
try {
|
||||
await app.waitFor(
|
||||
async () => { if (!(await maybeIdByObjectName(app, "removeLiquidityDialog"))) throw new Error("no dialog"); },
|
||||
{ timeout: 4000, interval: 300, description: "remove dialog present" },
|
||||
async () => { if ((await prop(app, dialogId, "visible")) !== true) throw new Error("dialog not visible"); },
|
||||
{ timeout: 4000, interval: 300, description: "remove dialog open" },
|
||||
);
|
||||
} catch {
|
||||
console.log(" remove-entry click didn't take — opening the dialog via evaluate");
|
||||
await ignore(() => evaluate(app, detailId, "openRemoveDialog()"));
|
||||
await app.waitFor(
|
||||
async () => { if ((await prop(app, dialogId, "visible")) !== true) throw new Error("dialog not visible"); },
|
||||
{ timeout: 8000, interval: 300, description: "remove dialog open (after evaluate)" },
|
||||
);
|
||||
}
|
||||
const dialogId = await idByObjectName(app, "removeLiquidityDialog");
|
||||
await app.waitFor(
|
||||
async () => { if ((await prop(app, dialogId, "visible")) !== true) throw new Error("dialog not visible"); },
|
||||
{ timeout: 8000, interval: 300, description: "remove dialog open" },
|
||||
);
|
||||
|
||||
// 5. The dialog opens at 50% by default. Click the 50% preset to make the choice
|
||||
// explicit (a no-op on the default) and confirm it registers. Then wait for the
|
||||
|
||||
Reference in New Issue
Block a user