mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
Merge pull request #35514 from overleaf/worktree-mg-comment-fix
Split add-comment to own extension and always register command GitOrigin-RevId: 2e25643b7fe4ff30693479975945d94cc586bd61
This commit is contained in:
+32
@@ -217,6 +217,38 @@ describe('<EditorFloatingMenu />', function () {
|
||||
})
|
||||
})
|
||||
|
||||
describe('adding a comment with the floating menu disabled', function () {
|
||||
describe('when migrationEnabled is true', function () {
|
||||
it('still creates a pending comment via the command', function () {
|
||||
mountEditor({ migrationEnabled: true, floatingMenu: false })
|
||||
|
||||
// The quick-actions popup stays hidden...
|
||||
cy.get('.editor-floating-menu').should('not.exist')
|
||||
|
||||
// The toolbar / menu / shortcut path (all dispatch this event) works.
|
||||
cy.window().then(win => {
|
||||
win.dispatchEvent(new Event('add-new-review-comment'))
|
||||
})
|
||||
|
||||
cy.get('.ol-cm-change-c').should('exist')
|
||||
})
|
||||
})
|
||||
|
||||
describe('when migrationEnabled is false', function () {
|
||||
it('still creates a pending comment via the command (legacy tooltip)', function () {
|
||||
mountEditor({ migrationEnabled: false, floatingMenu: false })
|
||||
|
||||
cy.get('.review-tooltip-menu').should('not.exist')
|
||||
|
||||
cy.window().then(win => {
|
||||
win.dispatchEvent(new Event('add-new-review-comment'))
|
||||
})
|
||||
|
||||
cy.get('.ol-cm-change-c').should('exist')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('bulk tracked-change actions', function () {
|
||||
beforeEach(function () {
|
||||
mountEditorWithChanges()
|
||||
|
||||
Reference in New Issue
Block a user