diff --git a/Jenkinsfile b/Jenkinsfile index 05ef34791..7f4144a54 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -126,7 +126,7 @@ pipeline { sh "docker-compose ${env.COMPOSE_PARAMS} up -d" image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ --init") { - sh 'sh test/cypress/cypressParallel.sh 1' + sh 'sh test/cypress/cypressParallel.sh 2' } } } diff --git a/src/components/common/SendEmailDialog.vue b/src/components/common/SendEmailDialog.vue index 254eb9cf9..a8209bdf7 100644 --- a/src/components/common/SendEmailDialog.vue +++ b/src/components/common/SendEmailDialog.vue @@ -60,7 +60,7 @@ async function confirm() { v-model="address" is-outlined autofocus - data-cy="SendEmailNotifiactionDialogInput" + data-cy="SendEmailNotificationDialogInput" /> diff --git a/src/components/common/VnCard.vue b/src/components/common/VnCard.vue index 50b041060..0b9cc2cce 100644 --- a/src/components/common/VnCard.vue +++ b/src/components/common/VnCard.vue @@ -26,11 +26,7 @@ const route = useRoute(); const stateStore = useStateStore(); const router = useRouter(); const entityId = computed(() => props.id || route?.params?.id); -const arrayData = useArrayData(props.dataKey, { - url: props.url, - userFilter: props.filter, - oneRecord: true, -}); +let arrayData = getArrayData(entityId.value, props.url); onBeforeRouteLeave(() => { stateStore.cardDescriptorChangeValue(null); @@ -61,16 +57,31 @@ onBeforeRouteUpdate(async (to, from) => { }); async function fetch(id, append = false) { - const regex = /\/(\d+)/; if (props.idInWhere) arrayData.store.filter.where = { id }; - else if (!regex.test(props.url)) arrayData.store.url = `${props.url}/${id}`; - else arrayData.store.url = props.url.replace(regex, `/${id}`); + else { + arrayData = getArrayData(id); + } await arrayData.fetch({ append, updateRouter: false }); emit('onFetch', arrayData.store.data); } function hasRouteParam(params, valueToCheck = ':addressId') { return Object.values(params).includes(valueToCheck); } + +function formatUrl(id) { + const newId = id || entityId.value; + const regex = /\/(\d+)/; + if (!regex.test(props.url)) return `${props.url}/${newId}`; + return props.url.replace(regex, `/${newId}`); +} + +function getArrayData(id, url) { + return useArrayData(props.dataKey, { + url: url ?? formatUrl(id), + userFilter: props.filter, + oneRecord: true, + }); +}