Skip to content

Commit a0abcdf

Browse files
Merge branch 'develop' into SWAP-5056-user-office-one-identity-synchronisation
2 parents 55190f1 + d038cec commit a0abcdf

4 files changed

Lines changed: 19 additions & 5 deletions

File tree

apps/e2e/cypress/e2e/proposals.cy.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,11 @@ context('Proposal tests', () => {
317317

318318
cy.contains('OK').click();
319319

320+
cy.get('[data-cy="questionary-stepper"').contains('New proposal').click();
321+
322+
cy.get('#title-input').should('have.value', title);
323+
cy.get('#abstract-input').should('have.value', modifiedAbstract);
324+
320325
cy.contains('Dashboard').click();
321326
cy.contains(title);
322327
cy.contains('submitted');

apps/frontend/src/components/proposal/ProposalContainer.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,14 @@ export default function ProposalContainer(props: ProposalContainerProps) {
129129
}
130130
draftState.isDirty = true;
131131
break;
132+
133+
case 'ITEM_WITH_QUESTIONARY_SUBMITTED':
134+
draftState.proposal = {
135+
...draftState.proposal,
136+
...action.itemWithQuestionary,
137+
};
138+
139+
break;
132140
}
133141

134142
return draftState;

apps/frontend/src/components/proposal/ProposalSummary.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ function ProposalReview({ confirm }: ProposalSummaryProps) {
164164
proposalPk: state.proposal.primaryKey,
165165
});
166166

167-
dispatch({
168-
type: 'ITEM_WITH_QUESTIONARY_MODIFIED',
169-
itemWithQuestionary: submitProposal,
170-
});
167+
const { proposal } = await api().getProposal({
168+
primaryKey: submitProposal.primaryKey,
169+
}); // refetching proposal after event handling is done in backend
170+
171171
dispatch({
172172
type: 'ITEM_WITH_QUESTIONARY_SUBMITTED',
173-
itemWithQuestionary: submitProposal,
173+
itemWithQuestionary: proposal!,
174174
});
175175
} finally {
176176
setSubmitDisabled(true);

apps/frontend/src/components/questionary/NavigationFragment.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const NavigationFragment = (props: {
1919
marginTop={3}
2020
spacing={1}
2121
alignItems="center"
22+
data-cy="navigation-fragment"
2223
>
2324
{props.isLoading && <UOLoader size="2em" />}
2425
<>{props.children}</>

0 commit comments

Comments
 (0)