DEV: Bump dependencies and fix linting (#355)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||
import I18n from "discourse-i18n";
|
||||
import { i18n } from "discourse-i18n";
|
||||
|
||||
acceptance("Data Explorer Plugin | List Queries", function (needs) {
|
||||
needs.user();
|
||||
@@ -140,7 +140,7 @@ acceptance("Data Explorer Plugin | List Queries", function (needs) {
|
||||
.dom("div.query-list input.ember-text-field")
|
||||
.hasAttribute(
|
||||
"placeholder",
|
||||
I18n.t("explorer.search_placeholder"),
|
||||
i18n("explorer.search_placeholder"),
|
||||
"the search box was rendered"
|
||||
);
|
||||
|
||||
@@ -150,10 +150,7 @@ acceptance("Data Explorer Plugin | List Queries", function (needs) {
|
||||
|
||||
assert
|
||||
.dom("div.query-list button.btn-icon-text span.d-button-label")
|
||||
.hasText(
|
||||
I18n.t("explorer.import.label"),
|
||||
"the import button was rendered"
|
||||
);
|
||||
.hasText(i18n("explorer.import.label"), "the import button was rendered");
|
||||
|
||||
assert
|
||||
.dom("div.container table.recent-queries tbody tr")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { click, visit } from "@ember/test-helpers";
|
||||
import { test } from "qunit";
|
||||
import { acceptance } from "discourse/tests/helpers/qunit-helpers";
|
||||
import I18n from "discourse-i18n";
|
||||
import { i18n } from "discourse-i18n";
|
||||
|
||||
acceptance("Data Explorer Plugin | Run Query", function (needs) {
|
||||
needs.user();
|
||||
@@ -187,7 +187,7 @@ acceptance("Data Explorer Plugin | Run Query", function (needs) {
|
||||
|
||||
assert
|
||||
.dom("form.query-run button span")
|
||||
.hasText(I18n.t("explorer.run"), "the run button was rendered");
|
||||
.hasText(i18n("explorer.run"), "the run button was rendered");
|
||||
|
||||
await click("form.query-run button");
|
||||
|
||||
@@ -197,7 +197,7 @@ acceptance("Data Explorer Plugin | Run Query", function (needs) {
|
||||
|
||||
assert
|
||||
.dom("div.result-info button:nth-child(3) span")
|
||||
.hasText(I18n.t("explorer.show_graph"), "the chart button was rendered");
|
||||
.hasText(i18n("explorer.show_graph"), "the chart button was rendered");
|
||||
|
||||
await click("div.result-info button:nth-child(3)");
|
||||
|
||||
@@ -213,7 +213,7 @@ acceptance("Data Explorer Plugin | Run Query", function (needs) {
|
||||
|
||||
assert
|
||||
.dom("form.query-run button span")
|
||||
.hasText(I18n.t("explorer.run"), "the run button was rendered");
|
||||
.hasText(i18n("explorer.run"), "the run button was rendered");
|
||||
|
||||
await click("form.query-run button");
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { click, render } from "@ember/test-helpers";
|
||||
import { module, test } from "qunit";
|
||||
import { setupRenderingTest } from "discourse/tests/helpers/component-test";
|
||||
import I18n from "discourse-i18n";
|
||||
import { i18n } from "discourse-i18n";
|
||||
import QueryResult from "../../discourse/components/query-result";
|
||||
|
||||
module(
|
||||
@@ -24,15 +24,15 @@ module(
|
||||
|
||||
assert
|
||||
.dom("div.result-info button:nth-child(1) span")
|
||||
.hasText(I18n.t("explorer.download_json"), "renders the JSON button");
|
||||
.hasText(i18n("explorer.download_json"), "renders the JSON button");
|
||||
|
||||
assert
|
||||
.dom("div.result-info button:nth-child(2) span")
|
||||
.hasText(I18n.t("explorer.download_csv"), "renders the CSV button");
|
||||
.hasText(i18n("explorer.download_csv"), "renders the CSV button");
|
||||
|
||||
assert
|
||||
.dom("div.result-info button:nth-child(3) span")
|
||||
.hasText(I18n.t("explorer.show_graph"), "renders the chart button");
|
||||
.hasText(i18n("explorer.show_graph"), "renders the chart button");
|
||||
|
||||
assert.dom("div.result-about").exists("renders a query summary");
|
||||
|
||||
@@ -157,10 +157,7 @@ module(
|
||||
|
||||
assert
|
||||
.dom("div.result-info button:nth-child(3) span")
|
||||
.hasText(
|
||||
I18n.t("explorer.show_graph"),
|
||||
"the chart button was rendered"
|
||||
);
|
||||
.hasText(i18n("explorer.show_graph"), "the chart button was rendered");
|
||||
assert.dom("table").exists("the table was rendered");
|
||||
|
||||
await click("div.result-info button:nth-child(3)");
|
||||
@@ -168,7 +165,7 @@ module(
|
||||
assert
|
||||
.dom("div.result-info button:nth-child(3) span")
|
||||
.hasText(
|
||||
I18n.t("explorer.show_table"),
|
||||
i18n("explorer.show_table"),
|
||||
"the chart button was changed to the table button"
|
||||
);
|
||||
assert.dom("canvas").exists("the chart was rendered");
|
||||
@@ -177,7 +174,7 @@ module(
|
||||
assert
|
||||
.dom("div.result-info button:nth-child(3) span")
|
||||
.hasText(
|
||||
I18n.t("explorer.show_graph"),
|
||||
i18n("explorer.show_graph"),
|
||||
"the table button was changed to the chart button"
|
||||
);
|
||||
assert.dom("table").exists("the table was rendered");
|
||||
@@ -198,7 +195,7 @@ module(
|
||||
|
||||
assert
|
||||
.dom("div.result-info button:nth-child(3) span")
|
||||
.hasText(I18n.t("explorer.show_graph"));
|
||||
.hasText(i18n("explorer.show_graph"));
|
||||
});
|
||||
|
||||
test("doesn't render a chart button when data contains identifiers in the second column", async function (assert) {
|
||||
|
||||
Reference in New Issue
Block a user