jolly-night-56837
02/09/2023, 2:09 PMimport { NdlNotifications } from "../../ndl-notifications";
describe("NdlNotifications", () => {
it("renders", () => {
cy.mount(NdlNotifications);
});
});
The issue is, 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
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));
}jolly-night-56837
02/09/2023, 2:53 PM.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 npt applied, since the test runner tries to load the module NdlNotifications.ce instead of NdlNotificationsbest-flower-17510
02/09/2023, 4:44 PMjolly-night-56837
02/10/2023, 8:20 AMbest-flower-17510
02/10/2023, 4:52 PM