mirror of
https://github.com/discourse/discourse.git
synced 2025-06-24 00:21:33 +08:00
DEV: Consolidate i18n import paths (#29804)
Enables our new eslint rules which enforce consistent i18n imports. For more info, see 0d58b40cd7
This commit is contained in:
@ -3,7 +3,7 @@ import hbs from "htmlbars-inline-precompile";
|
||||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import { queryAll } from "discourse/tests/helpers/qunit-helpers";
|
||||
import I18n from "discourse-i18n";
|
||||
import { i18n } from 'discourse-i18n';
|
||||
|
||||
const TWO_OPTIONS = [
|
||||
{ id: "1ddc47be0d2315b9711ee8526ca9d83f", html: "This", votes: 5, rank: 0 },
|
||||
@ -188,13 +188,13 @@ module("Poll | Component | poll-results-standard", function (hooks) {
|
||||
/>`);
|
||||
|
||||
let percentages = queryAll(".option .absolute");
|
||||
assert.dom(percentages[0]).hasText(I18n.t("poll.votes", { count: 5 }));
|
||||
assert.dom(percentages[1]).hasText(I18n.t("poll.votes", { count: 4 }));
|
||||
assert.dom(percentages[2]).hasText(I18n.t("poll.votes", { count: 2 }));
|
||||
assert.dom(percentages[3]).hasText(I18n.t("poll.votes", { count: 1 }));
|
||||
assert.dom(percentages[0]).hasText(i18n("poll.votes", { count: 5 }));
|
||||
assert.dom(percentages[1]).hasText(i18n("poll.votes", { count: 4 }));
|
||||
assert.dom(percentages[2]).hasText(i18n("poll.votes", { count: 2 }));
|
||||
assert.dom(percentages[3]).hasText(i18n("poll.votes", { count: 1 }));
|
||||
|
||||
assert.dom(queryAll(".option")[3].querySelectorAll("span")[1]).hasText("a");
|
||||
assert.dom(percentages[4]).hasText(I18n.t("poll.votes", { count: 1 }));
|
||||
assert.dom(percentages[4]).hasText(i18n("poll.votes", { count: 1 }));
|
||||
assert.dom(queryAll(".option")[4].querySelectorAll("span")[1]).hasText("b");
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user