From 5b656e75ed535813a8ac2f02bcf8b3452af2e483 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Mon, 17 Oct 2022 16:45:21 +0200 Subject: [PATCH] Update spellcheck test to be less flaky --- client/cypress/e2e/frontend/spellcheck.spec.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/cypress/e2e/frontend/spellcheck.spec.js b/client/cypress/e2e/frontend/spellcheck.spec.js index f7e43c88..883cc9eb 100644 --- a/client/cypress/e2e/frontend/spellcheck.spec.js +++ b/client/cypress/e2e/frontend/spellcheck.spec.js @@ -2,6 +2,8 @@ import module from '../../fixtures/module.minimal'; const spellCheck = require('../../fixtures/spell-check.json'); +const userText = 'Hir ist ein Feler gewesen'; + const operations = { MeQuery: { me: { @@ -42,7 +44,7 @@ const operations = { 'solution': null, 'submission': { 'id': 'U3R1ZGVudFN1Ym1pc3Npb25Ob2RlOjE=', - 'text': 'Hir ist ein Feler gewesen', + 'text': userText, 'final': false, 'document': '', 'submissionFeedback': { @@ -144,6 +146,7 @@ describe('Spellcheck', () => { it('should highlight three errors', () => { cy.visit('/module/lohn-und-budget/'); + cy.getByDataCy('submission-textarea').should('have.value', userText); cy.getByDataCy('spellcheck-correction').should('have.length', 0); cy.getByDataCy('spellcheck-button').click(); cy.getByDataCy('spellcheck-correction').should('have.length', 3);