Changed v-show to v-if to ensure proper hiding of link, no idea why this was needed
This commit is contained in:
parent
e4797e67ec
commit
766435ad3a
2 changed files with 8 additions and 3 deletions
|
|
@ -311,8 +311,7 @@ describe("shop-question.vue", () => {
|
||||||
const showMoreShopsLink = wrapper.findComponent({ ref: "showMoreShopsLink" });
|
const showMoreShopsLink = wrapper.findComponent({ ref: "showMoreShopsLink" });
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
expect(showMoreShopsLink.exists()).toBe(true);
|
expect(showMoreShopsLink.exists()).toBe(false);
|
||||||
expect(showMoreShopsLink.isVisible()).toBe(false);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Should display the next three shops when the 'Show more location' link is clicked", async () => {
|
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.vm.$nextTick();
|
await wrapper.vm.$nextTick();
|
||||||
|
|
||||||
|
await wrapper.setData({
|
||||||
|
displaySeeMoreLocationsLink: true
|
||||||
|
});
|
||||||
|
|
||||||
|
await wrapper.vm.$nextTick();
|
||||||
|
|
||||||
const showMoreShopsLink = wrapper.findComponent({ ref: "showMoreShopsLink" });
|
const showMoreShopsLink = wrapper.findComponent({ ref: "showMoreShopsLink" });
|
||||||
|
|
||||||
await wrapper.vm.$nextTick();
|
await wrapper.vm.$nextTick();
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
validationRules="option-required"
|
validationRules="option-required"
|
||||||
:additionalButtonData="additionalButtonData" />
|
:additionalButtonData="additionalButtonData" />
|
||||||
<textLink
|
<textLink
|
||||||
v-show="displaySeeMoreLocationsLink"
|
v-if="displaySeeMoreLocationsLink"
|
||||||
ref="showMoreShopsLink"
|
ref="showMoreShopsLink"
|
||||||
class="show-more-shops-link"
|
class="show-more-shops-link"
|
||||||
id="showMoreShopsId"
|
id="showMoreShopsId"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue