Comments (5)
What bundler tool are you using? From my experience I can say that you might want to configure your bundler to opt-in this feature.
Would be also nice to see your cypress dev server configuration
from cypress.
What bundler tool are you using? From my experience I can say that you might want to configure your bundler to opt-in this feature.
I'm using Vite 5 (which is needed to use Vue 3.4). Also using yarn rather than npm.
Would be also nice to see your cypress dev server configuration
import { defineConfig } from "cypress";
export default defineConfig({
env: {
redacted
},
viewportHeight: 1280,
viewportWidth: 1920,
chromeWebSecurity: false,
defaultCommandTimeout: 30000, // For timing out on cy.get etc.
responseTimeout: 180000, // For loading a page.
video: false,
videoCompression: false,
scrollBehavior: false,
screenshotOnRunFailure: true,
watchForFileChanges: false,
fixturesFolder: "tests/cypress/support/modules/fixtures",
e2e: {
setupNodeEvents(on, config) {
on("before:browser:launch", (browser = {}, launchOptions) => {
if (browser.name === "edge" && browser.isHeadless) {
const width = 2000;
const height = 2000;
console.info(
`Setting the browser window size to ${width} x ${height} because of Edge bug.`
);
launchOptions.args.push(`--window-size=${width},${height}`);
}
return launchOptions;
});
return Object.assign({}, config, {
screenshotsFolder: "tests/cypress/screenshots/e2e",
videosFolder: "tests/cypress/videos/e2e",
supportFile: "tests/cypress/support/index.js",
});
},
baseUrl: "redacted",
specPattern: [
"tests/cypress/e2e/users/*.cy.{js,jsx,ts,tsx}",
"tests/cypress/e2e/config/playgrounds/datasourcesPlayground.cy.{js,jsx,ts,tsx}",
"tests/cypress/e2e/config/playgrounds/joinsPlayground.cy.{js,jsx,ts,tsx}",
"tests/cypress/e2e/config/playgrounds/rulesPlayground.cy.{js,jsx,ts,tsx}",
"tests/cypress/e2e/data/accountLedger/*.cy.{js,jsx,ts,tsx}",
"tests/cypress/e2e/data/alerts/*.cy.{js,jsx,ts,tsx}",
"tests/cypress/e2e/data/contracts/*.cy.{js,jsx,ts,tsx}",
"tests/cypress/e2e/data/products/*.cy.{js,jsx,ts,tsx}",
"tests/cypress/e2e/config/datasources/*.cy.{js,jsx,ts,tsx}",
"tests/cypress/e2e/config/joins/*.cy.{js,jsx,ts,tsx}",
"tests/cypress/e2e/config/rules/*.cy.{js,jsx,ts,tsx}",
"tests/cypress/e2e/general/*.cy.{js,jsx,ts,tsx}",
"tests/cypress/e2e/reporting/*.cy.{js,jsx,ts,tsx}",
"tests/cypress/e2e/aws/*.cy.{js,jsx,ts,tsx}",
],
supportFile: "tests/cypress/support/index.js",
experimentalRunAllSpecs: true,
},
component: {
indexHtmlFile: "tests/cypress/support/component-index.html",
supportFile: "tests/cypress/support/component.js",
devServer: {
framework: "vue",
bundler: "vite",
},
specPattern: "tests/cypress/component/**/*.cy.{js,jsx,ts,tsx}",
screenshotsFolder: "tests/cypress/screenshots/component",
videosFolder: "tests/cypress/videos/component",
},
});
from cypress.
What bundler tool are you using? From my experience I can say that you might want to configure your bundler to opt-in this feature.
I'm using Vite 5 (which is needed to use Vue 3.4). Also using yarn rather than npm.
Would be also nice to see your cypress dev server configuration
import { defineConfig } from "cypress"; export default defineConfig({ env: { redacted }, viewportHeight: 1280, viewportWidth: 1920, chromeWebSecurity: false, defaultCommandTimeout: 30000, // For timing out on cy.get etc. responseTimeout: 180000, // For loading a page. video: false, videoCompression: false, scrollBehavior: false, screenshotOnRunFailure: true, watchForFileChanges: false, fixturesFolder: "tests/cypress/support/modules/fixtures", e2e: { setupNodeEvents(on, config) { on("before:browser:launch", (browser = {}, launchOptions) => { if (browser.name === "edge" && browser.isHeadless) { const width = 2000; const height = 2000; console.info( `Setting the browser window size to ${width} x ${height} because of Edge bug.` ); launchOptions.args.push(`--window-size=${width},${height}`); } return launchOptions; }); return Object.assign({}, config, { screenshotsFolder: "tests/cypress/screenshots/e2e", videosFolder: "tests/cypress/videos/e2e", supportFile: "tests/cypress/support/index.js", }); }, baseUrl: "redacted", specPattern: [ "tests/cypress/e2e/users/*.cy.{js,jsx,ts,tsx}", "tests/cypress/e2e/config/playgrounds/datasourcesPlayground.cy.{js,jsx,ts,tsx}", "tests/cypress/e2e/config/playgrounds/joinsPlayground.cy.{js,jsx,ts,tsx}", "tests/cypress/e2e/config/playgrounds/rulesPlayground.cy.{js,jsx,ts,tsx}", "tests/cypress/e2e/data/accountLedger/*.cy.{js,jsx,ts,tsx}", "tests/cypress/e2e/data/alerts/*.cy.{js,jsx,ts,tsx}", "tests/cypress/e2e/data/contracts/*.cy.{js,jsx,ts,tsx}", "tests/cypress/e2e/data/products/*.cy.{js,jsx,ts,tsx}", "tests/cypress/e2e/config/datasources/*.cy.{js,jsx,ts,tsx}", "tests/cypress/e2e/config/joins/*.cy.{js,jsx,ts,tsx}", "tests/cypress/e2e/config/rules/*.cy.{js,jsx,ts,tsx}", "tests/cypress/e2e/general/*.cy.{js,jsx,ts,tsx}", "tests/cypress/e2e/reporting/*.cy.{js,jsx,ts,tsx}", "tests/cypress/e2e/aws/*.cy.{js,jsx,ts,tsx}", ], supportFile: "tests/cypress/support/index.js", experimentalRunAllSpecs: true, }, component: { indexHtmlFile: "tests/cypress/support/component-index.html", supportFile: "tests/cypress/support/component.js", devServer: { framework: "vue", bundler: "vite", }, specPattern: "tests/cypress/component/**/*.cy.{js,jsx,ts,tsx}", screenshotsFolder: "tests/cypress/screenshots/component", videosFolder: "tests/cypress/videos/component", }, });
It appears like you your config is inferred from the one you use for your app bundling.
So your configuration should be basically there.
export default defineConfig({
plugins: [
vue({
script: {
defineModel: true
}
})
]
});
Try to follow the code snippet above. This might come in handy as well:
https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue
from cypress.
That works, thanks!
from cypress.
(Though should probably be available by default in a future release as it's a stable feature in Vue now)
from cypress.
Related Issues (20)
- Cypress only runs the first test in the test suite and does not proceed further HOT 4
- Cypress, pnpm and OSX ARM64 gives
- cy.session failure that didn't come from my code HOT 2
- Cypress TestRail Simple plugin always return TypeError: Cannot read properties of undefined (reading 'length') HOT 1
- Enhance typings for cy.intercept and cy.wait
- disable mouseover on commands-timeline in sidebar HOT 1
- `cypress open` failed to start on Mac M1 (Sonoma 14.0) HOT 2
- Error after installation of version 13.9.0 HOT 1
- Cypress' built-in lodash types are incompatible with TypeScript 5.2+.
- Requests from Firefox Extension always delayed 500ms due to timeout in proxy server HOT 3
- Ubuntu 24.04: MESA: error: ZINK: vkCreateInstance failed (VK_ERROR_INCOMPATIBLE_DRIVER) HOT 3
- Emit `window:pageshow` and `window:pagehide` events
- Deprecate `window:unload`
- Cypress hangs while running in Docker Node JS 20+ container on Mac Book Pro with apple silicone M2 processor HOT 3
- Making Cypress app extensible
- Enable to configure the capture configuration for screenshots taken on failures HOT 2
- Input number bug impossible to resolve! HOT 1
- Cypress.require() fails to load modules without default export in cy.origin() context since version 12.17.4 HOT 2
- Correct type of `its` for request body
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cypress.