Skip to content

Commit fb3d7db

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

6 files changed

Lines changed: 20 additions & 7 deletions

File tree

apps/backend/src/datasources/postgres/UserDataSource.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ export default class PostgresUserDataSource implements UserDataSource {
190190
lastname,
191191
username: email,
192192
preferredname: firstname,
193-
oidc_sub: '',
194193
oauth_refresh_token: '',
195194
oauth_issuer: '',
196195
gender: '',
@@ -480,7 +479,6 @@ export default class PostgresUserDataSource implements UserDataSource {
480479
lastname: '',
481480
username: userId.toString(),
482481
preferredname: '',
483-
oidc_sub: '',
484482
oauth_refresh_token: '',
485483
gender: '',
486484
birthdate: '2000-01-01',

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}</>

apps/frontend/src/hooks/visit/useBlankVisitRegistration.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ function createRegistrationStub(
3434
position: '',
3535
email: '',
3636
country: '',
37+
oidc_sub: '',
3738
},
3839
questionary: {
3940
isCompleted: false,

0 commit comments

Comments
 (0)