From 69e6f0f4679ff2483c4718ded3e15a4dc89429bb Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Sun, 17 Nov 2024 12:57:35 +0100 Subject: [PATCH] test: refs #8061 #8061 CreateNewPostcodeForm --- src/components/CreateNewPostcodeForm.vue | 19 +++-- .../vnComponent/vnLocation.spec.js | 83 +++++++++++++++++-- test/cypress/support/commands.js | 5 ++ 3 files changed, 94 insertions(+), 13 deletions(-) diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue index 6f7d8a24e..6e634465c 100644 --- a/src/components/CreateNewPostcodeForm.vue +++ b/src/components/CreateNewPostcodeForm.vue @@ -56,10 +56,10 @@ async function onCityCreated(newTown, formData) { } function setTown(newTown, data) { - if (!newTown) return; - town.value = newTown; data.provinceFk = newTown.provinceFk; data.countryFk = newTown.province.countryFk; + if (!newTown) return; + town.value = newTown; } async function setProvince(id, data) { @@ -73,7 +73,7 @@ async function onProvinceCreated(data) { await provincesFetchDataRef.value.fetch({ where: { countryFk: postcodeFormData.countryFk }, }); - postcodeFormData.provinceFk.value = data.id; + postcodeFormData.provinceFk = data.id; } watch( @@ -158,6 +158,13 @@ async function handleCountries(data) { auto-load url="Towns/location" /> +