mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Show dashboard notification for unconfirmed emails and untrusted secondary emails (#23919)
* Show an aggressive dashboard notification for unconfirmed emails Show a persistent dashboard notification for untrusted secondary emails * For emails before the cutoffDate, start displaying the notification on the deletionDate and show the notification for 90 days * Update the email deletion logic for displaying the email notification and update test * Update test GitOrigin-RevId: 1b0e44f79592292d428c634dc1ec4df9e6ceaeb4
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
unconfirmedUserData,
|
||||
fakeUsersData,
|
||||
unconfirmedCommonsUserData,
|
||||
untrustedUserData,
|
||||
} from '../fixtures/test-user-email-data'
|
||||
import localStorage from '@/infrastructure/local-storage'
|
||||
|
||||
@@ -51,7 +52,7 @@ describe('UserEmailContext', function () {
|
||||
await fetchMock.flush(true)
|
||||
expect(fetchMock.calls()).to.have.lengthOf(1)
|
||||
expect(result.current.state.data.byId).to.deep.equal({
|
||||
'bar@overleaf.com': confirmedUserData,
|
||||
'bar@overleaf.com': { ...untrustedUserData, ...confirmedUserData },
|
||||
'baz@overleaf.com': unconfirmedUserData,
|
||||
'foo@overleaf.com': professionalUserData,
|
||||
'qux@overleaf.com': unconfirmedCommonsUserData,
|
||||
|
||||
@@ -12,6 +12,11 @@ export const unconfirmedUserData: UserEmailData = {
|
||||
default: false,
|
||||
}
|
||||
|
||||
export const untrustedUserData = {
|
||||
...confirmedUserData,
|
||||
lastConfirmedAt: '2024-01-01T10:59:44.139Z',
|
||||
}
|
||||
|
||||
export const professionalUserData: UserEmailData & {
|
||||
affiliation: Affiliation
|
||||
} = {
|
||||
@@ -112,6 +117,7 @@ export const ssoUserData: UserEmailData = {
|
||||
export const fakeUsersData = [
|
||||
{ ...confirmedUserData },
|
||||
{ ...unconfirmedUserData },
|
||||
{ ...untrustedUserData },
|
||||
{ ...professionalUserData },
|
||||
{ ...unconfirmedCommonsUserData },
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user