From 6adcaff5d8330420195f3119706148a420c6dab9 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 12 Sep 2024 16:48:39 +0200 Subject: [PATCH 1/2] fix: refs #7524 dynamic load --- src/pages/Claim/Card/ClaimDevelopment.vue | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/pages/Claim/Card/ClaimDevelopment.vue b/src/pages/Claim/Card/ClaimDevelopment.vue index f7e8131c65..61d9f58585 100644 --- a/src/pages/Claim/Card/ClaimDevelopment.vue +++ b/src/pages/Claim/Card/ClaimDevelopment.vue @@ -16,7 +16,6 @@ const claimReasons = ref([]); const claimResults = ref([]); const claimResponsibles = ref([]); const claimRedeliveries = ref([]); -const workers = ref([]); const selected = ref([]); const saveButtonRef = ref(); @@ -82,7 +81,9 @@ const columns = computed(() => [ label: t('Worker'), field: (row) => row.workerFk, sortable: true, - options: workers.value, + url: 'Workers/search', + where: { active: 1 }, + sortBy: 'name ASC', model: 'workerFk', optionValue: 'id', optionLabel: 'nickname', @@ -129,13 +130,6 @@ const columns = computed(() => [ @on-fetch="(data) => (claimRedeliveries = data)" auto-load /> - [ > Date: Thu, 12 Sep 2024 17:49:59 +0200 Subject: [PATCH 2/2] fix: refs #7524 test --- .../integration/claim/claimDevelopment.spec.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/cypress/integration/claim/claimDevelopment.spec.js b/test/cypress/integration/claim/claimDevelopment.spec.js index 903f58d4b4..3b73a24d9d 100755 --- a/test/cypress/integration/claim/claimDevelopment.spec.js +++ b/test/cypress/integration/claim/claimDevelopment.spec.js @@ -8,6 +8,8 @@ describe('ClaimDevelopment', () => { cy.viewport(1920, 1080); cy.login('developer'); cy.visit(`/#/claim/${claimId}/development`); + cy.intercept('GET', /\/api\/Workers\/search/).as('workers'); + cy.intercept('GET', /\/api\/Workers\/search/).as('workers'); cy.waitForElement('tbody'); }); @@ -32,10 +34,19 @@ describe('ClaimDevelopment', () => { }); it('should add and remove new line', () => { + cy.wait(['@workers', '@workers']); cy.addCard(); + cy.get(thirdRow).should('exist'); - const rowData = [false, 'Novato', 'Roces', 'Compradores', 'employeeNick', 'Tour']; + const rowData = [ + false, + 'Novato', + 'Roces', + 'Compradores', + 'administrativeNick', + 'Tour', + ]; cy.fillRow(thirdRow, rowData); cy.saveCard();