Skip to content

Commit ee17fc1

Browse files
authored
Fe fix userlist test (canada-ca#2438)
* Update orgUserListData.js to have displaName * Update mocker to mock SharedUser displayName
1 parent 745d6fc commit ee17fc1

2 files changed

Lines changed: 27 additions & 3 deletions

File tree

frontend/mocking/mocker.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ const mocks = {
387387
SignInError: () => ({
388388
description: 'Mocked sign in error description',
389389
}),
390+
SharedUser: () => ({ displayName: faker.name.findName() }),
390391
SpfFailureTable: () => {
391392
const dnsHost = faker.internet.domainName()
392393
const envelopeFrom = faker.internet.domainName()
@@ -501,10 +502,16 @@ const schemaWithMocks = addMocksToSchema({
501502
},
502503
Mutation: {
503504
setPhoneNumber: (_, args, context, _resolveInfo) => {
504-
store.set('PersonalUser', context.token, 'phoneNumber', args.input.phoneNumber)
505+
store.set(
506+
'PersonalUser',
507+
context.token,
508+
'phoneNumber',
509+
args.input.phoneNumber,
510+
)
505511
return {
506512
result: {
507-
status: 'Phone number has been successfully set, you will receive a verification text message shortly.',
513+
status:
514+
'Phone number has been successfully set, you will receive a verification text message shortly.',
508515
user: store.get('PersonalUser', context.token),
509516
type: 'SetPhoneNumberResult',
510517
},
@@ -532,7 +539,6 @@ const schemaWithMocks = addMocksToSchema({
532539
if (obj.authToken) return 'AuthResult'
533540
},
534541
},
535-
536542
}),
537543
})
538544

frontend/src/fixtures/orgUserListData.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export const rawOrgUserListData = {
2424
user: {
2525
id: 'f6caa8ae-645e-4bef-9bc3-d251f184140c',
2626
userName: 'Garland.Hudson@yahoo.com',
27+
displayName: 'Jack Altenwerth',
2728
__typename: 'SharedUser',
2829
},
2930
__typename: 'Affiliation',
@@ -37,6 +38,7 @@ export const rawOrgUserListData = {
3738
user: {
3839
id: '94785736-34df-4f68-b1d4-5c22bbb1e65a',
3940
userName: 'Weldon.Kautzer@gmail.com',
41+
displayName: 'Miss Lila Stoltenberg',
4042
__typename: 'SharedUser',
4143
},
4244
__typename: 'Affiliation',
@@ -50,6 +52,7 @@ export const rawOrgUserListData = {
5052
user: {
5153
id: '9cb2b4ec-9fbe-4b31-8a8a-3be0e02a8995',
5254
userName: 'Lea.Hand@hotmail.com',
55+
displayName: 'Ricky Kautzer',
5356
__typename: 'SharedUser',
5457
},
5558
__typename: 'Affiliation',
@@ -63,6 +66,7 @@ export const rawOrgUserListData = {
6366
user: {
6467
id: '9a4fc063-b3af-46db-a1b7-056c72f027bc',
6568
userName: 'Joey53@hotmail.com',
69+
displayName: 'Roger Gulgowski',
6670
__typename: 'SharedUser',
6771
},
6872
__typename: 'Affiliation',
@@ -76,6 +80,7 @@ export const rawOrgUserListData = {
7680
user: {
7781
id: '146731b2-6004-4707-9d13-67f399b5b1cd',
7882
userName: 'Gino.Bechtelar@hotmail.com',
83+
displayName: 'Spencer Rath',
7984
__typename: 'SharedUser',
8085
},
8186
__typename: 'Affiliation',
@@ -89,6 +94,7 @@ export const rawOrgUserListData = {
8994
user: {
9095
id: '352626b2-cd66-4c1a-a132-9fa237b8f6bc',
9196
userName: 'Cleora_Howell@gmail.com',
97+
displayName: 'Pat Botsford III',
9298
__typename: 'SharedUser',
9399
},
94100
__typename: 'Affiliation',
@@ -102,6 +108,7 @@ export const rawOrgUserListData = {
102108
user: {
103109
id: '7ef88625-7220-404a-b88e-d7f2b7069bfa',
104110
userName: 'Dusty66@gmail.com',
111+
displayName: 'Jimmie Kunde',
105112
__typename: 'SharedUser',
106113
},
107114
__typename: 'Affiliation',
@@ -115,6 +122,7 @@ export const rawOrgUserListData = {
115122
user: {
116123
id: '1a7b47f9-f8f8-4316-a9ea-2073d60a558f',
117124
userName: 'Jeromy_Boyer@yahoo.com',
125+
displayName: 'Terri Oberbrunner MD',
118126
__typename: 'SharedUser',
119127
},
120128
__typename: 'Affiliation',
@@ -128,6 +136,7 @@ export const rawOrgUserListData = {
128136
user: {
129137
id: 'fc30e257-9fe9-467e-a6a3-5dcd503b1439',
130138
userName: 'Andrew_King44@hotmail.com',
139+
displayName: 'Mr. Vincent Harris',
131140
__typename: 'SharedUser',
132141
},
133142
__typename: 'Affiliation',
@@ -141,6 +150,7 @@ export const rawOrgUserListData = {
141150
user: {
142151
id: '74a41fa6-217c-45fb-98d1-78a303a193e4',
143152
userName: 'Abelardo_Carroll12@hotmail.com',
153+
displayName: 'Marc Carter',
144154
__typename: 'SharedUser',
145155
},
146156
__typename: 'Affiliation',
@@ -154,6 +164,7 @@ export const rawOrgUserListData = {
154164
user: {
155165
id: '147e47ec-3112-4fec-8075-cd83df7ae369',
156166
userName: 'Deron.Torphy@yahoo.com',
167+
displayName: 'Patty Ritchie',
157168
__typename: 'SharedUser',
158169
},
159170
__typename: 'Affiliation',
@@ -167,6 +178,7 @@ export const rawOrgUserListData = {
167178
user: {
168179
id: 'fd6b0c88-6874-4edf-84de-9075a7bde148',
169180
userName: 'Lesley_Pfannerstill@gmail.com',
181+
displayName: 'Sherman Quitzon',
170182
__typename: 'SharedUser',
171183
},
172184
__typename: 'Affiliation',
@@ -180,6 +192,7 @@ export const rawOrgUserListData = {
180192
user: {
181193
id: '562ff52c-407c-4484-94d8-a622e34e6bf5',
182194
userName: 'Toney.Morissette62@gmail.com',
195+
displayName: 'Terrell Herzog',
183196
__typename: 'SharedUser',
184197
},
185198
__typename: 'Affiliation',
@@ -193,6 +206,7 @@ export const rawOrgUserListData = {
193206
user: {
194207
id: '9f8a0866-a7cc-46c8-9527-d81ab8390ce1',
195208
userName: 'Armani.Murray@hotmail.com',
209+
displayName: 'Alexis Stehr',
196210
__typename: 'SharedUser',
197211
},
198212
__typename: 'Affiliation',
@@ -206,6 +220,7 @@ export const rawOrgUserListData = {
206220
user: {
207221
id: '125ab1fb-6531-4d3a-a5c0-943b1d05d43f',
208222
userName: 'Tiffany8@hotmail.com',
223+
displayName: 'Leon Zemlak IV',
209224
__typename: 'SharedUser',
210225
},
211226
__typename: 'Affiliation',
@@ -219,6 +234,7 @@ export const rawOrgUserListData = {
219234
user: {
220235
id: '65d38dd3-bcbe-4eab-9a57-54d52bc8a408',
221236
userName: 'Enos97@yahoo.com',
237+
displayName: 'Ms. Omar Wuckert',
222238
__typename: 'SharedUser',
223239
},
224240
__typename: 'Affiliation',
@@ -232,6 +248,7 @@ export const rawOrgUserListData = {
232248
user: {
233249
id: '9832b021-d452-442e-8d58-500fbf92a937',
234250
userName: 'Remington_Marquardt92@hotmail.com',
251+
displayName: 'Nichole Kozey',
235252
__typename: 'SharedUser',
236253
},
237254
__typename: 'Affiliation',
@@ -245,6 +262,7 @@ export const rawOrgUserListData = {
245262
user: {
246263
id: '66f9d0cf-ec7d-4541-b185-3b40a4a029f5',
247264
userName: 'Charlotte.Huel@hotmail.com',
265+
displayName: 'Miss Anna Powlowski',
248266
__typename: 'SharedUser',
249267
},
250268
__typename: 'Affiliation',

0 commit comments

Comments
 (0)