diff --git a/src/pages/Claim/Card/ClaimDevelopment.vue b/src/pages/Claim/Card/ClaimDevelopment.vue index f7e8131c6..61d9f5858 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 /> - [ > { 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();