From c621ccb5a6e35552a25bc203575554c852d9f8d2 Mon Sep 17 00:00:00 2001 From: jcasado Date: Tue, 23 Apr 2024 13:19:21 +0200 Subject: [PATCH 1/2] refs #7113 fix test --- test/cypress/support/commands.js | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js index f075d500f..13103950c 100755 --- a/test/cypress/support/commands.js +++ b/test/cypress/support/commands.js @@ -38,6 +38,15 @@ Cypress.Commands.add('login', (user) => { }, }).then((response) => { window.localStorage.setItem('token', response.body.token); + cy.request({ + method: 'GET', + url: '/api/VnUsers/ShareToken', + headers: { + Authorization: window.localStorage.getItem('token'), + }, + }).then(({ body }) => { + window.localStorage.setItem('tokenMultimedia', body.multimediaToken.id); + }); }); }); @@ -52,16 +61,18 @@ Cypress.Commands.add('getValue', (selector) => { } // Si es un QSelect if ($el.find('.q-select__dropdown-icon').length) { - return cy.get( - selector + - '> .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > input' - ).invoke('val') + return cy + .get( + selector + + '> .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > input' + ) + .invoke('val'); } // Si es un QSelect if ($el.find('span').length) { - return cy.get( - selector + ' span' - ).then(($span) => { return $span[0].innerText }) + return cy.get(selector + ' span').then(($span) => { + return $span[0].innerText; + }); } // Puedes aƱadir un log o lanzar un error si el elemento no es reconocido cy.log('Elemento no soportado'); @@ -132,13 +143,13 @@ Cypress.Commands.add('validateRow', (rowSelector, expectedValues) => { cy.get(rowSelector).within(() => { for (const [index, value] of expectedValues.entries()) { cy.log('CHECKING ', index, value); - if(value === undefined) continue + if (value === undefined) continue; if (typeof value == 'boolean') { const prefix = value ? '' : 'not.'; cy.getValue(`:nth-child(${index + 1})`).should(`${prefix}be.checked`); continue; } - cy.getValue(`:nth-child(${index + 1})`).should('equal', value) + cy.getValue(`:nth-child(${index + 1})`).should('equal', value); } }); }); From 4caf27b4f88b6430001c2aedbc1f3b0f5150d966 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 7 May 2024 08:37:52 +0200 Subject: [PATCH 2/2] deploy: init version 2422 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 063cf6de4..7be20a842 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "24.20.0", + "version": "24.22.0", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura",