A plugin that allows to transform regular strings into their pseudo-localized variant. It's a wrapper around a small fork of https://github.com/tryggvigy/pseudo-localization.
We highly recommend using this plugin in addition to a visual regression testing tool.
Installation
$ yarn add cypress-pseudo-localization
$ npm i --save cypress-pseudo-localization
In your code
Inside the cypress/support/commands.js
file, add the following at the top:
import "cypress-pseudo-localization";
And then, in your cypress tests:
beforeEach(() => {
cy.visit("https://your-page-some-where.com/");
cy.pseudoLocalize();
});
afterEach(cy.stopPseudoLocalize);