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
|
|
|
});
|