Skip to content

Commit

Permalink
DEV: Update visit paths in tests (#265)
Browse files Browse the repository at this point in the history
Omitting `/` prefix was incorrect and could break in the future (see: discourse/discourse#24445)
  • Loading branch information
CvX authored Nov 21, 2023
1 parent f83e6a1 commit e468cf8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/javascripts/acceptance/list-queries-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ acceptance("Data Explorer Plugin | List Queries", function (needs) {
});

test("it renders the page with the list of queries", async function (assert) {
await visit("admin/plugins/explorer");
await visit("/admin/plugins/explorer");

assert.ok(
query("div.query-list input.ember-text-field").placeholder ===
Expand Down
2 changes: 1 addition & 1 deletion test/javascripts/acceptance/new-query-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ acceptance("Data Explorer Plugin | New Query", function (needs) {
});

test("creates a new query", async function (assert) {
await visit("admin/plugins/explorer");
await visit("/admin/plugins/explorer");

// select new query button
await click(".query-list button");
Expand Down
2 changes: 1 addition & 1 deletion test/javascripts/acceptance/param-input-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ acceptance("Data Explorer Plugin | Param Input", function (needs) {
});

test("it puts params for the query into the url", async function (assert) {
await visit("admin/plugins/explorer?id=-6");
await visit("/admin/plugins/explorer?id=-6");
const monthsAgoValue = "2";
await fillIn(".query-params input", monthsAgoValue);
await click("form.query-run button");
Expand Down
4 changes: 2 additions & 2 deletions test/javascripts/acceptance/run-query-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ acceptance("Data Explorer Plugin | Run Query", function (needs) {
});

test("it runs query and renders data and a chart", async function (assert) {
await visit("admin/plugins/explorer?id=-6");
await visit("/admin/plugins/explorer?id=-6");

assert.ok(
query("div.name h1").innerText.trim() === "Top 100 Likers",
Expand Down Expand Up @@ -220,7 +220,7 @@ acceptance("Data Explorer Plugin | Run Query", function (needs) {
});

test("it runs query and renders 0, false, and NULL values correctly", async function (assert) {
await visit("admin/plugins/explorer?id=2");
await visit("/admin/plugins/explorer?id=2");

assert.ok(
query("div.name h1").innerText.trim() === "What about 0?",
Expand Down

0 comments on commit e468cf8

Please sign in to comment.