best-flower-17510
01/09/2023, 3:08 PMbored-van-76450
01/09/2023, 8:30 PMpowerful-orange-86819
01/10/2023, 8:04 AMjs
Cypress.Commands.add("wrapWindowOpen", (target = undefined) => {
cy.window().then((win) => {
cy.stub(win, "open")
.callsFake((url, target) => {
if (target === undefined) {
expect(target).to.be.undefined;
} else {
expect(target).to.eq("_blank");
}
return win.open.wrappedMethod.call(win, url, "_self");
})
.as("open");
});
});
This is my custom command that I add in the beforeEach() and then just assert it with
cy.get("@open").should("have.been.calledOnce");
Or you can edit the html code not to open it in a new tabincalculable-rainbow-43330
01/10/2023, 1:39 PMgray-kilobyte-89541
01/10/2023, 3:12 PMlate-dinner-1440
01/10/2023, 4:41 PMgray-kilobyte-89541
01/10/2023, 5:28 PMlate-dinner-1440
01/10/2023, 5:36 PMgray-kilobyte-89541
01/10/2023, 6:26 PMfew-oyster-82478
01/10/2023, 9:15 PMtest results
above what counts to the general test results
number in billing? (in this example there are four specs in total, and it says it has six test results
), and related to that, is that independent on the number of machines you use for paralelization? (or the more machines you use, the more the cost increases?)powerful-orange-86819
01/11/2023, 4:05 AMlate-planet-4481
01/11/2023, 4:30 AMrefined-xylophone-96352
01/11/2023, 4:38 AMhallowed-mouse-50470
01/11/2023, 6:47 AMbored-van-76450
01/11/2023, 8:26 AMgray-kilobyte-89541
01/11/2023, 11:53 AMboundless-pager-73753
01/11/2023, 3:23 PMgray-kilobyte-89541
01/11/2023, 4:16 PMadorable-smartphone-87280
01/11/2023, 4:20 PMboundless-pager-73753
01/11/2023, 4:22 PMboundless-pager-73753
01/11/2023, 4:34 PMassignValuesToSelectedSettings() {
cy.get('[name="selected-settings"]').find('select').each((select) => {
if (select.is(':visible')) {
cy.wrap(select).scrollIntoView({ ensureScrollable: false })
cy.wrap(select).find('option').filter(':enabled').its('length').then((optionsLength) => {
const random_option = Math.floor(Math.random() * optionsLength);
cy.wrap(select).select(random_option).scrollTo(0, 200, { ensureScrollable: false })
})
} else { }
})
}
refined-xylophone-96352
01/12/2023, 3:49 AMfreezing-piano-2792
01/12/2023, 12:39 PMrelatedTarget
per spec? Ref https://github.com/cypress-io/cypress/blob/v10.10.0/packages/driver/src/cy/focused.ts#L8many-engine-97646
01/12/2023, 4:24 PMfreezing-piano-2792
01/12/2023, 4:46 PMbored-van-76450
01/14/2023, 5:39 AMbusy-parrot-92984
01/15/2023, 11:13 AMbored-van-76450
01/15/2023, 8:11 PMrefined-breakfast-53252
01/16/2023, 12:47 PMmodern-dawn-86006
01/16/2023, 7:47 PM