Merge branch 'dev' into 7587-addClaimedTicketRefToRefundTicket
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jose Antonio Tubau 2025-03-05 13:44:36 +00:00
commit f8f527cc52
4 changed files with 23 additions and 35 deletions

8
Jenkinsfile vendored
View File

@ -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'

View File

@ -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" />

View File

@ -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>

View File

@ -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');
});
});