Skip to content

Commit

Permalink
Added more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mamartinezmejia committed Feb 26, 2025
1 parent 1c349d6 commit c94ce1b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
16 changes: 12 additions & 4 deletions frontend/cypress/e2e/pages/ClientDetailsPage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,19 +250,27 @@ describe("Client Details Page", () => {
.click();

cy.get("#reasonSaveBtn").click();

cy.wait("@saveClientDetails").then((interception) => {

expect(interception.request.body).to.deep.include({

const requestBody = interception.request.body;

expect(requestBody).to.deep.include({
op: "add",
path: "/reasons/0/reason",
value: "R1",
});

expect(requestBody).to.deep.include({
op: "add",
path: "/reasons/0/field",
value: "clientStatusCode",
});
});

});

});

});
});

Expand Down
1 change: 0 additions & 1 deletion frontend/src/pages/ClientDetailsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ const saveSummary = (patchData: jsonpatch.Operation[]) => {
//Reset values
selectedReasons.value = [];
saveDisabled.value = false;
//resetValidations();
originalPatchData = [...patchData];
const reasonFields = extractReasonFields(patchData, data.value);
Expand Down

0 comments on commit c94ce1b

Please sign in to comment.