From 766435ad3aa8670ff5e4aef27aeefa997ab0c794 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Thu, 28 Sep 2023 11:40:04 -0400 Subject: [PATCH] Changed v-show to v-if to ensure proper hiding of link, no idea why this was needed --- .../service-location/shop-question/shop-question.spec.js | 9 +++++++-- .../service-location/shop-question/shop-question.vue | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/layouts/service-location/shop-question/shop-question.spec.js b/src/layouts/service-location/shop-question/shop-question.spec.js index c4efdea91..99329c3b9 100644 --- a/src/layouts/service-location/shop-question/shop-question.spec.js +++ b/src/layouts/service-location/shop-question/shop-question.spec.js @@ -311,8 +311,7 @@ describe("shop-question.vue", () => { const showMoreShopsLink = wrapper.findComponent({ ref: "showMoreShopsLink" }); // Assert - expect(showMoreShopsLink.exists()).toBe(true); - expect(showMoreShopsLink.isVisible()).toBe(false); + expect(showMoreShopsLink.exists()).toBe(false); }); it("Should display the next three shops when the 'Show more location' link is clicked", async () => { @@ -375,6 +374,12 @@ describe("shop-question.vue", () => { await wrapper.vm.$nextTick(); await wrapper.vm.$nextTick(); + await wrapper.setData({ + displaySeeMoreLocationsLink: true + }); + + await wrapper.vm.$nextTick(); + const showMoreShopsLink = wrapper.findComponent({ ref: "showMoreShopsLink" }); await wrapper.vm.$nextTick(); diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index 17153f9c9..7a32baf90 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -22,7 +22,7 @@ validationRules="option-required" :additionalButtonData="additionalButtonData" />