[MAPA-432] fix: e2e tests #421
integration.yml
on: pull_request
Matrix: e2e
Matrix: integration-tests
Matrix: unit-tests
Annotations
15 errors
src/tests/integration/__tests__/handle-request.spec.ts > /handle-request > MSR registers asking for LEGAL support, already having an ongoing PSYCHOLOGICAL support > should create match for LEGAL support:
src/tests/integration/__tests__/handle-request.spec.ts#L44
AssertionError: expected { Object (legal) } to strictly equal { legal: 'waiting_contact' }
- Expected
+ Received
Object {
- "legal": "waiting_contact",
+ "legal": Array [
+ Object {
+ "status": "waiting_contact",
+ },
+ ],
}
❯ src/tests/integration/__tests__/handle-request.spec.ts:44:34
|
src/tests/integration/__tests__/handle-request.spec.ts > /handle-request > MSR registers asking for PSYCHOLOGICAL support, already having an ongoing LEGAL support > should create match for PSYCHOLOGICAL support:
src/tests/integration/__tests__/handle-request.spec.ts#L74
AssertionError: expected { Object (psychological) } to strictly equal { psychological: 'waiting_contact' }
- Expected
+ Received
Object {
- "psychological": "waiting_contact",
+ "psychological": Array [
+ Object {
+ "status": "waiting_contact",
+ },
+ ],
}
❯ src/tests/integration/__tests__/handle-request.spec.ts:74:34
|
src/tests/integration/__tests__/handle-request.spec.ts > /handle-request > MSR registers asking for LEGAL and PSYCHOLOGICAL support, already having a ongoing request for PSYCHOLOGICAL support with status 'Encaminhamento: Realizado para Serviço Público' > should create match for both support requests:
src/tests/integration/__tests__/handle-request.spec.ts#L106
AssertionError: expected { …(2) } to strictly equal { legal: 'waiting_contact', …(1) }
- Expected
+ Received
Object {
- "legal": "waiting_contact",
- "psychological": "waiting_contact",
+ "legal": Array [
+ Object {
+ "status": "waiting_contact",
+ },
+ ],
+ "psychological": Object {
+ "status": "waiting_contact",
+ },
}
❯ src/tests/integration/__tests__/handle-request.spec.ts:106:34
|
src/tests/integration/__tests__/handle-request.spec.ts > /handle-request > MSR registers asking for LEGAL and PSYCHOLOGICAL support, already having a ongoing request for PSYCHOLOGICAL support with status 'Encaminhamento: Realizado' > should create match for LEGAL support and update PSYCHOLOGICAL support to 'duplicated':
src/tests/integration/__tests__/handle-request.spec.ts#L143
AssertionError: expected { …(2) } to strictly equal { legal: 'waiting_contact', …(1) }
- Expected
+ Received
Object {
- "legal": "waiting_contact",
- "psychological": "duplicated",
+ "legal": Array [
+ Object {
+ "status": "waiting_contact",
+ },
+ ],
+ "psychological": Object {
+ "status": "duplicated",
+ },
}
❯ src/tests/integration/__tests__/handle-request.spec.ts:143:34
|
src/tests/integration/__tests__/handle-request.spec.ts > /handle-request > MSR registers asking for LEGAL and PSYCHOLOGICAL support, already having an expired LEGAL support > should create match for both support requests:
src/tests/integration/__tests__/handle-request.spec.ts#L178
AssertionError: expected { …(2) } to strictly equal { legal: 'waiting_contact', …(1) }
- Expected
+ Received
Object {
- "legal": "waiting_contact",
- "psychological": "waiting_contact",
+ "legal": Object {
+ "status": "waiting_contact",
+ },
+ "psychological": Array [
+ Object {
+ "status": "waiting_contact",
+ },
+ ],
}
❯ src/tests/integration/__tests__/handle-request.spec.ts:178:34
|
src/tests/integration/__tests__/handle-request.spec.ts > /handle-request > MSR registers asking for LEGAL and PSYCHOLOGICAL support, already having a ongoing LEGAL support with status 'Atendimento: Iniciado' > should create match for PSYCHOLOGICAL support and update LEGAL support to 'duplicated':
src/tests/integration/__tests__/handle-request.spec.ts#L215
AssertionError: expected { …(2) } to strictly equal { legal: 'duplicated', …(1) }
- Expected
+ Received
Object {
- "legal": "duplicated",
- "psychological": "waiting_contact",
+ "legal": Object {
+ "status": "duplicated",
+ },
+ "psychological": Array [
+ Object {
+ "status": "waiting_contact",
+ },
+ ],
}
❯ src/tests/integration/__tests__/handle-request.spec.ts:215:34
|
integration-tests (20.x, 9.x)
Process completed with exit code 1.
|
src/app/__tests__/handle-request.spec.ts > POST handle-request > New legal support request > should respond with `{ legal: 'waiting_contact' }`:
src/app/__tests__/handle-request.spec.ts#L159
AssertionError: expected { legal: [ { matchId: 3456, …(4) } ] } to strictly equal { legal: 'waiting_contact' }
- Expected
+ Received
Object {
- "legal": "waiting_contact",
+ "legal": Array [
+ Object {
+ "matchId": 3456,
+ "msrZendeskTicketId": 1234,
+ "status": "waiting_contact",
+ "supportRequestId": 1234,
+ "supportType": "legal",
+ },
+ ],
}
❯ src/app/__tests__/handle-request.spec.ts:159:34
|
src/app/__tests__/handle-request.spec.ts > POST handle-request > New psychological support request with old ongoing psychological support request > should respond with `{ psychological: 'duplicated' }`:
src/app/__tests__/handle-request.spec.ts#L244
AssertionError: expected {} to deeply equal { psychological: 'duplicated' }
- Expected
+ Received
- Object {
- "psychological": "duplicated",
- }
+ Object {}
❯ src/app/__tests__/handle-request.spec.ts:244:34
|
src/app/__tests__/handle-request.spec.ts > POST handle-request > New psychological support request with old ongoing psychological support request > should call to update support request with 'duplicated' status:
src/app/__tests__/handle-request.spec.ts#L277
AssertionError: expected "spy" to be called with arguments: [ { …(2) } ]
Received:
1st spy call:
Array [
Object {
"data": Object {
"status": "duplicated",
},
+ "select": Object {
+ "status": true,
+ },
"where": Object {
"supportRequestId": 5678,
},
},
]
Number of calls: 1
❯ src/app/__tests__/handle-request.spec.ts:277:44
|
src/app/__tests__/handle-request.spec.ts > POST handle-request > New legal and psychological support requests > should respond with `{ legal: 'waiting_contact', psychological: 'waiting_contact' }`:
src/app/__tests__/handle-request.spec.ts#L353
AssertionError: expected { …(2) } to deeply equal { …(2) }
- Expected
+ Received
Object {
- "legal": "waiting_contact",
- "psychological": "waiting_contact",
+ "legal": Array [
+ Object {
+ "matchId": 3456,
+ "msrZendeskTicketId": 1234,
+ "status": "waiting_contact",
+ "supportRequestId": 1234,
+ "supportType": "legal",
+ },
+ ],
+ "psychological": Array [
+ Object {
+ "matchId": 3457,
+ "msrZendeskTicketId": 1234,
+ "status": "waiting_contact",
+ "supportRequestId": 7890,
+ "supportType": "psychological",
+ },
+ ],
}
❯ src/app/__tests__/handle-request.spec.ts:353:34
|
src/app/__tests__/handle-request.spec.ts > POST handle-request > New legal and psychological support requests with old legal support request > should respond with `{ legal: 'waiting_contact', psychological: 'duplicated' }`:
src/app/__tests__/handle-request.spec.ts#L485
AssertionError: expected { legal: { matchId: 3456, …(4) } } to deeply equal { psychological: 'duplicated', …(1) }
- Expected
+ Received
Object {
- "legal": "waiting_contact",
- "psychological": "duplicated",
+ "legal": Object {
+ "matchId": 3456,
+ "msrZendeskTicketId": 1234,
+ "status": "waiting_contact",
+ "supportRequestId": 1234,
+ "supportType": "legal",
+ },
}
❯ src/app/__tests__/handle-request.spec.ts:485:34
|
src/app/__tests__/handle-request.spec.ts > POST handle-request > New legal and psychological support requests with old legal support request > should call to update support request with 'duplicated' status:
src/app/__tests__/handle-request.spec.ts#L568
AssertionError: expected "spy" to be called with arguments: [ { …(2) } ]
Received:
1st spy call:
Array [
Object {
"data": Object {
"status": "duplicated",
},
+ "select": Object {
+ "status": true,
+ },
"where": Object {
"supportRequestId": 5678,
},
},
]
Number of calls: 1
❯ src/app/__tests__/handle-request.spec.ts:568:44
|
unit-tests (20.x, 9.x)
Process completed with exit code 1.
|
e2e (20.x, 9.x)
Cypress tests: 2 failed
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
cypress-screenshots
Expired
|
380 KB |
|