Skip to content

Commit

Permalink
update: use new functions for step def
Browse files Browse the repository at this point in the history
  • Loading branch information
VsevolodX committed Apr 10, 2024
1 parent b8123ce commit 63b9d71
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions tests/cypress/support/step_definitions/I see file opened.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@ import { When } from "@badeball/cypress-cucumber-preprocessor";
import MaterialDesignerPage from "../widgets/MaterialDesignerPage";

When("I see file {string} opened", (filename: string) => {
cy.get("#jupyter-lite-iframe", { log: true, timeout: 20000 })
.should(($iframe) => {
expect($iframe.contents()).to.exist;
})
.then(($iframe) => {
const body = $iframe.contents().find("body");
return cy.wrap(body, { log: true });
});
// new MaterialDesignerPage().designerWidget.jupyterLiteSession.waitForVisible();
const { jupyterLiteSession } = new MaterialDesignerPage().designerWidget;
jupyterLiteSession.waitForVisible("md");
jupyterLiteSession.checkFileOpened(filename);
});

0 comments on commit 63b9d71

Please sign in to comment.