2018-06-18 18:31:56 +08:00
|
|
|
import { acceptance } from "helpers/qunit-helpers";
|
|
|
|
|
|
|
|
acceptance("Reports", {
|
|
|
|
loggedIn: true
|
|
|
|
});
|
|
|
|
|
2018-07-19 22:40:12 +08:00
|
|
|
QUnit.test("Visit reports page", async assert => {
|
|
|
|
await visit("/admin/reports");
|
2018-06-18 18:31:56 +08:00
|
|
|
|
2018-07-19 22:40:12 +08:00
|
|
|
assert.equal($(".reports-list .report").length, 1);
|
2018-06-18 18:31:56 +08:00
|
|
|
|
2018-07-19 22:40:12 +08:00
|
|
|
const $report = $(".reports-list .report:first-child");
|
2018-06-18 18:31:56 +08:00
|
|
|
|
2018-07-19 22:40:12 +08:00
|
|
|
assert.equal(
|
|
|
|
$report
|
|
|
|
.find(".report-title")
|
|
|
|
.html()
|
|
|
|
.trim(),
|
|
|
|
"My report"
|
|
|
|
);
|
2018-06-18 18:31:56 +08:00
|
|
|
|
2018-07-19 22:40:12 +08:00
|
|
|
assert.equal(
|
|
|
|
$report
|
|
|
|
.find(".report-description")
|
|
|
|
.html()
|
|
|
|
.trim(),
|
|
|
|
"List of my activities"
|
|
|
|
);
|
2018-06-18 18:31:56 +08:00
|
|
|
});
|