late-house-1562
06/14/2022, 11:25 PMsinon
is automatically included so I'm guessing not. Just can't figure out why the TypeError get generatored from winston
when this doesn't happen with cy.stub
isn't included.hallowed-mouse-50470
06/15/2022, 5:31 AMgray-kilobyte-89541
06/15/2022, 10:29 AM--ci-buid-id
when running the tests https://on.cypress.io/parallelizationlate-house-1562
06/15/2022, 12:36 PMTypeError
described yesterday, and I don't understand why. I've got a simple stub:
ts
beforeEach(() => cy.stub(geocodesService, "geocodeUsageById")
.resolves({
ok: true,
err: false,
val: {
requests: 3000
}
})
)
But regardless, it seems any time I include cy.stub
or cy.spy
in my spec file, I get the error.acoustic-doctor-39144
06/15/2022, 12:53 PM/// <reference types="cypress" />
context('Actions', () => {
let sidata, sudata
beforeEach(() => {
cy.fixture('signupdata').then(function(sdata) {
sidata=sdata
})
cy.fixture('signindata').then(function(sdata) {
sudata=sdata
})
})
before(() => {
cy.visit('link')
})
it('sigin', () => {
cy.go('forward')
cy.get('#userName-email').type(sudata.PaUsername)
cy.get('#signupSubmitId').click()
cy.wait(40000)
cy.get('#signupSubmitId').click()
})
it('sigup - must check', () => {
cy.get('#emailID').should('be.disabled')
cy.get('input[type=email]').should('contain.value',sudata.PaUsername)
})
it('sigup', () => {
cy.get('#firstName').clear().type('Madhavan')
cy.get('#lastName').clear().type('Prabakaran')
cy.get('#userGender').clear().select('Male')
cy.get('#userdob').clear().type('1999-06-19')
cy.get('#contactCountryCode').clear().select('+91(IN)')
cy.get('#contactMobileNumber').clear().type(sidata.PaMobile)
cy.get('#optin-email').check()
cy.get('#optin-mobile').check()
cy.get('#signupSubmitId')
})
})
acoustic-doctor-39144
06/15/2022, 12:55 PMacoustic-doctor-39144
06/15/2022, 12:55 PMpurple-flower-79622
06/15/2022, 1:29 PMpurple-flower-79622
06/15/2022, 1:30 PMpurple-flower-79622
06/15/2022, 1:30 PMhallowed-mouse-50470
06/15/2022, 5:08 PMmodern-librarian-14184
06/15/2022, 7:02 PMlemon-oyster-64925
06/15/2022, 7:10 PMmodern-librarian-14184
06/15/2022, 7:11 PMlate-house-1562
06/15/2022, 8:03 PMcypress.config.ts
in place of the plugins file. I'm having trouble getting tasks
right:
ts
export default defineConfig({
// setupNodeEvents can be defined in either
// the e2e or component configuration
e2e: {
setupNodeEvents(on) {
// bind to the event we care about
on("task", (on) => {
async function resetDatabase() {
// function code
}
async function seedDatabase() {
// function code
})
},
baseUrl: "http://localhost:5000",
}
})
yields:
InvalidEventHandlerError: The handler for the event `task` must be an object
But when I try to change it to an object, that doesn't work either.late-house-1562
06/15/2022, 10:58 PMbreezy-flag-76429
06/16/2022, 1:10 AMadventurous-dream-20049
06/16/2022, 2:13 AMadventurous-branch-4501
06/16/2022, 2:19 AMbreezy-flag-76429
06/16/2022, 2:30 AMlittle-translator-68537
06/16/2022, 3:28 AMabundant-musician-88272
06/16/2022, 6:17 AMcreamy-noon-1182
06/16/2022, 7:36 AMXvfb
server running on the same port that you have in $DISPLAY
Xvfb :99 &
export $DISPLAY=:99
these two commands fixes the issue for me.purple-flower-79622
06/16/2022, 8:17 AMaverage-garden-13651
06/16/2022, 8:19 AMadventurous-postman-3917
06/16/2022, 8:47 AMaverage-garden-13651
06/16/2022, 8:53 AMgentle-accountant-4760
06/16/2022, 9:00 AMadventurous-postman-3917
06/16/2022, 9:23 AMdiv.modal
? If yes, could you share with us your css selector and the hierarchy of that element?average-garden-13651
06/16/2022, 9:27 AM