mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
Merge pull request #24467 from overleaf/msm-fix-sp-e2e
[CE/SP] e2e fixes GitOrigin-RevId: 32722dd7d7520e87cd8d8cf6dbdadec73b27caa6
This commit is contained in:
@@ -149,10 +149,10 @@ describe('editor', () => {
|
||||
openFile(fileName, 'static')
|
||||
|
||||
cy.log('reject changes')
|
||||
cy.findByText('Review').click()
|
||||
cy.contains('.toolbar-item', 'Review').click()
|
||||
cy.get('.cm-content').should('not.contain.text', oldContent)
|
||||
cy.findByText('Reject').click({ force: true })
|
||||
cy.findByText('Review').click()
|
||||
cy.findByText('Reject change').click({ force: true })
|
||||
cy.contains('.toolbar-item', 'Review').click()
|
||||
|
||||
cy.log('recompile to force flush')
|
||||
recompile()
|
||||
@@ -205,10 +205,10 @@ describe('editor', () => {
|
||||
openFile(fileName, 'static')
|
||||
|
||||
cy.log('reject changes')
|
||||
cy.findByText('Review').click()
|
||||
cy.contains('.toolbar-item', 'Review').click()
|
||||
cy.get('.cm-content').should('not.contain.text', oldContent)
|
||||
cy.findAllByText('Reject').first().click({ force: true })
|
||||
cy.findByText('Review').click()
|
||||
cy.findAllByText('Reject change').first().click({ force: true })
|
||||
cy.contains('.toolbar-item', 'Review').click()
|
||||
|
||||
cy.log('recompile to force flush')
|
||||
recompile()
|
||||
|
||||
@@ -24,7 +24,7 @@ export function prepareWaitForNextCompileSlot() {
|
||||
queueReset()
|
||||
triggerCompile()
|
||||
cy.log('Wait for compile to finish')
|
||||
cy.findByText('Recompile')
|
||||
cy.findByText('Recompile').should('be.visible')
|
||||
})
|
||||
}
|
||||
function recompile() {
|
||||
|
||||
@@ -212,11 +212,11 @@ export function createNewFile() {
|
||||
|
||||
export function toggleTrackChanges(state: boolean) {
|
||||
cy.findByText('Review').click()
|
||||
cy.get('.rp-tc-state-collapse').then(el => {
|
||||
// TODO: simplify this in the frontend?
|
||||
if (el.hasClass('rp-tc-state-collapse-on')) {
|
||||
// make track-changes switches visible
|
||||
cy.get('.rp-tc-state-collapse').click()
|
||||
cy.get('.track-changes-menu-button').then(el => {
|
||||
// when the menu is expanded renders the `expand_more` icon,
|
||||
// and the `chevron_right` icon when it's collapsed
|
||||
if (!el.text().includes('expand_more')) {
|
||||
el.click()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -241,5 +241,5 @@ export function toggleTrackChanges(state: boolean) {
|
||||
cy.wait(alias)
|
||||
})
|
||||
})
|
||||
cy.findByText('Review').click()
|
||||
cy.contains('.toolbar-item', 'Review').click()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user