Update spell check cypress test
This commit is contained in:
parent
815dfe7b07
commit
a6c483c67c
|
|
@ -145,8 +145,8 @@ describe('Spellcheck', () => {
|
|||
cy.fakeLogin('rachel.green', 'test');
|
||||
cy.visit('/module/lohn-und-budget/');
|
||||
|
||||
cy.get('.spellcheck__correction').should('have.length', 0);
|
||||
cy.get('.submission-form-container__spellcheck').click();
|
||||
cy.get('.spellcheck__correction').should('have.length', 3);
|
||||
cy.getByDataCy('spellcheck-correction').should('have.length', 0);
|
||||
cy.getByDataCy('spellcheck-button').click();
|
||||
cy.getByDataCy('spellcheck-correction').should('have.length', 3);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
if (part.correct) {
|
||||
return `${previous}${part.text}`;
|
||||
} else {
|
||||
return `${previous}<span class="spellcheck__correction">${part.text}</span>`;
|
||||
return `${previous}<span data-cy="spellcheck-correction" class="spellcheck__correction">${part.text}</span>`;
|
||||
}
|
||||
}, '');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
</button>
|
||||
<button
|
||||
class="submission-form-container__submit submission-form-container__spellcheck button button--primary button--white-bg"
|
||||
data-cy="spellcheck-button"
|
||||
v-if="showSpellcheckButton"
|
||||
@click="$emit('spellcheck')"
|
||||
>{{ spellcheckText }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue