dashboard next: adds basic spec

This commit is contained in:
Joffrey JAFFEUX 2018-04-25 10:28:41 +02:00 committed by GitHub
parent ee82abba3c
commit a9c3437d51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 277 additions and 0 deletions

View File

@ -0,0 +1,16 @@
import {
acceptance
}
from "helpers/qunit-helpers";
acceptance("Dashboard Next", {
loggedIn: true
});
QUnit.test("Vist dashboard next page", assert => {
visit("/admin/dashboard-next");
andThen(() => {
assert.ok($('.dashboard-next').length, "has dashboard-next class");
});
});

View File

@ -0,0 +1,146 @@
export default {
"/admin/dashboard-next.json": {
"global_reports": [{
"type": "signups",
"title": "New Users",
"xaxis": "Day",
"yaxis": "Number of new users",
"data": [{
"x": "2018-04-11",
"y": 10
}, {
"x": "2018-04-12",
"y": 10
}, {
"x": "2018-04-13",
"y": 58
}, {
"x": "2018-04-15",
"y": 10
}, {
"x": "2018-04-16",
"y": 10
}, {
"x": "2018-04-17",
"y": 19
}, {
"x": "2018-04-19",
"y": 19
}],
"total": 136,
"start_date": "2018-03-26T00:00:00.000Z",
"end_date": "2018-04-25T23:59:59.999Z",
"category_id": null,
"group_id": null,
"prev30Days": 0,
"labels": null
}, {
"type": "topics",
"title": "Topics",
"xaxis": "Day",
"yaxis": "Number of new topics",
"data": [{
"x": "2018-04-11",
"y": 10
}, {
"x": "2018-04-12",
"y": 10
}, {
"x": "2018-04-13",
"y": 60
}, {
"x": "2018-04-15",
"y": 10
}, {
"x": "2018-04-16",
"y": 10
}, {
"x": "2018-04-17",
"y": 10
}, {
"x": "2018-04-19",
"y": 10
}, {
"x": "2018-04-20",
"y": 1
}],
"total": 121,
"start_date": "2018-03-26T00:00:00.000Z",
"end_date": "2018-04-25T23:59:59.999Z",
"category_id": null,
"group_id": null,
"prev30Days": 0,
"labels": null
}, {
"type": "trending_search",
"title": "Trending search",
"xaxis": "translation missing: en.reports.trending_search.xaxis",
"yaxis": "translation missing: en.reports.trending_search.yaxis",
"data": [
["lon", 3, 1],
["pub", 1, 1],
["something", 1, 1]
],
"total": null,
"start_date": "2018-03-26T00:00:00.000Z",
"end_date": "2018-04-25T23:59:59.999Z",
"category_id": null,
"group_id": null,
"prev30Days": null,
"labels": ["Term", "Searches", "Unique"]
}],
"user_reports": [{
"type": "users_by_trust_level",
"title": "Users per Trust Level",
"xaxis": "Trust Level",
"yaxis": "Number of Users",
"data": [{
"x": 0,
"y": 132
}, {
"x": 1,
"y": 1
}, {
"x": 3,
"y": 1
}, {
"x": 2,
"y": 1
}, {
"x": 4,
"y": 1
}],
"total": null,
"start_date": "2018-03-26T00:00:00.000Z",
"end_date": "2018-04-25T23:59:59.999Z",
"category_id": null,
"group_id": null,
"prev30Days": null,
"labels": null
}, {
"type": "users_by_type",
"title": "Users per Type",
"xaxis": "Type",
"yaxis": "Number of Users",
"data": [{
"x": "Admin",
"y": 1
}],
"total": null,
"start_date": "2018-03-26T00:00:00.000Z",
"end_date": "2018-04-25T23:59:59.999Z",
"category_id": null,
"group_id": null,
"prev30Days": null,
"labels": null
}],
"last_backup_taken_at": "2018-04-13T12:51:19.926Z",
"updated_at": "2018-04-25T08:06:11.292Z",
"disk_space": {
"uploads_used": "74.5 KB",
"uploads_free": "117 GB",
"backups_used": "4.24 GB",
"backups_free": "117 GB"
}
}
};

View File

@ -0,0 +1,45 @@
export default {
"/admin/reports/signups": {
"report": {
"type": "signups",
"title": "New Users",
"xaxis": "Day",
"yaxis": "Number of new users",
"data": [{
"x": "2018-04-11",
"y": 10
}, {
"x": "2018-04-12",
"y": 10
}, {
"x": "2018-04-13",
"y": 22
}, {
"x": "2018-04-14",
"y": 58
}, {
"x": "2018-04-15",
"y": 10
}, {
"x": "2018-04-16",
"y": 10
}, {
"x": "2018-04-17",
"y": 19
}, {
"x": "2018-04-18",
"y": 12
}, {
"x": "2018-04-19",
"y": 19
}],
"total": 136,
"start_date": "2018-03-26T00:00:00.000Z",
"end_date": "2018-04-25T23:59:59.999Z",
"category_id": null,
"group_id": null,
"prev30Days": 0,
"labels": null
}
}
};

View File

@ -0,0 +1,48 @@
export default {
"/admin/reports/topics": {
"report": {
"type": "topics",
"title": "Topics",
"xaxis": "Day",
"yaxis": "Number of new topics",
"data": [{
"x": "2018-04-11",
"y": 10
}, {
"x": "2018-04-12",
"y": 10
}, {
"x": "2018-04-13",
"y": 60
}, {
"x": "2018-04-14",
"y": 60
}, {
"x": "2018-04-15",
"y": 10
}, {
"x": "2018-04-16",
"y": 10
}, {
"x": "2018-04-17",
"y": 10
}, {
"x": "2018-04-19",
"y": 10
}, {
"x": "2018-04-18",
"y": 10
}, {
"x": "2018-04-20",
"y": 1
}],
"total": 121,
"start_date": "2018-03-26T00:00:00.000Z",
"end_date": "2018-04-25T23:59:59.999Z",
"category_id": null,
"group_id": null,
"prev30Days": 0,
"labels": null
}
}
};

View File

@ -0,0 +1,22 @@
export default {
"/admin/reports/trending_search": {
"report": {
"type": "trending_search",
"title": "Trending search",
"xaxis": "",
"yaxis": "",
"data": [
["lon", 3, 1],
["pub", 1, 1],
["something", 1, 1]
],
"total": null,
"start_date": "2018-03-26T00:00:00.000Z",
"end_date": "2018-04-25T23:59:59.999Z",
"category_id": null,
"group_id": null,
"prev30Days": null,
"labels": ["Term", "Searches", "Unique"]
}
}
};