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 1/4] 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 2/4] 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 3/4] 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 4/4] 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'