-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(orga): use pixOrgaTermsOfServiceStatus
Co-authored-by: Theo <[email protected]> Co-authored-by: Jérémy PLUQUET <[email protected]>
- Loading branch information
1 parent
47f2edf
commit 2956478
Showing
10 changed files
with
43 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,6 +139,7 @@ module('Acceptance | Team List', function (hooks) { | |
email: '[email protected]', | ||
lang: 'fr', | ||
pixOrgaTermsOfServiceAccepted: true, | ||
pixOrgaTermsOfServiceStatus: 'accepted', | ||
}); | ||
leavingUser.userOrgaSettings = server.create('user-orga-setting', { user: leavingUser, organization }); | ||
leavingUser.memberships = [ | ||
|
@@ -156,6 +157,7 @@ module('Acceptance | Team List', function (hooks) { | |
email: '[email protected]', | ||
lang: 'fr', | ||
pixOrgaTermsOfServiceAccepted: true, | ||
pixOrgaTermsOfServiceStatus: 'accepted', | ||
}); | ||
leavingUser.userOrgaSettings = server.create('user-orga-setting', { user: userLeft, organization }); | ||
leavingUser.memberships = [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ export function createPrescriberByUser({ user, participantCount = 0, features }) | |
lastName: user.lastName, | ||
lang: user.lang, | ||
pixOrgaTermsOfServiceAccepted: user.pixOrgaTermsOfServiceAccepted, | ||
pixOrgaTermsOfServiceStatus: user.pixOrgaTermsOfServiceStatus, | ||
memberships: user.memberships, | ||
userOrgaSettings: user.userOrgaSettings, | ||
participantCount, | ||
|
@@ -21,7 +22,16 @@ export function createPrescriberWithPixOrgaTermsOfService({ pixOrgaTermsOfServic | |
const email = '[email protected]'; | ||
const lang = 'fr'; | ||
|
||
const user = server.create('user', { firstName, lastName, email, lang, pixOrgaTermsOfServiceAccepted }); | ||
const pixOrgaTermsOfServiceStatus = pixOrgaTermsOfServiceAccepted ? 'accepted' : 'requested'; | ||
|
||
const user = server.create('user', { | ||
firstName, | ||
lastName, | ||
email, | ||
lang, | ||
pixOrgaTermsOfServiceAccepted, | ||
pixOrgaTermsOfServiceStatus, | ||
}); | ||
|
||
const organization = server.create('organization', { | ||
name: 'BRO & Evil Associates', | ||
|
@@ -40,6 +50,7 @@ export function createPrescriberWithPixOrgaTermsOfService({ pixOrgaTermsOfServic | |
lastName, | ||
lang, | ||
pixOrgaTermsOfServiceAccepted, | ||
pixOrgaTermsOfServiceStatus, | ||
memberships: [membership], | ||
userOrgaSettings: userOrgaSettings, | ||
features: { MISSIONS_MANAGEMENT: false }, | ||
|
@@ -71,6 +82,7 @@ export function createUserWithMembership() { | |
email: '[email protected]', | ||
lang: 'fr', | ||
pixOrgaTermsOfServiceAccepted: false, | ||
pixOrgaTermsOfServiceStatus: 'requested', | ||
}); | ||
|
||
return _addUserToOrganization(user); | ||
|
@@ -84,6 +96,7 @@ export function createUserWithMembershipAndTermsOfServiceAccepted({ organization | |
email: '[email protected]', | ||
lang: 'fr', | ||
pixOrgaTermsOfServiceAccepted: true, | ||
pixOrgaTermsOfServiceStatus: 'accepted', | ||
}); | ||
server.create('member-identity', { id: user.id, firstName: 'Harry', lastName: 'Cover' }); | ||
return _addUserToOrganization(user, { externalId: 'EXTBRO', organizationType }); | ||
|
@@ -96,6 +109,7 @@ export function createUserMembershipWithRole(organizationRole) { | |
email: '[email protected]', | ||
lang: 'fr', | ||
pixOrgaTermsOfServiceAccepted: true, | ||
pixOrgaTermsOfServiceStatus: 'accepted', | ||
}); | ||
|
||
const organization = server.create('organization', { | ||
|
@@ -122,6 +136,7 @@ export function createUserWithMultipleMemberships() { | |
email: '[email protected]', | ||
lang: 'fr', | ||
pixOrgaTermsOfServiceAccepted: true, | ||
pixOrgaTermsOfServiceStatus: 'accepted', | ||
}); | ||
|
||
const firstOrganization = server.create('organization', { | ||
|
@@ -158,7 +173,11 @@ export function createPrescriberForOrganization( | |
organizationRole, | ||
features, | ||
) { | ||
const user = server.create('user', { ...userAttributes, pixOrgaTermsOfServiceAccepted: true }); | ||
const user = server.create('user', { | ||
...userAttributes, | ||
pixOrgaTermsOfServiceAccepted: true, | ||
pixOrgaTermsOfServiceStatus: 'accepted', | ||
}); | ||
|
||
const organization = server.create('organization', organizationAttributes); | ||
|
||
|
@@ -194,6 +213,7 @@ export function createMember() { | |
email: '[email protected]', | ||
lang: 'fr', | ||
pixOrgaTermsOfServiceAccepted: true, | ||
pixOrgaTermsOfServiceStatus: 'accepted', | ||
}); | ||
server.create('member-identity', { id: user.id, firstName: 'Harry', lastName: 'Cover' }); | ||
const organization = server.create('organization', { name: 'BRO & Evil Associates' }); | ||
|
@@ -213,6 +233,7 @@ export function createMember() { | |
lastName: user.lastName, | ||
lang: user.lang, | ||
pixOrgaTermsOfServiceAccepted: user.pixOrgaTermsOfServiceAccepted, | ||
pixOrgaTermsOfServiceStatus: user.pixOrgaTermsOfServiceStatus, | ||
memberships: user.memberships, | ||
userOrgaSettings: user.userOrgaSettings, | ||
features: { MISSIONS_MANAGEMENT: false }, | ||
|
@@ -228,6 +249,7 @@ export function createUserManagingStudents(role = 'MEMBER', type = 'SCO') { | |
email: '[email protected]', | ||
lang: 'fr', | ||
pixOrgaTermsOfServiceAccepted: true, | ||
pixOrgaTermsOfServiceStatus: 'accepted', | ||
}); | ||
|
||
const organization = server.create('organization', { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters