bulky-sundown-74498
06/04/2021, 7:19 PMhandsome-kilobyte-99728
06/04/2021, 7:20 PMhandsome-kilobyte-99728
06/04/2021, 7:20 PMconfig
and incompatibility with react-refresh if that would be helpful.handsome-kilobyte-99728
06/04/2021, 7:22 PMbulky-sundown-74498
06/04/2021, 7:37 PMbulky-sundown-74498
06/04/2021, 7:39 PMbulky-sundown-74498
06/04/2021, 7:39 PMflat-electrician-52949
06/04/2021, 8:12 PMcy.clock()
?echoing-piano-69699
06/04/2021, 9:05 PMhandsome-kilobyte-99728
06/04/2021, 11:08 PMflat-electrician-52949
06/05/2021, 7:00 PMcy.clock
with the tick
jsx
it.only('shows an estimate on when it is ready (fulfilled)', () => {
const now = new Date()
mount(
<ResizeWrapper>
<CartProvider>
<PaymentSucceededMessage />
</CartProvider>
</ResizeWrapper>
)
// Time left
cy.clock(now)
.contains('10 min', { matchCase: false })
.should('be.visible')
.tick(1000 /*ms*/ * 60 /*sec*/ * 1 /*min*/ + 300 /*ms*/)
.contains('9 min', { matchCase: false })
.should('be.visible')
.tick(1000 /*ms*/ * 60 /*sec*/ * 1 /*min*/ + 300 /*ms*/)
.contains('8 min', { matchCase: false })
.should('be.visible') // FIXME: The test does not work but the real life version does
// Note about the timing can differ if the order asked it to be ready at another time
cy.contains('Om du inte har angett en annan tid i anteckningen till köket')
})
But then it complains about a global window
objectflat-electrician-52949
06/05/2021, 8:18 PMcy.tick
has a bugflat-electrician-52949
06/06/2021, 5:44 AMcy.wait(0)
was needed in between the ticks.flat-electrician-52949
06/06/2021, 5:45 AMbillowy-spoon-30011
06/07/2021, 1:07 PMbillowy-spoon-30011
06/07/2021, 2:23 PMlimited-keyboard-75773
06/08/2021, 4:50 PMcy.exec
function in a custom module js
file. Is there a way to have access to this function outside of Cypress? I'm getting this error: ReferenceError: cy is not defined
. I tried explicit import it like so import { cy } from 'cypress';
but I get another error: SyntaxError: The requested module 'file:///path/to/node_modules/cypress/index.js' does not provide an export named 'cy'
. I'm trying to use node native for both cy.exec
& cy.readFile
but no luck with native exec
from Node.jsbulky-sundown-74498
06/08/2021, 4:54 PMbulky-sundown-74498
06/08/2021, 4:54 PMlimited-keyboard-75773
06/08/2021, 4:57 PMcy.exec
uses execa
under the hood? I replaced cy.readFile
with fs.readFile
& worked like a charm so I thought cy.exec
was based on childProcess
on Node.js. Is this correct?bulky-sundown-74498
06/08/2021, 4:58 PMbulky-sundown-74498
06/08/2021, 4:58 PMlimited-keyboard-75773
06/08/2021, 4:59 PMCypress
to mocha
native. We used the command cy.exec
to execute a Node's script
. I am just looking for the equivalent without using cy.exec
or either finding a way to have access to the cy
objectbulky-sundown-74498
06/08/2021, 5:01 PMbulky-sundown-74498
06/08/2021, 5:02 PMbulky-sundown-74498
06/08/2021, 5:02 PMlimited-keyboard-75773
06/08/2021, 5:03 PMcy.exec
natively using Node.js or using execa
module (which I would love to avoid installing another dependency)
- or finding a way to have access to cy
object, which I think you just told me it's impossible?bulky-sundown-74498
06/08/2021, 5:03 PMbulky-sundown-74498
06/08/2021, 5:03 PMlimited-keyboard-75773
06/08/2021, 5:04 PM