mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-10 17:24:02 +02:00
cypress: fix flaky code highlight test (#4444)
* cypress: fix flaky code highlight test * condition spelling fix
This commit is contained in:
@@ -24,6 +24,7 @@ describe('code highlighting', () => {
|
|||||||
() => {
|
() => {
|
||||||
const JSCode = 'const slateVar = 30;{enter}'
|
const JSCode = 'const slateVar = 30;{enter}'
|
||||||
cy.get('select').select('JavaScript') // Select the 'JavaScript' option
|
cy.get('select').select('JavaScript') // Select the 'JavaScript' option
|
||||||
|
cy.get('select').should('have.value', 'js') // Confirm value to avoid race condition
|
||||||
|
|
||||||
cy.get(slateEditor)
|
cy.get(slateEditor)
|
||||||
.type('{movetostart}')
|
.type('{movetostart}')
|
||||||
@@ -34,8 +35,7 @@ describe('code highlighting', () => {
|
|||||||
.eq(0)
|
.eq(0)
|
||||||
.find(leafNode)
|
.find(leafNode)
|
||||||
.eq(0)
|
.eq(0)
|
||||||
// test is failing in CI, but is not actually due to breaking behavior
|
.should('contain', 'const')
|
||||||
//.should('contain', 'const')
|
|
||||||
.should('have.css', 'color', 'rgb(0, 119, 170)')
|
.should('have.css', 'color', 'rgb(0, 119, 170)')
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user