mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #36408 from overleaf/mj-context-menu-flag-teardown
[web] Tear down editor-context-menu flag GitOrigin-RevId: 80cc2ebaf62ec1bd6064b0f96b884d159a9d4b5f
This commit is contained in:
committed by
Copybot
parent
38eb3ddfa6
commit
e8ee19d17d
-44
@@ -127,9 +127,6 @@ const grantClipboardPermissions = () => {
|
||||
describe('editor context menu', { scrollBehavior: false }, function () {
|
||||
beforeEach(function () {
|
||||
window.metaAttributesCache.set('ol-preventCompileOnLoad', true)
|
||||
window.metaAttributesCache.set('ol-splitTestVariants', {
|
||||
'editor-context-menu': 'enabled',
|
||||
})
|
||||
cy.intercept('POST', '/project/*/track_changes', {
|
||||
statusCode: 200,
|
||||
body: {},
|
||||
@@ -709,27 +706,6 @@ describe('editor context menu', { scrollBehavior: false }, function () {
|
||||
})
|
||||
})
|
||||
|
||||
describe('when feature flag is disabled', function () {
|
||||
it('should not show the context menu', function () {
|
||||
window.metaAttributesCache.set('ol-splitTestVariants', {
|
||||
'editor-context-menu': 'default',
|
||||
})
|
||||
|
||||
const scope = mockScope()
|
||||
|
||||
cy.mount(
|
||||
<TestContainer>
|
||||
<EditorProviders scope={scope}>
|
||||
<CodeMirrorEditor />
|
||||
</EditorProviders>
|
||||
</TestContainer>
|
||||
)
|
||||
|
||||
cy.get('.cm-line').eq(10).rightclick()
|
||||
cy.findByRole('menu').should('not.exist')
|
||||
})
|
||||
})
|
||||
|
||||
describe('when a user does not have edit permissions', function () {
|
||||
it('should only show Copy, Select all, Comment (hidden Cut, Paste, Delete, Suggest edits)', function () {
|
||||
const scope = mockScope()
|
||||
@@ -1107,7 +1083,6 @@ describe('editor context menu', { scrollBehavior: false }, function () {
|
||||
|
||||
it('should hide button when visual preview is enabled', function () {
|
||||
window.metaAttributesCache.set('ol-splitTestVariants', {
|
||||
'editor-context-menu': 'enabled',
|
||||
'visual-preview': 'enabled',
|
||||
})
|
||||
|
||||
@@ -1367,25 +1342,6 @@ describe('editor context menu', { scrollBehavior: false }, function () {
|
||||
cy.get('body').type('{esc}')
|
||||
cy.findByRole('menu').should('not.exist')
|
||||
})
|
||||
|
||||
it('should not show context menu on gutter when feature flag is disabled', function () {
|
||||
window.metaAttributesCache.set('ol-splitTestVariants', {
|
||||
'editor-context-menu': 'default',
|
||||
})
|
||||
|
||||
const scope = mockScope()
|
||||
|
||||
cy.mount(
|
||||
<TestContainer>
|
||||
<EditorProviders scope={scope}>
|
||||
<CodeMirrorEditor />
|
||||
</EditorProviders>
|
||||
</TestContainer>
|
||||
)
|
||||
|
||||
cy.get('.cm-gutterElement').eq(5).rightclick()
|
||||
cy.findByRole('menu').should('not.exist')
|
||||
})
|
||||
})
|
||||
|
||||
describe('when right-clicking inside the open menu', function () {
|
||||
|
||||
Reference in New Issue
Block a user