From a0b92e990aa67d9334afd01462692c8b95680697 Mon Sep 17 00:00:00 2001 From: Jon <jon@verdnatura.es> Date: Thu, 27 Feb 2025 09:14:28 +0100 Subject: [PATCH 01/12] feat: refs #7949 show new field in ticket sales --- src/components/TicketProblems.vue | 2 +- src/pages/Ticket/Card/TicketSale.vue | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/TicketProblems.vue b/src/components/TicketProblems.vue index 783f2556f..88e7a4f01 100644 --- a/src/components/TicketProblems.vue +++ b/src/components/TicketProblems.vue @@ -12,7 +12,7 @@ defineProps({ row: { type: Object, required: true } }); > <QIcon name="vn:claims" size="xs"> <QTooltip> - {{ t('ticketSale.claim') }}: + {{ $t('ticketSale.claim') }}: {{ row.claim?.claimFk }} </QTooltip> </QIcon> diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue index e88133ff1..e3864af73 100644 --- a/src/pages/Ticket/Card/TicketSale.vue +++ b/src/pages/Ticket/Card/TicketSale.vue @@ -681,6 +681,17 @@ watch( :disabled-attr="isTicketEditable" > <template #column-statusIcons="{ row }"> + <QIcon + v-if="row.saleGroupFk" + name="inventory_2" + size="xs" + color="primary" + class="cursor-pointer" + > + <QTooltip class="no-pointer-events"> + {{ `saleGroup: ${row.saleGroupFk}` }} + </QTooltip> + </QIcon> <TicketProblems :row="row" /> </template> <template #body-cell-picture="{ row }"> From 5e087d9e3a45b971aad9430d5da76df3249ffdb9 Mon Sep 17 00:00:00 2001 From: jorgep <jorgep@verdnatura.es> Date: Tue, 4 Mar 2025 12:26:01 +0100 Subject: [PATCH 02/12] feat(SupplierList): refs #8718 add province filter column to supplier list --- src/pages/Supplier/SupplierList.vue | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/pages/Supplier/SupplierList.vue b/src/pages/Supplier/SupplierList.vue index c9625518f..87b1e13bc 100644 --- a/src/pages/Supplier/SupplierList.vue +++ b/src/pages/Supplier/SupplierList.vue @@ -120,6 +120,21 @@ const columns = computed(() => [ ], }, ]); + +const filterColumns = computed(() => { + const copy = [...columns.value]; + copy.splice(copy.length - 1, 0, { + align: 'left', + label: t('globals.params.provinceFk'), + name: 'provinceFk', + options: provincesOptions.value, + columnFilter: { + component: 'select', + }, + }); + + return copy; +}); </script> <template> <FetchData @@ -130,7 +145,7 @@ const columns = computed(() => [ /> <VnSection :data-key="dataKey" - :columns="columns" + :columns="filterColumns" prefix="supplier" :array-data-props="{ url: 'Suppliers/filter', @@ -165,17 +180,6 @@ const columns = computed(() => [ </template> </VnTable> </template> - <template #moreFilterPanel="{ params, searchFn }"> - <VnSelect - :label="t('globals.params.provinceFk')" - v-model="params.provinceFk" - @update:model-value="searchFn()" - :options="provincesOptions" - filled - dense - class="q-px-sm q-pr-lg" - /> - </template> </VnSection> </template> From 110b6ef548059664e99200713d7dc65d78118406 Mon Sep 17 00:00:00 2001 From: jorgep <jorgep@verdnatura.es> Date: Tue, 4 Mar 2025 14:28:05 +0100 Subject: [PATCH 03/12] refactor(VnAccountNumber): refs #8718 simplify model handling and input management --- src/components/common/VnAccountNumber.vue | 87 +++++-------------- src/components/common/VnInput.vue | 4 +- .../Supplier/Card/SupplierFiscalData.vue | 5 +- 3 files changed, 24 insertions(+), 72 deletions(-) diff --git a/src/components/common/VnAccountNumber.vue b/src/components/common/VnAccountNumber.vue index c4fa78674..3955da74c 100644 --- a/src/components/common/VnAccountNumber.vue +++ b/src/components/common/VnAccountNumber.vue @@ -1,12 +1,9 @@ <script setup> -import { nextTick, ref, watch } from 'vue'; -import { QInput } from 'quasar'; +import { nextTick, ref } from 'vue'; +import VnInput from './VnInput.vue'; +import { useAccountShortToStandard } from 'src/composables/useAccountShortToStandard'; const $props = defineProps({ - modelValue: { - type: String, - default: '', - }, insertable: { type: Boolean, default: false, @@ -14,70 +11,26 @@ const $props = defineProps({ }); const emit = defineEmits(['update:modelValue', 'accountShortToStandard']); +const model = defineModel({ prop: 'modelValue' }); +const inputRef = ref(false); -let internalValue = ref($props.modelValue); - -watch( - () => $props.modelValue, - (newVal) => { - internalValue.value = newVal; - } -); - -watch( - () => internalValue.value, - (newVal) => { - emit('update:modelValue', newVal); - accountShortToStandard(); - } -); - -const handleKeydown = (e) => { - if (e.key === 'Backspace') return; - if (e.key === '.') { - accountShortToStandard(); - // TODO: Fix this setTimeout, with nextTick doesn't work - setTimeout(() => { - setCursorPosition(0, e.target); - }, 1); - return; - } - - if ($props.insertable && e.key.match(/[0-9]/)) { - handleInsertMode(e); - } -}; -function setCursorPosition(pos, el = vnInputRef.value) { - el.focus(); - el.setSelectionRange(pos, pos); +function setCursorPosition(pos) { + const input = inputRef.value.vnInputRef.$el.querySelector('input'); + input.focus(); + input.setSelectionRange(pos, pos); } -const vnInputRef = ref(false); -const handleInsertMode = (e) => { - e.preventDefault(); - const input = e.target; - const cursorPos = input.selectionStart; - const { maxlength } = vnInputRef.value; - let currentValue = internalValue.value; - if (!currentValue) currentValue = e.key; - const newValue = e.key; - if (newValue && !isNaN(newValue) && cursorPos < maxlength) { - internalValue.value = - currentValue.substring(0, cursorPos) + - newValue + - currentValue.substring(cursorPos + 1); - } - nextTick(() => { - input.setSelectionRange(cursorPos + 1, cursorPos + 1); - }); -}; -function accountShortToStandard() { - internalValue.value = internalValue.value?.replace( - '.', - '0'.repeat(11 - internalValue.value.length) - ); + +async function handleUpdateModel(val) { + model.value = val?.at(-1) === '.' ? useAccountShortToStandard(val) : val; + await nextTick(() => setCursorPosition(0)); } </script> - <template> - <QInput @keydown="handleKeydown" ref="vnInputRef" v-model="internalValue" /> + <VnInput + v-model="model" + ref="inputRef" + v-bind="$attrs" + :insertable + @update:model-value="handleUpdateModel" + /> </template> diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index aeb4a31fd..fb607f0cf 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -83,7 +83,7 @@ const mixinRules = [ requiredFieldRule, ...($attrs.rules ?? []), (val) => { - const { maxlength } = vnInputRef.value; + const maxlength = $props.maxlength; if (maxlength && +val.length > maxlength) return t(`maxLength`, { value: maxlength }); const { min, max } = vnInputRef.value.$attrs; @@ -108,7 +108,7 @@ const handleInsertMode = (e) => { e.preventDefault(); const input = e.target; const cursorPos = input.selectionStart; - const { maxlength } = vnInputRef.value; + const maxlength = $props.maxlength; let currentValue = value.value; if (!currentValue) currentValue = e.key; const newValue = e.key; diff --git a/src/pages/Supplier/Card/SupplierFiscalData.vue b/src/pages/Supplier/Card/SupplierFiscalData.vue index ecee5b76b..4293bd41a 100644 --- a/src/pages/Supplier/Card/SupplierFiscalData.vue +++ b/src/pages/Supplier/Card/SupplierFiscalData.vue @@ -108,7 +108,6 @@ function handleLocation(data, location) { <VnAccountNumber v-model="data.account" :label="t('supplier.fiscalData.account')" - clearable data-cy="supplierFiscalDataAccount" insertable :maxlength="10" @@ -185,8 +184,8 @@ function handleLocation(data, location) { /> <VnCheckbox v-model="data.isVies" - :label="t('globals.isVies')" - :info="t('whenActivatingIt')" + :label="t('globals.isVies')" + :info="t('whenActivatingIt')" /> </div> </VnRow> From 5195e7bafc423d459fc22c0b21325c0407a72d0e Mon Sep 17 00:00:00 2001 From: jorgep <jorgep@verdnatura.es> Date: Tue, 4 Mar 2025 15:02:03 +0100 Subject: [PATCH 04/12] feat(SupplierList): refs #8718 add nickname alias to localization and update column filter --- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 1 + src/pages/Supplier/SupplierList.vue | 3 +-- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 5b667555e..d7187371e 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -369,6 +369,7 @@ globals: countryFk: Country countryCodeFk: Country companyFk: Company + nickname: Alias model: Model fuel: Fuel active: Active diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index c42696e4c..ea71595cd 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -370,6 +370,7 @@ globals: countryFk: País countryCodeFk: País companyFk: Empresa + nickname: Alias errors: statusUnauthorized: Acceso denegado statusInternalServerError: Ha ocurrido un error interno del servidor diff --git a/src/pages/Supplier/SupplierList.vue b/src/pages/Supplier/SupplierList.vue index 87b1e13bc..d1d437a19 100644 --- a/src/pages/Supplier/SupplierList.vue +++ b/src/pages/Supplier/SupplierList.vue @@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n'; import VnTable from 'components/VnTable/VnTable.vue'; import VnSection from 'src/components/common/VnSection.vue'; import VnInput from 'src/components/common/VnInput.vue'; -import VnSelect from 'src/components/common/VnSelect.vue'; import FetchData from 'src/components/FetchData.vue'; import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import SupplierSummary from './Card/SupplierSummary.vue'; @@ -53,7 +52,7 @@ const columns = computed(() => [ label: t('globals.alias'), name: 'alias', columnFilter: { - name: 'search', + name: 'nickname', }, cardVisible: true, }, From d4a18e584693d3b7a7e221feb4b34d70d8934abc Mon Sep 17 00:00:00 2001 From: jorgep <jorgep@verdnatura.es> Date: Tue, 4 Mar 2025 16:08:20 +0100 Subject: [PATCH 05/12] refactor(VnAccountNumber): refs #8718 update input handling and improve test descriptions --- src/components/common/VnAccountNumber.vue | 1 - src/components/common/VnInput.vue | 2 +- .../vnComponent/VnAccountNumber.spec.js | 68 +++++++++++-------- 3 files changed, 41 insertions(+), 30 deletions(-) diff --git a/src/components/common/VnAccountNumber.vue b/src/components/common/VnAccountNumber.vue index 3955da74c..56add7329 100644 --- a/src/components/common/VnAccountNumber.vue +++ b/src/components/common/VnAccountNumber.vue @@ -29,7 +29,6 @@ async function handleUpdateModel(val) { <VnInput v-model="model" ref="inputRef" - v-bind="$attrs" :insertable @update:model-value="handleUpdateModel" /> diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index fb607f0cf..9e13f5351 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -143,7 +143,7 @@ const handleUppercase = () => { :rules="mixinRules" :lazy-rules="true" hide-bottom-space - :data-cy="$attrs.dataCy ?? $attrs.label + '_input'" + :data-cy="$attrs['data-cy'] ?? $attrs.label + '_input'" > <template #prepend v-if="$slots.prepend"> <slot name="prepend" /> diff --git a/test/cypress/integration/vnComponent/VnAccountNumber.spec.js b/test/cypress/integration/vnComponent/VnAccountNumber.spec.js index 000c2151d..6328fa395 100644 --- a/test/cypress/integration/vnComponent/VnAccountNumber.spec.js +++ b/test/cypress/integration/vnComponent/VnAccountNumber.spec.js @@ -1,4 +1,4 @@ -describe('VnInput Component', () => { +describe('VnAccountNumber', () => { beforeEach(() => { cy.login('developer'); cy.viewport(1920, 1080); @@ -6,34 +6,46 @@ describe('VnInput Component', () => { cy.domContentLoad(); }); - it('should replace character at cursor position in insert mode', () => { - // Simula escribir en el input - cy.dataCy('supplierFiscalDataAccount').clear(); - cy.dataCy('supplierFiscalDataAccount').type('4100000001'); - // Coloca el cursor en la posición 0 - cy.dataCy('supplierFiscalDataAccount').type('{movetostart}'); - // Escribe un número y verifica que se reemplace correctamente - cy.dataCy('supplierFiscalDataAccount').type('999'); - cy.dataCy('supplierFiscalDataAccount') - .should('have.value', '9990000001'); + describe('VnInput handleInsertMode()', () => { + it('should replace character at cursor position in insert mode', () => { + cy.get('input[data-cy="supplierFiscalDataAccount"]').type( + '{selectall}4100000001', + ); + cy.get('input[data-cy="supplierFiscalDataAccount"]').type('{movetostart}'); + cy.get('input[data-cy="supplierFiscalDataAccount"]').type('999'); + cy.get('input[data-cy="supplierFiscalDataAccount"]').should( + 'have.value', + '9990000001', + ); + }); + + it('should replace character at cursor position in insert mode', () => { + cy.get('input[data-cy="supplierFiscalDataAccount"]').clear(); + cy.get('input[data-cy="supplierFiscalDataAccount"]').type('4100000001'); + cy.get('input[data-cy="supplierFiscalDataAccount"]').type('{movetostart}'); + cy.get('input[data-cy="supplierFiscalDataAccount"]').type('999'); + cy.get('input[data-cy="supplierFiscalDataAccount"]').should( + 'have.value', + '9990000001', + ); + }); + + it('should respect maxlength prop', () => { + cy.get('input[data-cy="supplierFiscalDataAccount"]').clear(); + cy.get('input[data-cy="supplierFiscalDataAccount"]').type('123456789012345'); + cy.get('input[data-cy="supplierFiscalDataAccount"]').should( + 'have.value', + '1234567890', + ); + }); }); - it('should replace character at cursor position in insert mode', () => { - // Simula escribir en el input - cy.dataCy('supplierFiscalDataAccount').clear(); - cy.dataCy('supplierFiscalDataAccount').type('4100000001'); - // Coloca el cursor en la posición 0 - cy.dataCy('supplierFiscalDataAccount').type('{movetostart}'); - // Escribe un número y verifica que se reemplace correctamente en la posicion incial - cy.dataCy('supplierFiscalDataAccount').type('999'); - cy.dataCy('supplierFiscalDataAccount') - .should('have.value', '9990000001'); - }); - - it('should respect maxlength prop', () => { - cy.dataCy('supplierFiscalDataAccount').clear(); - cy.dataCy('supplierFiscalDataAccount').type('123456789012345'); - cy.dataCy('supplierFiscalDataAccount') - .should('have.value', '1234567890'); // asumiendo que maxlength es 10 + it('should convert short account number to standard format', () => { + cy.get('input[data-cy="supplierFiscalDataAccount"]').clear(); + cy.get('input[data-cy="supplierFiscalDataAccount"]').type('123.'); + cy.get('input[data-cy="supplierFiscalDataAccount"]').should( + 'have.value', + '1230000000', + ); }); }); From 0263faeed23676fa6210c62b34db5b2fb0ba7ebf Mon Sep 17 00:00:00 2001 From: alexm <alexm@verdnatura.es> Date: Wed, 5 Mar 2025 08:48:37 +0100 Subject: [PATCH 06/12] fix(Jenkinsfile): update Docker registry credentials handling in E2E stage --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f57678938..086c58362 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -108,7 +108,6 @@ pipeline { } stage('E2E') { environment { - CREDENTIALS = credentials('docker-registry') COMPOSE_PROJECT = "${PROJECT_NAME}-${env.BUILD_ID}" COMPOSE_PARAMS = "-p ${env.COMPOSE_PROJECT} -f test/cypress/docker-compose.yml --project-directory ." } @@ -116,8 +115,10 @@ pipeline { script { sh 'rm junit/e2e-*.xml || true' env.COMPOSE_TAG = PROTECTED_BRANCH.contains(env.CHANGE_TARGET) ? env.CHANGE_TARGET : 'dev' + withDockerRegistry([credentialsId: 'docker-registry']) { + sh "docker-compose ${env.COMPOSE_PARAMS} up -d" + } def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs') - sh "docker-compose ${env.COMPOSE_PARAMS} up -d" image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ") { sh 'cypress run --browser chromium || true' } From 27149b17503be403269a7fc6b5220f6dee38526e Mon Sep 17 00:00:00 2001 From: alexm <alexm@verdnatura.es> Date: Wed, 5 Mar 2025 08:51:57 +0100 Subject: [PATCH 07/12] fix(Jenkinsfile): enhance Docker registry credentials handling with dynamic URL --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 086c58362..e6647a654 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -115,7 +115,7 @@ pipeline { script { sh 'rm junit/e2e-*.xml || true' env.COMPOSE_TAG = PROTECTED_BRANCH.contains(env.CHANGE_TARGET) ? env.CHANGE_TARGET : 'dev' - withDockerRegistry([credentialsId: 'docker-registry']) { + withDockerRegistry([credentialsId: 'docker-registry', url: "https://${env.REGISTRY}" ]) { sh "docker-compose ${env.COMPOSE_PARAMS} up -d" } def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs') From aebc60c3e65f0db1a99de4c756ed2ee999eba694 Mon Sep 17 00:00:00 2001 From: Javier Segarra <jsegarra@verdnatura.es> Date: Wed, 5 Mar 2025 08:59:00 +0000 Subject: [PATCH 08/12] fix: style when item is too long --- src/components/ui/CatalogItem.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/ui/CatalogItem.vue b/src/components/ui/CatalogItem.vue index 7806562b2..0ae890e37 100644 --- a/src/components/ui/CatalogItem.vue +++ b/src/components/ui/CatalogItem.vue @@ -132,7 +132,8 @@ const card = toRef(props, 'item'); display: flex; flex-direction: column; gap: 4px; - + white-space: nowrap; + width: 192px; p { margin-bottom: 0; } From 86244b74c4b6d86c536b3561fe91682238a56abe Mon Sep 17 00:00:00 2001 From: Jon <jon@verdnatura.es> Date: Wed, 5 Mar 2025 10:03:44 +0100 Subject: [PATCH 09/12] fix: fixed select not filtering when typing --- src/pages/Zone/Card/ZoneBasicData.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/Zone/Card/ZoneBasicData.vue b/src/pages/Zone/Card/ZoneBasicData.vue index 089208453..2f771642e 100644 --- a/src/pages/Zone/Card/ZoneBasicData.vue +++ b/src/pages/Zone/Card/ZoneBasicData.vue @@ -120,11 +120,10 @@ const setFilteredAddresses = (data) => { option-label="nickname" :options="addresses" :fields="['id', 'nickname']" - sort-by="id" + sort-by="nickname ASC" hide-selected map-options :rules="validate('data.addressFk')" - :filter-options="['id']" /> </VnRow> <VnRow> From 9d0aee059ffbf3a2170bead80485d76d4067958c Mon Sep 17 00:00:00 2001 From: alexm <alexm@verdnatura.es> Date: Wed, 5 Mar 2025 12:38:19 +0100 Subject: [PATCH 10/12] fix: warmFix vnInput dataCy --- src/components/common/VnInput.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index 9e13f5351..9821992cb 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -143,7 +143,7 @@ const handleUppercase = () => { :rules="mixinRules" :lazy-rules="true" hide-bottom-space - :data-cy="$attrs['data-cy'] ?? $attrs.label + '_input'" + :data-cy="($attrs['data-cy'] ?? $attrs.label) + '_input'" > <template #prepend v-if="$slots.prepend"> <slot name="prepend" /> From 5fdcfcba9b04594b6ae4d8d2768610bed2c22299 Mon Sep 17 00:00:00 2001 From: alexm <alexm@verdnatura.es> Date: Wed, 5 Mar 2025 13:20:13 +0100 Subject: [PATCH 11/12] refactor: use constant for account input selector in VnAccountNumber tests --- .../vnComponent/VnAccountNumber.spec.js | 45 +++++++------------ 1 file changed, 16 insertions(+), 29 deletions(-) diff --git a/test/cypress/integration/vnComponent/VnAccountNumber.spec.js b/test/cypress/integration/vnComponent/VnAccountNumber.spec.js index 0dc12205b..053902f35 100644 --- a/test/cypress/integration/vnComponent/VnAccountNumber.spec.js +++ b/test/cypress/integration/vnComponent/VnAccountNumber.spec.js @@ -1,4 +1,5 @@ describe('VnAccountNumber', () => { + const accountInput = 'input[data-cy="supplierFiscalDataAccount_input"]'; beforeEach(() => { cy.login('developer'); cy.viewport(1920, 1080); @@ -7,44 +8,30 @@ describe('VnAccountNumber', () => { describe('VnInput handleInsertMode()', () => { it('should replace character at cursor position in insert mode', () => { - cy.get('input[data-cy="supplierFiscalDataAccount"]').type( - '{selectall}4100000001', - ); - cy.get('input[data-cy="supplierFiscalDataAccount"]').type('{movetostart}'); - cy.get('input[data-cy="supplierFiscalDataAccount"]').type('999'); - cy.get('input[data-cy="supplierFiscalDataAccount"]').should( - 'have.value', - '9990000001', - ); + cy.get(accountInput).type('{selectall}4100000001'); + cy.get(accountInput).type('{movetostart}'); + cy.get(accountInput).type('999'); + cy.get(accountInput).should('have.value', '9990000001'); }); it('should replace character at cursor position in insert mode', () => { - cy.get('input[data-cy="supplierFiscalDataAccount"]').clear(); - cy.get('input[data-cy="supplierFiscalDataAccount"]').type('4100000001'); - cy.get('input[data-cy="supplierFiscalDataAccount"]').type('{movetostart}'); - cy.get('input[data-cy="supplierFiscalDataAccount"]').type('999'); - cy.get('input[data-cy="supplierFiscalDataAccount"]').should( - 'have.value', - '9990000001', - ); + cy.get(accountInput).clear(); + cy.get(accountInput).type('4100000001'); + cy.get(accountInput).type('{movetostart}'); + cy.get(accountInput).type('999'); + cy.get(accountInput).should('have.value', '9990000001'); }); it('should respect maxlength prop', () => { - cy.get('input[data-cy="supplierFiscalDataAccount"]').clear(); - cy.get('input[data-cy="supplierFiscalDataAccount"]').type('123456789012345'); - cy.get('input[data-cy="supplierFiscalDataAccount"]').should( - 'have.value', - '1234567890', - ); + cy.get(accountInput).clear(); + cy.get(accountInput).type('123456789012345'); + cy.get(accountInput).should('have.value', '1234567890'); }); }); it('should convert short account number to standard format', () => { - cy.get('input[data-cy="supplierFiscalDataAccount"]').clear(); - cy.get('input[data-cy="supplierFiscalDataAccount"]').type('123.'); - cy.get('input[data-cy="supplierFiscalDataAccount"]').should( - 'have.value', - '1230000000', - ); + cy.get(accountInput).clear(); + cy.get(accountInput).type('123.'); + cy.get(accountInput).should('have.value', '1230000000'); }); }); From b65a5f107624fc9c4b0a567ae45f434b729b2952 Mon Sep 17 00:00:00 2001 From: alexm <alexm@verdnatura.es> Date: Wed, 5 Mar 2025 13:52:57 +0100 Subject: [PATCH 12/12] fix: update Jenkinsfile to use environment variable for Docker registry credentials --- Jenkinsfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e6647a654..6261db6ee 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -108,6 +108,7 @@ pipeline { } stage('E2E') { environment { + CREDS = credentials('docker-registry') COMPOSE_PROJECT = "${PROJECT_NAME}-${env.BUILD_ID}" COMPOSE_PARAMS = "-p ${env.COMPOSE_PROJECT} -f test/cypress/docker-compose.yml --project-directory ." } @@ -115,9 +116,10 @@ pipeline { script { sh 'rm junit/e2e-*.xml || true' env.COMPOSE_TAG = PROTECTED_BRANCH.contains(env.CHANGE_TARGET) ? env.CHANGE_TARGET : 'dev' - withDockerRegistry([credentialsId: 'docker-registry', url: "https://${env.REGISTRY}" ]) { - sh "docker-compose ${env.COMPOSE_PARAMS} up -d" - } + + sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY' + sh "docker-compose ${env.COMPOSE_PARAMS} up -d" + def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs') image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ") { sh 'cypress run --browser chromium || true'