1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-07-31 04:20:26 +02:00

cypress: fix flaky code highlight test (#4444)

* cypress: fix flaky code highlight test

* condition spelling fix
This commit is contained in:
Samarjeet
2021-08-12 17:04:02 +05:30
committed by GitHub
parent 25afbd4300
commit 8f46d686ac

View File

@@ -24,6 +24,7 @@ describe('code highlighting', () => {
() => {
const JSCode = 'const slateVar = 30;{enter}'
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)
.type('{movetostart}')
@@ -34,8 +35,7 @@ describe('code highlighting', () => {
.eq(0)
.find(leafNode)
.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)')
}
)