mysterious-belgium-25713
10/03/2022, 8:49 PMsalmon-apple-69375
10/03/2022, 8:54 PMvictorious-queen-73209
10/04/2022, 4:39 AMbusy-dusk-58025
10/04/2022, 5:13 AMred-dusk-32191
10/04/2022, 9:36 AMancient-zebra-93090
10/04/2022, 10:31 AMbreezy-animal-27742
10/04/2022, 12:50 PMpowerful-orange-86819
10/04/2022, 1:16 PMjs
const {
beforeRunHook,
afterRunHook,
} = require("cypress-mochawesome-reporter/lib");
brash-magazine-98754
10/04/2022, 1:37 PMfaint-kite-69728
10/04/2022, 2:25 PMadorable-vase-67839
10/04/2022, 4:02 PMadorable-vase-67839
10/04/2022, 4:03 PMfreezing-wall-7568
10/04/2022, 6:39 PMfreezing-wall-7568
10/04/2022, 6:40 PMfreezing-piano-2792
10/04/2022, 7:44 PMAfter()
doesn't work like afterEach
in that way, it works more like the hooks you might be familiar with from actual cucumber-jsfreezing-wall-7568
10/04/2022, 7:55 PMfreezing-piano-2792
10/04/2022, 8:34 PMfreezing-wall-7568
10/04/2022, 8:41 PMfreezing-piano-2792
10/04/2022, 8:43 PMfreezing-wall-7568
10/04/2022, 8:45 PMfreezing-wall-7568
10/04/2022, 8:50 PMbored-school-78265
10/05/2022, 1:13 AMcy.contains
would yield undefined
? It shouldn't right?
I've got this:
export function getLabelledInput(label: string) {
return cy.contains('label', label).then((subject) => {
if (subject === undefined) {
console.error('Something messed up with Cypress. Subject is undefined but it should never be.')
}
const forAttribute = subject.attr('for')
return cy.wrap(subject).parent().find<HTMLInputElement>(`input[name="${forAttribute}"]`)
})
}
And subject === undefined
breezy-room-97976
10/05/2022, 9:09 AMhallowed-needle-91769
10/05/2022, 10:44 AMagreeable-scooter-87343
10/05/2022, 10:50 AMgray-kilobyte-89541
10/05/2022, 12:23 PMbrave-river-4142
10/05/2022, 12:25 PMglamorous-waiter-41005
10/05/2022, 1:01 PMcy.visit('https://bistromd-staging.myshopify.com/')
cy.get('input[type="password"]').type('notyet')
cy.get('input[type="submit"]').click()
cy.wait(8000) // waiting for overlay to appear
cy.get('#lightbox-iframe-bcae0f08-23da-4e6b-b6eb-3b37115eca83', { timeout: 30000 }).should('be.visible').then(($dialog) => {
cy.wrap($dialog).find('button').contains("decline 25% off + free shipping").click()
});
limited-barista-33480
10/05/2022, 1:48 PMgray-kilobyte-89541
10/05/2022, 2:01 PM