From 8f46d686acce2f57ae44b4aa71dfd90baaf96758 Mon Sep 17 00:00:00 2001 From: Samarjeet Date: Thu, 12 Aug 2021 17:04:02 +0530 Subject: [PATCH] cypress: fix flaky code highlight test (#4444) * cypress: fix flaky code highlight test * condition spelling fix --- cypress/integration/examples/code-highlighting.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/integration/examples/code-highlighting.ts b/cypress/integration/examples/code-highlighting.ts index a708ee889..d4d4353a2 100644 --- a/cypress/integration/examples/code-highlighting.ts +++ b/cypress/integration/examples/code-highlighting.ts @@ -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)') } )