diff --git a/app/tests/unit/components/Form/ProjectContactFormSummary.test.tsx b/app/tests/unit/components/Form/ProjectContactFormSummary.test.tsx index 0b27182eb0..0f518fcd88 100644 --- a/app/tests/unit/components/Form/ProjectContactFormSummary.test.tsx +++ b/app/tests/unit/components/Form/ProjectContactFormSummary.test.tsx @@ -104,53 +104,53 @@ const mockQueryPayload = { }, }, ], - latestCommittedProjectContactFormChanges: { - edges: [ - { - node: { - newFormData: { - contactIndex: 1, - contactId: 1, - projectId: 1, - }, - asProjectContact: { - contactByContactId: { - fullName: "Test Full Name primary PREVIOUS", - }, - }, - } - }, - { - node: { - newFormData: { - contactIndex: 1, - contactId: 2, - projectId: 1, - }, - asProjectContact: { - contactByContactId: { - fullName: "I did not change", - }, + }, + latestCommittedProjectContactFormChanges: { + edges: [ + { + node: { + newFormData: { + contactIndex: 1, + contactId: 1, + projectId: 1, + }, + asProjectContact: { + contactByContactId: { + fullName: "Test Full Name primary PREVIOUS", }, - } - }, - { - node: { - newFormData: { - contactIndex: 4, - contactId: 4, - projectId: 1, + }, + } + }, + { + node: { + newFormData: { + contactIndex: 1, + contactId: 2, + projectId: 1, + }, + asProjectContact: { + contactByContactId: { + fullName: "I did not change", }, - asProjectContact: { - contactByContactId: { - fullName: "I was removed", - }, + }, + } + }, + { + node: { + newFormData: { + contactIndex: 4, + contactId: 4, + projectId: 1, + }, + asProjectContact: { + contactByContactId: { + fullName: "I was removed", }, - } + }, } - ] - } - }, + } + ] + } }; return result; }, diff --git a/app/tests/unit/components/Form/ProjectManagerFormSummary.test.tsx b/app/tests/unit/components/Form/ProjectManagerFormSummary.test.tsx index 18f8d09dab..195277cd20 100644 --- a/app/tests/unit/components/Form/ProjectManagerFormSummary.test.tsx +++ b/app/tests/unit/components/Form/ProjectManagerFormSummary.test.tsx @@ -42,18 +42,6 @@ const mockQueryPayload = { fullName: "Test Full Name Update", }, }, - formChangeByPreviousFormChangeId: { - newFormData: { - projectId: 1, - cifUserId: 1, - projectManagerLabelId: 1, - }, - asProjectManager: { - cifUserByCifUserId: { - fullName: "Test Full Name Update PREVIOUS", - }, - }, - }, }, projectManagerLabel: { label: "Test First Label", @@ -75,18 +63,6 @@ const mockQueryPayload = { fullName: "Test Full Name Archive", }, }, - formChangeByPreviousFormChangeId: { - newFormData: { - projectId: 1, - cifUserId: 1, - projectManagerLabelId: 1, - }, - asProjectManager: { - cifUserByCifUserId: { - fullName: "Test Full Name Archive PREVIOUS", - }, - }, - }, }, projectManagerLabel: { label: "Test Second Label", @@ -130,18 +106,6 @@ const mockQueryPayload = { fullName: "Test Full Name No Change", }, }, - formChangeByPreviousFormChangeId: { - newFormData: { - projectId: 1, - cifUserId: 4, - projectManagerLabelId: 4, - }, - asProjectManager: { - cifUserByCifUserId: { - fullName: "Test Full Name No Change", - }, - }, - }, }, projectManagerLabel: { label: "Test Fourth Label", @@ -150,6 +114,52 @@ const mockQueryPayload = { }, ], }, + latestCommittedProjectManagerFormChanges: { + edges: [ + { + node: { + newFormData: { + projectId: 1, + cifUserId: 1, + projectManagerLabelId: 1, + }, + asProjectManager: { + cifUserByCifUserId: { + fullName: "Test Full Name Update PREVIOUS", + }, + }, + } + }, + { + node: { + newFormData: { + projectId: 1, + cifUserId: 1, + projectManagerLabelId: 1, + }, + asProjectManager: { + cifUserByCifUserId: { + fullName: "Test Full Name Archive PREVIOUS", + }, + }, + } + }, + { + node: { + newFormData: { + projectId: 1, + cifUserId: 4, + projectManagerLabelId: 4, + }, + asProjectManager: { + cifUserByCifUserId: { + fullName: "Test Full Name No Change", + }, + }, + } + } + ] + }, }, }; }, @@ -197,6 +207,7 @@ describe("The ProjectManagerForm", () => { it("Only displays diffs of the the data fields that have changed", () => { componentTestingHelper.loadQuery(); componentTestingHelper.renderComponent(); + screen.logTestingPlaygroundURL(); expect(screen.getByText("Test Full Name Update")).toBeInTheDocument(); expect(