You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expect(ReportActionsUtils.getRenamedAction(translateLocal,reportAction,isExpenseReport(report),'John')).toBe('John renamed to "New name" (previously "Old name")');
it('should use the display name and login when the requester has a first name',()=>{
2217
+
constuserDetail: PersonalDetails={
2218
+
accountID: 2,
2219
+
firstName: 'John',
2220
+
displayName: 'John Doe',
2221
+
login: 'john.doe@expensify.com',
2222
+
};
2223
+
2224
+
expect(getJoinRequestMessage(translateLocal,'Expensify',joinRequestAction,userDetail)).toBe('John Doe (john.doe@expensify.com) requested to join Expensify');
2225
+
});
2226
+
2227
+
it('should use only the login when the requester has no first name',()=>{
2228
+
constuserDetail: PersonalDetails={
2229
+
accountID: 2,
2230
+
displayName: 'John Doe',
2231
+
login: 'john.doe@expensify.com',
2232
+
};
2233
+
2234
+
expect(getJoinRequestMessage(translateLocal,'Expensify',joinRequestAction,userDetail)).toBe('john.doe@expensify.com requested to join Expensify');
2235
+
});
2236
+
2237
+
it('should fall back to the email from the original message when the personal details are missing',()=>{
2238
+
expect(getJoinRequestMessage(translateLocal,'Expensify',joinRequestAction,undefined)).toBe('requester@expensify.com requested to join Expensify');
2239
+
});
2240
+
2241
+
it('should fall back to an empty user when there are neither personal details nor an email',()=>{
0 commit comments