-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Romuald Caplier
committed
Sep 23, 2024
1 parent
0b997c1
commit ac45c41
Showing
7 changed files
with
202 additions
and
165 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { Individual } from '@geonetwork-ui/common/domain/model/record' | ||
import { barbieIncOrganizationFixture } from './organisations.fixture' | ||
|
||
export const createIndividualFixture = ( | ||
overrides: Partial<Individual> = {} | ||
): Individual => ({ | ||
firstName: 'Arnaud', | ||
lastName: 'Demaison', | ||
email: '[email protected]', | ||
organization: barbieIncOrganizationFixture(), | ||
role: 'point_of_contact', | ||
...overrides, | ||
}) | ||
|
||
export const barbieIndividualFixture = (): Individual => | ||
createIndividualFixture({ | ||
firstName: 'Barbara', | ||
lastName: 'Roberts', | ||
email: '[email protected]', | ||
organization: barbieIncOrganizationFixture(), | ||
role: 'point_of_contact', | ||
}) | ||
|
||
export const someIndividualsFixture = (): Individual[] => [ | ||
barbieIndividualFixture(), | ||
{ | ||
firstName: 'John', | ||
lastName: 'Doe', | ||
email: '[email protected]', | ||
organization: barbieIncOrganizationFixture(), | ||
role: 'owner', | ||
}, | ||
{ | ||
firstName: 'Alice', | ||
lastName: 'Smith', | ||
email: '[email protected]', | ||
organization: barbieIncOrganizationFixture(), | ||
role: 'author', | ||
}, | ||
{ | ||
firstName: 'Michael', | ||
lastName: 'Johnson', | ||
email: '[email protected]', | ||
organization: barbieIncOrganizationFixture(), | ||
role: 'contributor', | ||
}, | ||
{ | ||
firstName: 'Emma', | ||
lastName: 'Williams', | ||
email: '[email protected]', | ||
organization: barbieIncOrganizationFixture(), | ||
role: 'rights_holder', | ||
}, | ||
{ | ||
firstName: 'David', | ||
lastName: 'Brown', | ||
email: '[email protected]', | ||
organization: barbieIncOrganizationFixture(), | ||
role: 'stakeholder', | ||
}, | ||
] |
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 |
---|---|---|
|
@@ -28,6 +28,19 @@ export const barbieUserFixture = (): UserModel => | |
'https://www.gravatar.com/avatar/dbdffd183622800bcf8587328daf43a6?d=mp', | ||
}) | ||
|
||
export const johnDoeUserFixture = (): UserModel => | ||
createUserFixture({ | ||
id: '12345', | ||
profile: 'User', | ||
username: 'johndoe', | ||
name: 'John', | ||
surname: 'Doe', | ||
email: '[email protected]', | ||
organisation: 'Doe Enterprises', | ||
profileIcon: | ||
'https://www.gravatar.com/avatar/5f6d74eabcb57186a12f7c8ba40b4c9f?d=mp', | ||
}) | ||
|
||
export const ghostUserFixture = (): UserModel => | ||
createUserFixture({ | ||
id: '161', | ||
|
Oops, something went wrong.