helpful-plumber-53987
06/17/2022, 11:47 AMcareful-tent-30457
06/17/2022, 11:49 AMError: Webpack Compilation Error
./node_modules/@fontsource/inter/300.css 2:0
Module parse failed: Unexpected character '@' (2:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| /* inter-cyrillic-ext-300-normal*/
> @font-face {
| font-family: 'Inter';
| font-style: normal;
@ ./src/theme/Theme.tsx 3:0-35
@ ./src/libs/contexts/AppTheme.tsx
@ ./cypress/support/commands.tsx
@ ./cypress/support/e2e.ts
...
acoustic-magazine-89269
06/17/2022, 1:37 PMcy.route("**/user/list", user.standard).as("getUsers")
but these do not
cy.intercept("**/user/list", user.standard).as("getUsers")
`cy.intercept("**/user/list", {fixture:"user.standard"}).as("getUsers")`// this will throw an error as it looks for the file extension
cy.intercept("**/user/list", {fixture:user.standard}).as("getUsers")
fresh-doctor-14925
06/17/2022, 1:50 PMcy.route()
. Maybe you'll find something useful in the fixture docs: https://docs.cypress.io/api/commands/fixture#Syntaxacoustic-magazine-89269
06/17/2022, 1:51 PMgray-kilobyte-89541
06/17/2022, 2:14 PMbrainy-engine-84010
06/17/2022, 2:28 PMcuddly-notebook-88094
06/17/2022, 2:43 PMlate-house-1562
06/17/2022, 3:04 PMcommands.ts
file:
ts
Cypress.Commands.add("dbConnection", async () => {
return await MongoClient.connect("mongodb://root:example@localhost:27017")
})
But when I try to use it in a test as const dbConnection = cy.dbConnection()
I get an error: TypeError: url_1.URL is not a constructor
If I include the connect
code in a plugin file, it works.
Any ideas why?late-house-1562
06/17/2022, 3:08 PMswift-controller-90067
06/17/2022, 3:14 PMis being covered by another element:
`<iframe id="webpack-dev-server-client-overlay"
anyone else seen this? I can only find one google result which didn't help. my gitlab cicd yml is ```yml
stages:
- test
test:
image: cypress/browsers:node12.14.1-chrome85-ff81
stage: test
script:
- npm ci
- npm start &
- npx cypress run```it's a react projectnutritious-honey-65632
06/17/2022, 3:20 PMswift-controller-90067
06/17/2022, 3:28 PMlate-house-1562
06/17/2022, 3:36 PMswift-controller-90067
06/17/2022, 3:44 PMastonishing-florist-44168
06/17/2022, 4:09 PMcuddly-thailand-33926
06/17/2022, 4:19 PMlate-house-1562
06/17/2022, 4:22 PMsupport
directory, I have an index.d.ts
file:
ts
declare namespace Cypress {
interface Chainable {
dbConnection(),
register(dbConnection, userId: string, apiToken: string): void
}
}
This works for me to make vscode suggest them.late-house-1562
06/17/2022, 4:54 PMincalculable-oyster-76116
06/17/2022, 6:17 PMbitter-fountain-36713
06/17/2022, 6:24 PMincalculable-oyster-76116
06/17/2022, 6:52 PMmagnificent-finland-58048
06/17/2022, 6:57 PMmagnificent-finland-58048
06/17/2022, 6:58 PMlate-house-1562
06/17/2022, 7:16 PMcy.database
section.late-house-1562
06/17/2022, 7:18 PMcy.task
which I can then call from a custom command?late-house-1562
06/17/2022, 7:28 PMcy.database
example more closely and see if I can resolve my issue above.dazzling-orange-32131
06/17/2022, 7:31 PMlate-house-1562
06/17/2022, 8:02 PMts
async dbConnection(url) {
try {
return await MongoClient.connect(url)
} catch (error) {
console.error("Couldn't connect.")
}
},
My custom command:
ts
Cypress.Commands.add("getDbConnection", (url) =>
cy.task("dbConnection", url))
Running cy.getDbConnection
leads to this error: https://pastebin.com/h6eCXQtZbig-house-71117
06/17/2022, 8:24 PM