Assert that the Rich Text document is ready before continuing with Cypress tests (#12612)

GitOrigin-RevId: fb0755200366e1129ee86ba9a439210ffe64e205
This commit is contained in:
Alf Eaton 2023-04-14 09:57:56 +01:00 committed by Copybot
parent 6ca565fa90
commit e09a5f3adf
3 changed files with 9 additions and 0 deletions

View file

@ -20,6 +20,9 @@ const mountEditor = (content: string) => {
</EditorProviders>
</Container>
)
// wait for the content to be parsed and revealed
cy.get('.cm-content').should('have.css', 'opacity', '1')
}
describe('<CodeMirrorEditor/> lists in Rich Text mode', function () {

View file

@ -32,6 +32,9 @@ const mountEditor = (content: string) => {
</EditorProviders>
</Container>
)
// wait for the content to be parsed and revealed
cy.get('.cm-content').should('have.css', 'opacity', '1')
}
describe('<CodeMirrorEditor/> toolbar in Rich Text mode', function () {

View file

@ -34,6 +34,9 @@ describe('<CodeMirrorEditor/> in Rich Text mode', function () {
</Container>
)
// wait for the content to be parsed and revealed
cy.get('.cm-content').should('have.css', 'opacity', '1')
cy.get('.cm-line').eq(0).click().as('first-line')
cy.get('.cm-line').eq(1).as('second-line')
cy.get('.cm-line').eq(2).as('third-line')