busy-vegetable-18177
06/03/2022, 1:54 PMnutritious-crayon-33896
06/03/2022, 2:16 PMnutritious-crayon-33896
06/03/2022, 2:17 PMnutritious-crayon-33896
06/03/2022, 2:18 PMpowerful-chef-53496
06/03/2022, 6:11 PMwonderful-match-15836
06/03/2022, 7:07 PMpurple-kilobyte-85592
06/04/2022, 9:20 AMripe-action-59156
06/04/2022, 10:22 AM.visit("/")
for our website (live build is: https://furo-delta.vercel.app/furo), the command never finishes loading after which the test fails (20s).
See screenshot #1 - the three requests never finish
See screenshot #2 - the fail message
Using export CYPRESS_SKIP_RESOURCES_WAIT=true
takes care of it, but I expect that some undefined behavior could happen somewhere down the road, so I'd prefer not to.
To reproduce:
git clone https://github.com/sushiswap/sushiswap.git
cd sushiswap
git switch features/furo-synpress
pnpm install
cd apps/furo
export SECRET_WORDS="test test test test test test test test test test test junk"
pnpm synpress run -cf cypress/cypress.config.ts
Some notes:
- I'm using synpress, which is a cypress wrapper/plugin which adds Metamask support. It's cypress version is 9.5.3
-I've set cypress.config.ts
to point to the live deployment so that you don't need to build to reproduce, exact same issue happens with a local build thoughbusy-vegetable-18177
06/04/2022, 11:50 AMjs
Cypress.Commands.overwrite("click", (originalFn, subject, options) => {
if (options !== undefined && options.scroll) {
originalFn(subject, options)
} else {
cy.wrap(subject).should("be.in-viewport").then(() => originalFn(subject, options))
}
})
But this gives me an error on another part of the code saying Cypress detected that you returned a promise from a command while also invoking one or more cy commands in that promise.
The command that returned the promise was:
> cy.clear()
The cy command you invoked inside the promise was:
> cy.wrap()
Because Cypress commands are already promise-like, you don't need to wrap them or return your own promise.
Cypress will resolve your command with whatever the final Cypress command yields.
I don't understand, what am I doing wrong? I'm not returning a promise...ripe-action-59156
06/04/2022, 11:52 AMsynpress run
not synpress open
hereripe-action-59156
06/04/2022, 11:52 AMrun
ripe-action-59156
06/04/2022, 11:52 AMripe-action-59156
06/04/2022, 11:53 AMbusy-vegetable-18177
06/04/2022, 11:53 AMripe-action-59156
06/04/2022, 11:54 AMripe-action-59156
06/04/2022, 11:54 AMbusy-vegetable-18177
06/04/2022, 11:54 AMripe-action-59156
06/04/2022, 11:54 AMripe-action-59156
06/04/2022, 11:54 AMexport SKIP_METAMASK_SETUP=1
and
export SKIP_METAMASK_INSTALL=1
busy-vegetable-18177
06/04/2022, 11:54 AMripe-action-59156
06/04/2022, 11:55 AMripe-action-59156
06/04/2022, 11:55 AMripe-action-59156
06/04/2022, 11:55 AMripe-action-59156
06/04/2022, 11:55 AMsynpress
is forripe-action-59156
06/04/2022, 11:56 AMripe-action-59156
06/04/2022, 11:56 AMripe-action-59156
06/04/2022, 11:56 AMripe-action-59156
06/04/2022, 11:56 AMripe-action-59156
06/04/2022, 11:56 AMbusy-vegetable-18177
06/04/2022, 11:56 AM