fix translations impacting other tests (#9321)

This commit is contained in:
Joffrey JAFFEUX
2020-03-31 09:26:35 +02:00
committed by GitHub
parent acc0a9673e
commit cbd72d51b4

View File

@ -204,11 +204,17 @@ widgetTest("content with translatedLabel", {
widgetTest("content with label", { widgetTest("content with label", {
template: TEMPLATE, template: TEMPLATE,
_translations: I18n.translations,
beforeEach() { beforeEach() {
I18n.translations = { en: { js: { foo: "FooBaz" } } }; I18n.translations = { en: { js: { foo: "FooBaz" } } };
this.setProperties(DEFAULT_CONTENT); this.setProperties(DEFAULT_CONTENT);
}, },
afterEach() {
I18n.translations = this._translations;
},
test(assert) { test(assert) {
assert.equal(rowById(1).innerText.trim(), "FooBaz"); assert.equal(rowById(1).innerText.trim(), "FooBaz");
} }