2018-06-18 06:31:56 -04:00
|
|
|
import { acceptance } from "helpers/qunit-helpers";
|
|
|
|
|
|
|
|
acceptance("Reports", {
|
|
|
|
loggedIn: true,
|
|
|
|
});
|
|
|
|
|
2018-07-19 10:40:12 -04:00
|
|
|
QUnit.test("Visit reports page", async (assert) => {
|
|
|
|
await visit("/admin/reports");
|
2018-06-18 06:31:56 -04:00
|
|
|
|
2018-07-19 10:40:12 -04:00
|
|
|
assert.equal($(".reports-list .report").length, 1);
|
2018-06-18 06:31:56 -04:00
|
|
|
|
2018-07-19 10:40:12 -04:00
|
|
|
const $report = $(".reports-list .report:first-child");
|
2018-06-18 06:31:56 -04:00
|
|
|
|
2018-07-19 10:40:12 -04:00
|
|
|
assert.equal($report.find(".report-title").html().trim(), "My report");
|
2018-06-18 06:31:56 -04:00
|
|
|
|
2018-07-19 10:40:12 -04:00
|
|
|
assert.equal(
|
|
|
|
$report.find(".report-description").html().trim(),
|
|
|
|
"List of my activities"
|
|
|
|
);
|
2018-06-18 06:31:56 -04:00
|
|
|
});
|
2019-07-03 08:47:36 -04:00
|
|
|
|
|
|
|
QUnit.test("Visit report page", async (assert) => {
|
2019-07-03 10:32:27 -04:00
|
|
|
await visit("/admin/reports/staff_logins");
|
2019-07-03 09:43:01 -04:00
|
|
|
|
2019-07-03 08:47:36 -04:00
|
|
|
assert.ok(exists(".export-csv-btn"));
|
|
|
|
});
|