DEV: Update `visit` paths in tests (#265)

Omitting `/` prefix was incorrect and could break in the future (see: https://github.com/discourse/discourse/pull/24445)
This commit is contained in:
Jarek Radosz 2023-11-21 22:23:35 +01:00 committed by GitHub
parent f83e6a1967
commit e468cf8ab0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -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 ===

View File

@ -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");

View File

@ -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");

View File

@ -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",
@ -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?",