mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 00:01:13 +08:00
fix translations impacting other tests (#9321)
This commit is contained in:
@ -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");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user