Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
DEV: Add download submissions test
Dieser Commit ist enthalten in:
Ursprung
64b1c0264e
Commit
887057d0d2
1 geänderte Dateien mit 21 neuen und 0 gelöschten Zeilen
|
@ -205,4 +205,25 @@ acceptance("Admin | Submissions", function (needs) {
|
||||||
.dom("table thead th:nth-child(2)")
|
.dom("table thead th:nth-child(2)")
|
||||||
.hasText("User", "User column is displayed after reset");
|
.hasText("User", "User column is displayed after reset");
|
||||||
});
|
});
|
||||||
|
test("Download submissions", async (assert) => {
|
||||||
|
await visit("/admin/wizards/submissions");
|
||||||
|
const wizards = await selectKit(".select-kit");
|
||||||
|
await wizards.expand();
|
||||||
|
await wizards.selectRowByValue("this_is_testing_wizard");
|
||||||
|
|
||||||
|
const downloadLinks = findAll(".download-link");
|
||||||
|
assert.ok(downloadLinks.length > 1, "Download links are present");
|
||||||
|
|
||||||
|
const downloadLink = downloadLinks[1];
|
||||||
|
await click(downloadLink);
|
||||||
|
|
||||||
|
const expectedURL =
|
||||||
|
"/admin/wizards/submissions/this_is_testing_wizard/download";
|
||||||
|
const actualURL = new URL(downloadLink.href);
|
||||||
|
assert.equal(
|
||||||
|
actualURL.pathname,
|
||||||
|
expectedURL,
|
||||||
|
"Download link has correct URL"
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Laden …
In neuem Issue referenzieren