few-farmer-48800
01/11/2023, 10:17 PMlittle-france-10142
01/11/2023, 10:34 PMlittle-france-10142
01/11/2023, 10:35 PMkind-lock-48901
01/13/2023, 10:58 AMERROR in ./node_modules/chargebee-typescript/lib/core.js:185:0
Module not found: Can't resolve 'http'
ERROR in ./node_modules/chargebee-typescript/lib/core.js:186:0
Module not found: Can't resolve 'https'
ERROR in ./node_modules/chargebee-typescript/lib/core.js:187:0
Module not found: Can't resolve 'os'
client (webpack 5.69.1) compiled with 3 errors in 4075 ms
Is there a way to ignore a specific module when Cypress is initiating?
Thanks in advance.gray-kilobyte-89541
01/13/2023, 11:34 AMmagnificent-finland-58048
01/13/2023, 12:49 PMkind-lock-48901
01/13/2023, 2:55 PMimport ProBadges from '../../utils/proProfile/badges'
describe('firstComp', () => {
it('playground', () => {
cy.mount(<ProBadges/>)
})
})
magnificent-finland-58048
01/13/2023, 3:02 PMkind-lock-48901
01/13/2023, 3:14 PMlittle-france-10142
01/13/2023, 3:20 PMmagnificent-finland-58048
01/13/2023, 7:19 PMmagnificent-finland-58048
01/13/2023, 7:21 PMwonderful-match-15836
01/17/2023, 2:11 AMloud-electrician-97312
01/20/2023, 10:48 PMlittle-france-10142
01/23/2023, 5:52 PMcypres/support/component.ts
Cypress.on('test:before:run:async', async () => {
if (window.msw) {
console.log('MSW is already running');
}
//if MSW was not started by the app, Cypress needs to start it
if (!window.msw) {
console.log('MSW has not been started. Starting now.');
await worker.start();
}
});
Should I be starting MSW at a higher level? I figure I'm not the first one to try and use MSW with Cypress component testing.glamorous-oxygen-73293
01/23/2023, 7:25 PMglamorous-oxygen-73293
01/24/2023, 7:16 PMrough-iron-74959
01/24/2023, 7:20 PMglamorous-oxygen-73293
01/26/2023, 6:27 AMmammoth-ice-26524
01/30/2023, 9:52 AMimportant-thailand-86740
01/31/2023, 8:26 PMbash
Error: EPERM: operation not permitted, utime '/Users/USERNAME/Library/Caches/Cypress/12.3.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/webpack-dev-server/dist/browser.js'
at utimesSync (node:fs:2025:3)
at EventEmitter.CypressCTWebpackPlugin.onSpecsChange (/Users/USERNAME/Library/Caches/Cypress/12.3.0/Cypress.app/Contents/Resources/app/packages/server/node_modules/@cypress/webpack-dev-server/dist/CypressCTWebpackPlugin.js:64:13)
at EventEmitter.emit (node:events:513:28)
at EventEmitter.emit (node:domain:489:12)
at EventEmitter. (/Users/USERNAME/Library/Caches/Cypress/12.3.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/dev-server.js:9:21)
at EventEmitter.emit (node:events:513:28)
at EventEmitter.emit (node:domain:489:12)
at process. (/Users/USERNAME/Library/Caches/Cypress/12.3.0/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/util.js:33:22)
at process.emit (node:events:513:28)
at process.emit (node:domain:489:12)
at process.emit.sharedData.processEmitHook.installedValue [as emit] (/Users/USERNAME/Library/Caches/Cypress/12.3.0/Cypress.app/Contents/Resources/app/node_modules/@cspotcode/source-map-support/source-map-support.js:745:40)
at emit (node:internal/child_process:939:14)
at processTicksAndRejections (node:internal/process/task_queues:84:21)
jolly-night-56837
02/10/2023, 8:19 AMimport { NdlNotifications } from "../../ndl-notifications";
describe("NdlNotifications", () => {
it("renders", () => {
cy.mount(NdlNotifications);
});
});
The problem seems to be, that the NdlNotifications
component is a custom element and has the .ce.vue
file ending.
In the test runner it shows that it tries to mount NdlNotifications.ce
(see attachment image)
My index file for NdlNotifications
looks like this
import { defineCustomElement } from "vue";
import NdlNotifications from "./NdlNotifications.ce.vue";
export { NdlNotifications };
export function register(tagName = "ndl-notifications") {
customElements.define(tagName, defineCustomElement(NdlNotifications));
}
I have created a github repo. Please have a look at https://github.com/yavuzsecer88/cypress-vue-custom-elements
The .ce.vue ending is necessary to use vue components as custom elements like <ndl-notifications />
. You can start the application and see that the custom element is rendered with red color. In the test however the color is not applied, since the test runner tries to load the module NdlNotifications.ce
instead of NdlNotifications
.proud-room-838
02/15/2023, 10:33 AMechoing-hairdresser-64326
02/23/2023, 1:48 PMcy.intercept("/api/test/xyz", {statusCode: 200, body: [{id: 1, name: 'hej'}]})
- cy.mount(MyComponent, /** stuff */)
Thank you!shy-accountant-52090
02/28/2023, 4:40 PMhigh-advantage-64807
03/09/2023, 7:09 PMcreamy-tiger-7122
03/10/2023, 2:59 PMadventurous-sunset-29221
03/17/2023, 3:51 PMbusy-tailor-13324
04/25/2023, 7:22 PMglamorous-oxygen-73293
04/28/2023, 4:29 AM