From ed642b299efd2cbccf110d472799fe664616992c Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 27 Jun 2024 12:27:04 +0200 Subject: [PATCH 1/4] feat: refs #7436 show checkbox --- src/components/ui/CardSummary.vue | 5 -- src/components/ui/VnLv.vue | 96 ++++++++++++++++++------------- 2 files changed, 56 insertions(+), 45 deletions(-) diff --git a/src/components/ui/CardSummary.vue b/src/components/ui/CardSummary.vue index 253683889..11dcbee3b 100644 --- a/src/components/ui/CardSummary.vue +++ b/src/components/ui/CardSummary.vue @@ -187,15 +187,10 @@ function existSummary(routes) { color: lighten($primary, 20%); } .q-checkbox { - display: flex; - margin-bottom: 9px; & .q-checkbox__label { - margin-left: 31px; color: var(--vn-text-color); } & .q-checkbox__inner { - position: absolute; - left: 0; color: var(--vn-label-color); } } diff --git a/src/components/ui/VnLv.vue b/src/components/ui/VnLv.vue index 3220bce6a..ff65f759b 100644 --- a/src/components/ui/VnLv.vue +++ b/src/components/ui/VnLv.vue @@ -2,6 +2,7 @@ import { dashIfEmpty } from 'src/filters'; import { useI18n } from 'vue-i18n'; import { useClipboard } from 'src/composables/useClipboard'; +import { computed } from 'vue'; const $props = defineProps({ label: { type: String, default: null }, @@ -24,52 +25,67 @@ function copyValueText() { }, }); } +const val = computed(() => $props.value); - - From 63a05130e3df039c9b243da9068619682ca4c1e3 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 28 Jun 2024 12:46:14 +0200 Subject: [PATCH 2/4] chore: refs #7436 fix e2e --- .../integration/invoiceIn/invoiceInDescriptor.spec.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js b/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js index ca0b309e9..a2e9998bb 100644 --- a/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js +++ b/test/cypress/integration/invoiceIn/invoiceInDescriptor.spec.js @@ -1,8 +1,7 @@ describe('InvoiceInDescriptor', () => { const dialogBtns = '.q-card__actions button'; const firstDescritorOpt = '.q-menu > .q-list > :nth-child(1) > .q-item__section'; - const isBookedField = - '.q-card:nth-child(3) .vn-label-value:nth-child(5) > .value > span'; + const isBookedField = '.q-card:nth-child(3) .vn-label-value:nth-child(5) .q-checkbox'; it('should booking and unbooking the invoice properly', () => { cy.viewport(1280, 720); @@ -12,10 +11,10 @@ describe('InvoiceInDescriptor', () => { cy.openActionsDescriptor(); cy.get(firstDescritorOpt).click(); cy.get(dialogBtns).eq(1).click(); - cy.get(isBookedField).should('have.attr', 'title', 'true'); + cy.get(isBookedField).should('have.attr', 'aria-checked', 'true'); cy.get(firstDescritorOpt).click(); cy.get(dialogBtns).eq(1).click(); - cy.get(isBookedField).should('have.attr', 'title', 'false'); + cy.get(isBookedField).should('have.attr', 'aria-checked', 'false'); }); }); From a4a64eebb47fe9a6b77226fc4192d528928a3e2d Mon Sep 17 00:00:00 2001 From: pablone Date: Mon, 1 Jul 2024 09:18:16 +0200 Subject: [PATCH 3/4] fix: refs #7129 fix e2e --- .../integration/agency/agencyWorkCenter.spec.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/test/cypress/integration/agency/agencyWorkCenter.spec.js b/test/cypress/integration/agency/agencyWorkCenter.spec.js index 8349260ee..6d33dbc39 100644 --- a/test/cypress/integration/agency/agencyWorkCenter.spec.js +++ b/test/cypress/integration/agency/agencyWorkCenter.spec.js @@ -2,13 +2,10 @@ describe('AgencyWorkCenter', () => { beforeEach(() => { cy.viewport(1920, 1080); cy.login('developer'); - cy.visit(`/#/agency`); + cy.visit(`/#/agency/11/workCenter`); }); it('assign workCenter', () => { - cy.visit(`/#/agency`); - cy.get(':nth-child(1) > :nth-child(1) > .card-list-body > .list-items').click(); - cy.get('[href="#/agency/11/workCenter"] > .q-item__section--main').click(); cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click(); cy.get( '.vn-row > .q-field > .q-field__inner > .q-field__control > .q-field__control-container' @@ -17,8 +14,6 @@ describe('AgencyWorkCenter', () => { }); it('delete workCenter', () => { - cy.get(':nth-child(1) > :nth-child(1) > .card-list-body > .list-items').click(); - cy.get('[href="#/agency/11/workCenter"] > .q-item__section--main').click(); cy.get('.q-item__section--side > .q-btn > .q-btn__content > .q-icon').click(); cy.get('.q-notification__message').should( 'have.text', @@ -27,9 +22,6 @@ describe('AgencyWorkCenter', () => { }); it('error on duplicate workCenter', () => { - cy.visit(`/#/agency`); - cy.get(':nth-child(1) > :nth-child(1) > .card-list-body > .list-items').click(); - cy.get('[href="#/agency/11/workCenter"] > .q-item__section--main').click(); cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click(); cy.get( '.vn-row > .q-field > .q-field__inner > .q-field__control > .q-field__control-container' From 731169053c3fe78bd41a6b767023d47fbbc51224 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 1 Jul 2024 09:29:55 +0200 Subject: [PATCH 4/4] test: fix vnSearchbar adapt to vnTable --- test/cypress/integration/vnSearchBar.spec.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/test/cypress/integration/vnSearchBar.spec.js b/test/cypress/integration/vnSearchBar.spec.js index f1f3a9e82..580199bc3 100644 --- a/test/cypress/integration/vnSearchBar.spec.js +++ b/test/cypress/integration/vnSearchBar.spec.js @@ -3,13 +3,10 @@ describe('VnSearchBar', () => { const employeeId = ' #1'; const salesPersonId = ' #18'; const idGap = '.q-item > .q-item__label'; - const cardList = '.vn-card-list'; - - let url; + const vnTableRow = '.q-virtual-scroll__content'; beforeEach(() => { cy.login('developer'); cy.visit('#/customer/list'); - cy.url().then((currentUrl) => (url = currentUrl)); }); it('should redirect to customer summary page', () => { @@ -19,12 +16,12 @@ describe('VnSearchBar', () => { it('should stay on the list page if there are several results or none', () => { cy.writeSearchbar('salesA{enter}'); - checkCardListAndUrl(2); + checkTableLength(2); cy.clearSearchbar(); cy.writeSearchbar('0{enter}'); - checkCardListAndUrl(0); + checkTableLength(0); }); const searchAndCheck = (searchTerm, expectedText) => { @@ -33,10 +30,7 @@ describe('VnSearchBar', () => { cy.get(idGap).should('have.text', expectedText); }; - const checkCardListAndUrl = (expectedLength) => { - cy.get(cardList).then(($cardList) => { - expect($cardList.find('.q-card').length).to.equal(expectedLength); - cy.url().then((currentUrl) => expect(currentUrl).to.contain(url)); - }); + const checkTableLength = (expectedLength) => { + cy.get(vnTableRow).find('tr').should('have.length', expectedLength); }; });