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.fakeLogin('rachel.green', 'test');
|
||||||
cy.visit('/module/lohn-und-budget/');
|
cy.visit('/module/lohn-und-budget/');
|
||||||
|
|
||||||
cy.get('.spellcheck__correction').should('have.length', 0);
|
cy.getByDataCy('spellcheck-correction').should('have.length', 0);
|
||||||
cy.get('.submission-form-container__spellcheck').click();
|
cy.getByDataCy('spellcheck-button').click();
|
||||||
cy.get('.spellcheck__correction').should('have.length', 3);
|
cy.getByDataCy('spellcheck-correction').should('have.length', 3);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
if (part.correct) {
|
if (part.correct) {
|
||||||
return `${previous}${part.text}`;
|
return `${previous}${part.text}`;
|
||||||
} else {
|
} 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>
|
||||||
<button
|
<button
|
||||||
class="submission-form-container__submit submission-form-container__spellcheck button button--primary button--white-bg"
|
class="submission-form-container__submit submission-form-container__spellcheck button button--primary button--white-bg"
|
||||||
|
data-cy="spellcheck-button"
|
||||||
v-if="showSpellcheckButton"
|
v-if="showSpellcheckButton"
|
||||||
@click="$emit('spellcheck')"
|
@click="$emit('spellcheck')"
|
||||||
>{{ spellcheckText }}
|
>{{ spellcheckText }}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue