orange-fall-1554
07/01/2022, 9:58 PM@vue/cli-plugin-e2e-cypress
. Unfortunately it looks like something changed with package.json
between cypress 8 and 10. I am not the best at understanding package.json
specifics, but I've observed that cypress 8 did not have an exports
section in its package.json
whereas cypress 10 does have that exports
section. A little spelunking in the @vue/cli-plugin-e2e-cypress
source code indicates it is depending on @vue/cli-shared-utils
's modules
package, which functions to discover the filesystem location of the cypress executable with cypress 8, but does not in cypress 10. Instead, with cypress 10 it swallows this exception: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './bin/cypress' is not defined by "exports" in /Users/.../repos/<my project>/node_modules/cypress/package.json".
orange-fall-1554
07/01/2022, 10:02 PMnode_modules/cypress/package.json
I added this code: ... "exports": { ...
"./bin/cypress": {
"import": "./bin/cypress",
"require": "./bin/cypress"
},
...
}
. Now, I have no idea what that actually does in terms of what the exports
section is intended for. But it does restore compatibility of cypress 10 with @vue/cli-plugin-e2e-cypress
. My question is: is this an illegitimate hack? Should the binary executable not actually be placed in the exports section of package.json, despite that this fixes that plugin? Or is it something that's acceptable to do, and @vue/cli-shared-utils
is actually correct in expecting that export before determining that executable `bin/cypress`'s location?orange-fall-1554
07/01/2022, 10:29 PMnode_modules/@vue/cli-plugin-e2e-cypress/index.js
to no longer make that call to `@vue/cli-shared-utils`'s modules
package in order to determine the location of the cypress
executable. Instead, just use #{__dirname}/../../cypress/bin/cypress
. Is there something horribly wrong with this? It does work, but if it did not bring problems with it I would've expected this implementation to begin with, rather than the complex require
-based approach in @vue/cli-shared-utils/lib/module.js
, which seems to expect that the binary be in the exports
section of cypress 10's package.json
. What's the right way to go about trying to achieve cypress 10 compatibility with @vue/cli-plugin-e2e-cypress
given the nature of this issue?fresh-nail-30646
07/02/2022, 2:35 AMcy.get()
call as a parameter, what's the best type to use for the parameter. Below is an example of what I'm trying to do with the ?? as the placeholder for the type I'm trying to figure out.
tableHead = () => { return cy.get(".MuiTableCellhead") }
clickTableHead(element: ??) {
element.click();
}
My IDE is suggesting () => Cypress.Chainable<JQuery<HTMLElement>>
, but that just ends up throwing more errors.careful-train-38757
07/02/2022, 9:40 PMwooden-teacher-96595
07/04/2022, 7:39 AMbitter-match-90736
07/04/2022, 10:29 AMgray-kilobyte-89541
07/04/2022, 1:06 PMfresh-doctor-14925
07/04/2022, 1:25 PMwooden-teacher-96595
07/04/2022, 2:04 PMbetter-tomato-32700
07/04/2022, 3:10 PMcareful-train-38757
07/04/2022, 5:14 PMbitter-fountain-36713
07/04/2022, 5:40 PMCypress.on('uncaught:exception')
to ignore that app error.
Cypress.on('uncaught:exception', (err, runnable) => {
// returning false here prevents Cypress from
// failing the test
if(err.message.includes('sql.addListener is not a function')) {
return false
}
})
bulky-manchester-97357
07/04/2022, 8:30 PMbulky-manchester-97357
07/04/2022, 8:31 PMbulky-manchester-97357
07/04/2022, 8:31 PMconst compareSnapshotCommand = require('cypress-image-diff-js/dist/command');
compareSnapshotCommand();
bulky-manchester-97357
07/04/2022, 8:32 PMfresh-crowd-34032
07/04/2022, 9:18 PMquaint-kangaroo-22871
07/05/2022, 6:46 AMnext-auth0
and trying to do the login using cy.origin
but the login result keep failing and showing this error in the page checks.state argument is missing
But when I do manual login outside cypress, it is working fine.
Let me know if you find the same issue and solve it beforeswift-kitchen-62493
07/05/2022, 7:19 AMmagnificent-finland-58048
07/05/2022, 11:16 AMmagnificent-finland-58048
07/05/2022, 11:18 AMbetter-tomato-32700
07/05/2022, 11:18 AMmagnificent-finland-58048
07/05/2022, 11:19 AMbetter-tomato-32700
07/05/2022, 11:19 AMmagnificent-finland-58048
07/05/2022, 11:20 AMancient-park-71356
07/05/2022, 11:45 AMancient-park-71356
07/05/2022, 11:46 AMmagnificent-finland-58048
07/05/2022, 12:22 PMancient-park-71356
07/05/2022, 12:23 PM