From 08d241436320e3a66bdf974df595e65fe030b8ef Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 28 Jan 2025 09:16:19 +0100 Subject: [PATCH] refactor: refs #7686 update editableStates tests to check for 'OK' and 'Bloqueado' states --- .../ticket/back/methods/state/specs/editableState.spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/ticket/back/methods/state/specs/editableState.spec.js b/modules/ticket/back/methods/state/specs/editableState.spec.js index 2e1ce0c199..0c4024bbc0 100644 --- a/modules/ticket/back/methods/state/specs/editableState.spec.js +++ b/modules/ticket/back/methods/state/specs/editableState.spec.js @@ -35,9 +35,9 @@ describe('ticket editableStates()', () => { const editableStates = await models.State.editableStates(ctx, filter, options); - const pickerDesignedState = editableStates.some(state => state.code == 'PICKER_DESIGNED'); + const okState = editableStates.some(state => state.code == 'OK'); - expect(pickerDesignedState).toBeTruthy(); + expect(okState).toBeTruthy(); await tx.rollback(); } catch (e) { @@ -54,11 +54,11 @@ describe('ticket editableStates()', () => { const employeeRole = 1; const ctx = {req: {accessToken: {userId: employeeRole}}}; - const filter = {where: {name: {like: '%Previa OK%'}}}; + const filter = {where: {name: {like: '%Bloqueado%'}}}; const [editableStates] = await models.State.editableStates(ctx, filter, options); - expect(editableStates.name).toBe('Previa OK'); + expect(editableStates.name).toBe('Bloqueado'); await tx.rollback(); } catch (e) {