From 490af05215a43d82541441b580c7ef99a234acba Mon Sep 17 00:00:00 2001 From: VsevolodX <79542055+VsevolodX@users.noreply.github.com> Date: Fri, 12 Apr 2024 16:25:29 -0700 Subject: [PATCH] update: use this browser --- tests/cypress/support/widgets/JupyterLiteSession.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/cypress/support/widgets/JupyterLiteSession.ts b/tests/cypress/support/widgets/JupyterLiteSession.ts index 05de9346..c1dcc3da 100644 --- a/tests/cypress/support/widgets/JupyterLiteSession.ts +++ b/tests/cypress/support/widgets/JupyterLiteSession.ts @@ -19,18 +19,13 @@ export default class JupyterLiteSession extends Widget { } waitForVisible() { - return cy - .getIframeBody(selectors.wrapper) - .find(selectors.main, { timeout: 10000 }) - .should("exist", { timeout: 10000 }); + return this.browser.iframe(selectors.wrapper, "md").waitForVisible(selectors.main, "md"); } checkFileOpened(fileName: string) { - return cy - .getIframeBody(selectors.wrapper) - .find(selectors.main) - .find(`li[title*='${fileName}']`) - .should("exist"); + return this.browser + .iframe(selectors.wrapper, "md") + .waitForVisible(`li[title*='${fileName}']`); } clickOnLink(link: string) {