-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting ERROR: Could not resolve "crypto" and ERROR: Could not resolve "fs" when running Test #51
Comments
Hey, |
Would you mind sharing the repository that exhibits the issue? |
@elaichenkov , hi,sorry for late reply. here's the repo for your reference https://github.com/ayingyong/sample-repo-verify-download |
Thank you! I'll take a look at it today. |
Hey, Steps:
npm i -D @esbuild-plugins/node-modules-polyfill
const { defineConfig } = require("cypress");
const createBundler = require("@bahmutov/cypress-esbuild-preprocessor");
const addCucumberPreprocessorPlugin =
require("@badeball/cypress-cucumber-preprocessor").addCucumberPreprocessorPlugin;
const createEsbuildPlugin =
require("@badeball/cypress-cucumber-preprocessor/esbuild").createEsbuildPlugin;
// import the polyfill
+ const { NodeModulesPolyfillPlugin } = require('@esbuild-plugins/node-modules-polyfill');
module.exports = defineConfig({
e2e: {
async setupNodeEvents(on, config) {
const bundler = createBundler({
- plugins: [createEsbuildPlugin(config)],
+ plugins: [NodeModulesPolyfillPlugin(), createEsbuildPlugin(config)],
});
on("file:preprocessor", bundler);
await addCucumberPreprocessorPlugin(on, config);
on('task', { isFileExist, findFiles });
return config;
},
specPattern: "cypress/e2e/features/*.feature",
baseUrl: "https://demoqa.com/upload-download",
chromeWebSecurity: false,
},
}); Hope it helps you. Don't forget to hit the star button for the project. |
Hi @elaichenkov , its worked perfectly! thank you so much! 👍 |
Hi. i followed every steps mentioned in here https://github.com/elaichenkov/cy-verify-downloads. However, when running my test. It keep on throwing me these errors. Which part that i'm doing wrong here ?
Cypress version: 10.4.0
cy-verify-downloads version: 0.1.8
The text was updated successfully, but these errors were encountered: