mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
Add 10 seconds delay before showing grammarly warning
GitOrigin-RevId: 11bb3ca5704ef5cc782d14eb6f4f10a1fa2a656e
This commit is contained in:
+7
-7
@@ -29,7 +29,7 @@ describe('<GrammarlyWarning />', function () {
|
||||
grammarlyStub.returns(true)
|
||||
window.metaAttributesCache.set('ol-showNewSourceEditorOption', true)
|
||||
|
||||
renderWithEditorContext(<GrammarlyWarning />, {
|
||||
renderWithEditorContext(<GrammarlyWarning delay={100} />, {
|
||||
scope: {
|
||||
editor: {
|
||||
newSourceEditor: true,
|
||||
@@ -48,7 +48,7 @@ describe('<GrammarlyWarning />', function () {
|
||||
grammarlyStub.returns(false)
|
||||
window.metaAttributesCache.set('ol-showNewSourceEditorOption', true)
|
||||
|
||||
renderWithEditorContext(<GrammarlyWarning />, {
|
||||
renderWithEditorContext(<GrammarlyWarning delay={100} />, {
|
||||
scope: {
|
||||
editor: {
|
||||
newSourceEditor: true,
|
||||
@@ -70,7 +70,7 @@ describe('<GrammarlyWarning />', function () {
|
||||
localStorage.setItem('editor.has_dismissed_grammarly_warning', true)
|
||||
window.metaAttributesCache.set('ol-showNewSourceEditorOption', true)
|
||||
|
||||
renderWithEditorContext(<GrammarlyWarning />, {
|
||||
renderWithEditorContext(<GrammarlyWarning delay={100} />, {
|
||||
scope: {
|
||||
editor: {
|
||||
newSourceEditor: true,
|
||||
@@ -91,7 +91,7 @@ describe('<GrammarlyWarning />', function () {
|
||||
grammarlyStub.returns(true)
|
||||
window.metaAttributesCache.set('ol-showNewSourceEditorOption', false)
|
||||
|
||||
renderWithEditorContext(<GrammarlyWarning />)
|
||||
renderWithEditorContext(<GrammarlyWarning delay={100} />)
|
||||
|
||||
await waitFor(() => {
|
||||
expect(
|
||||
@@ -106,7 +106,7 @@ describe('<GrammarlyWarning />', function () {
|
||||
grammarlyStub.returns(true)
|
||||
window.metaAttributesCache.set('ol-showNewSourceEditorOption', true)
|
||||
|
||||
renderWithEditorContext(<GrammarlyWarning />, {
|
||||
renderWithEditorContext(<GrammarlyWarning delay={100} />, {
|
||||
scope: {
|
||||
editor: {
|
||||
newSourceEditor: false,
|
||||
@@ -127,7 +127,7 @@ describe('<GrammarlyWarning />', function () {
|
||||
grammarlyStub.returns(true)
|
||||
window.metaAttributesCache.set('ol-showNewSourceEditorOption', true)
|
||||
|
||||
renderWithEditorContext(<GrammarlyWarning />, {
|
||||
renderWithEditorContext(<GrammarlyWarning delay={100} />, {
|
||||
scope: {
|
||||
editor: {
|
||||
newSourceEditor: true,
|
||||
@@ -149,7 +149,7 @@ describe('<GrammarlyWarning />', function () {
|
||||
grammarlyStub.returns(true)
|
||||
window.metaAttributesCache.set('ol-showNewSourceEditorOption', true)
|
||||
|
||||
renderWithEditorContext(<GrammarlyWarning />, {
|
||||
renderWithEditorContext(<GrammarlyWarning delay={100} />, {
|
||||
scope: {
|
||||
editor: {
|
||||
newSourceEditor: true,
|
||||
|
||||
Reference in New Issue
Block a user