diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ShowElement.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ShowElement.vue index 94f898e621..4a334b7149 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ShowElement.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ShowElement.vue @@ -149,7 +149,6 @@ import LinkWrapper from "./LinkWrapper.vue"; import AdditionalFieldsDisplay from "./AdditionalFieldsDisplay.vue"; import { useBaseElement } from "../composables/base-element.js"; import { computed, defineAsyncComponent } from "vue"; -import { $__ } from "@koha-vue/i18n"; export default { components: { LinkWrapper, AdditionalFieldsDisplay }, @@ -197,7 +196,6 @@ export default { attribute, formatValue, radioOptionText, - $__, }; }, props: { diff --git a/t/cypress/support/component.ts b/t/cypress/support/component.ts index 10b46ffdf7..1a01521706 100644 --- a/t/cypress/support/component.ts +++ b/t/cypress/support/component.ts @@ -20,6 +20,7 @@ // require('./commands') import { mount } from "cypress/vue"; +import i18n from "@koha-vue/i18n"; // Augment the Cypress namespace to include type definitions for // your custom command. @@ -33,7 +34,15 @@ import { mount } from "cypress/vue"; // } // }; -Cypress.Commands.add("mount", mount); +Cypress.Commands.add("mount", (component, options = {}) => { + return mount(component, { + global: { + plugins: [i18n, ...(options.global?.plugins || [])], + ...options.global, + }, + ...options, + }); +}); // Example use: // cy.mount(MyComponent)