mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
[web] update notification settings copy for mentions (#35953)
GitOrigin-RevId: cc86f0931f6740f1d509118ee558719bc3559816
This commit is contained in:
+23
@@ -100,6 +100,7 @@ function renderComponent(props: { permissionsLevel?: string } = {}) {
|
||||
describe('<ProjectNotificationsSetting />', function () {
|
||||
afterEach(function () {
|
||||
fetchMock.removeRoutes().clearHistory()
|
||||
window.metaAttributesCache.delete('ol-splitTestVariants')
|
||||
})
|
||||
|
||||
it('shows loading indicator while preferences are loading', async function () {
|
||||
@@ -168,6 +169,28 @@ describe('<ProjectNotificationsSetting />', function () {
|
||||
).to.be.false
|
||||
})
|
||||
|
||||
it('shows mentions copy when comment-mentions is enabled', async function () {
|
||||
window.metaAttributesCache.set('ol-splitTestVariants', {
|
||||
'comment-mentions': 'enabled',
|
||||
})
|
||||
fetchMock.get(preferencesUrl, repliesOnlyPreferences)
|
||||
|
||||
renderComponent()
|
||||
|
||||
await waitFor(
|
||||
() =>
|
||||
expect(
|
||||
screen.getByLabelText('Mentions and replies only', { exact: false })
|
||||
).to.exist
|
||||
)
|
||||
expect(
|
||||
screen.getByText(
|
||||
'You’ll be notified about @mentions, replies and activity on your track changes.',
|
||||
{ exact: false }
|
||||
)
|
||||
).to.exist
|
||||
})
|
||||
|
||||
it('selects "Off" when all notifications are off', async function () {
|
||||
fetchMock.get(preferencesUrl, allNotificationsOff)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user