mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Merge pull request #29679 from overleaf/mj-references-server-pro
[server-pro] Stop running references in server pro GitOrigin-RevId: 41a9c3ca025bb3b631c3007c88f0fea6efbbe4fb
This commit is contained in:
committed by
Copybot
parent
e81ca06f9c
commit
06a1fc32ec
@@ -206,6 +206,38 @@ describe('editor', function () {
|
||||
})
|
||||
})
|
||||
|
||||
describe('cite key search', function () {
|
||||
it('can insert citation from cite key', function () {
|
||||
createNewFile()
|
||||
cy.get('.cm-line').type('\\cite{{}gre')
|
||||
cy.findByRole('listbox').within(() => {
|
||||
cy.findByRole('option').should('contain.text', 'greenwade93').click()
|
||||
})
|
||||
cy.get('.cm-line').should('have.text', '\\cite{greenwade93}')
|
||||
})
|
||||
|
||||
it('updates citation search when bib file is changed', function () {
|
||||
createNewFile()
|
||||
cy.get('.cm-line').type('\\cite{{}new')
|
||||
// Wait a reasonable time to ensure the autocomplete would've appeared if there were any matches
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(200)
|
||||
cy.findByRole('listbox').should('not.exist')
|
||||
cy.findByRole('treeitem', { name: 'sample.bib' }).click()
|
||||
cy.get('.cm-line')
|
||||
.last()
|
||||
.type(
|
||||
'\n@article{{}newkey2024,\n author = {{}Doe, John},\n title = {{}A New Article},\n journal = {{}Journal of Testing},\n year = 2024\n}\n'
|
||||
)
|
||||
createNewFile()
|
||||
cy.get('.cm-line').type('\\cite{{}new')
|
||||
cy.findByRole('listbox').within(() => {
|
||||
cy.findByRole('option').should('contain.text', 'newkey2024').click()
|
||||
})
|
||||
cy.get('.cm-line').should('have.text', '\\cite{newkey2024}')
|
||||
})
|
||||
})
|
||||
|
||||
describe('layout selector', function () {
|
||||
it('show editor only and switch between editor and pdf', function () {
|
||||
cy.findByRole('region', { name: 'PDF preview and logs' }).should(
|
||||
|
||||
Reference in New Issue
Block a user