'it block' start running before beforeEach complete #27851
Unanswered
TahirMehmood8082
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
look
cypress start beforeEach
then start it block, where obvious breaks
then complete beforeEach
and end
it-runs-before-beforeEach-completes.mp4
=====================================================================
const { loginTest } = require("../../1-Login/login.cy");
import CourseProgress from "../../../PageObjects/2-Dashboard/1-CourseProgress/CourseProgress";
describe("Course Progress", () => {
beforeEach(() => {
cy.log("I am beforeEach");
loginTest();
cy.log("End beforeEach");
});
it("should load viewCurrentDay model", () => {
cy.log("I am it block");
const cp = new CourseProgress();
cp.validateCourseProgressBannerExistOnDashboard();
cp.validateCourseProgressBannerHeading();
// .then(() => {
// cp.clickViewCurrentDayButton();
// })
// .then(() => {
// cp.verifyViewCurrentDayModelVisible();
// })
// .then(() => {
// cp.verifyModelTitleHeading();
// })
// .then(() => {
// cp.clickMarkAsReadHeaderBtn();
// })
// .then(() => {
// cp.verifyMarkAsCompleteHeaderBtnPopUp();
// })
// .then(() => {
// cp.clickMarkAsCompletePopUpConfirmedButton();
// })
// // .then(() => {
// // cp.verifyVideoExist();
// // })
// .then(() => {
// cp.clickMarkAsReadFooterBtn();
// })
// .then(() => {
// cp.verifyMarkAsCompleteBtnFooterPopUp();
// });
// Continue with the rest of your test
cy.log("End it");
});
});
Beta Was this translation helpful? Give feedback.
All reactions