From a7fc18f2f984f366f949e46eb8931abb662c9ec6 Mon Sep 17 00:00:00 2001 From: acnormun Date: Fri, 25 Oct 2024 09:29:34 -0300 Subject: [PATCH] fix: tests --- setupTest.js | 2 +- src/components/config/ecommerce/vtex/Config.vue | 2 +- src/tests/views/__snapshots__/OtherApps.spec.js.snap | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setupTest.js b/setupTest.js index 464bc55c..c7f2386f 100644 --- a/setupTest.js +++ b/setupTest.js @@ -11,6 +11,6 @@ beforeEach(() => { }); config.global.plugins = [i18n]; -config.mocks = { +config.global.mocks = { $t: (msg) => msg, }; diff --git a/src/components/config/ecommerce/vtex/Config.vue b/src/components/config/ecommerce/vtex/Config.vue index 770c2206..78a30658 100644 --- a/src/components/config/ecommerce/vtex/Config.vue +++ b/src/components/config/ecommerce/vtex/Config.vue @@ -185,7 +185,7 @@ return this.hasConnectedCatalog && this.selectedSellers.length === 0 && this.disableVtexADS; }, appConfig() { - return this.configuredApps.find((item) => item.uuid === this.appUuid)?.config; + return this.configuredApps?.find((item) => item.uuid === this.appUuid)?.config; }, }, async mounted() { diff --git a/src/tests/views/__snapshots__/OtherApps.spec.js.snap b/src/tests/views/__snapshots__/OtherApps.spec.js.snap index f9bc5ab5..7f4e8a67 100644 --- a/src/tests/views/__snapshots__/OtherApps.spec.js.snap +++ b/src/tests/views/__snapshots__/OtherApps.spec.js.snap @@ -2,6 +2,6 @@ exports[`OtherApps > matches snapshot 1`] = ` "
-
+
" `;