mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 03:40:00 +08:00
DEV: prevents reports key to be time dependant when testing (#7850)
This commit is contained in:
parent
4f468ef210
commit
f9f1df7611
|
@ -164,8 +164,8 @@ export default Ember.Component.extend({
|
|||
let reportKey = "reports:";
|
||||
reportKey += [
|
||||
dataSourceName,
|
||||
startDate.replace(/-/g, ""),
|
||||
endDate.replace(/-/g, ""),
|
||||
Ember.testing ? "start" : startDate.replace(/-/g, ""),
|
||||
Ember.testing ? "end" : endDate.replace(/-/g, ""),
|
||||
"[:prev_period]",
|
||||
this.get("reportOptions.table.limit"),
|
||||
customFilters
|
||||
|
|
|
@ -44,22 +44,21 @@ QUnit.test("Visit report page", async assert => {
|
|||
data: [
|
||||
{
|
||||
avatar_template:
|
||||
"/letter_avatar_proxy/v4/letter/q/a4c791/{size}.png",
|
||||
user_id: 4,
|
||||
username: "codinghorror",
|
||||
location: null,
|
||||
created_at: "2019-06-10T00:00:00.000Z"
|
||||
"/user_avatar/dev.discourse.org/jo/{size}/17583_2.png",
|
||||
user_id: 5656,
|
||||
username: "Jo",
|
||||
location: "Paris, France",
|
||||
created_at: "2019-06-29T23:43:38.884Z"
|
||||
}
|
||||
],
|
||||
start_date: "2019-06-01T00:00:00Z",
|
||||
end_date: "2019-07-01T23:59:59Z",
|
||||
start_date: "2019-06-29T00:00:00Z",
|
||||
end_date: "2019-06-29T23:59:59Z",
|
||||
prev_data: null,
|
||||
prev_start_date: "2019-04-30T00:00:00Z",
|
||||
prev_end_date: "2019-06-01T00:00:00Z",
|
||||
prev_start_date: "2019-06-28T00:00:00Z",
|
||||
prev_end_date: "2019-06-29T00:00:00Z",
|
||||
prev30Days: null,
|
||||
dates_filtering: true,
|
||||
report_key:
|
||||
"reports:staff_logins:20190601:20190702:[:prev_period]:50:4",
|
||||
report_key: "reports:staff_logins:start:end:[:prev_period]:50:4",
|
||||
primary_color: "rgba(0,136,204,1)",
|
||||
secondary_color: "rgba(0,136,204,0.1)",
|
||||
available_filters: [],
|
||||
|
@ -87,5 +86,6 @@ QUnit.test("Visit report page", async assert => {
|
|||
]);
|
||||
|
||||
await visit("/admin/reports/staff_logins");
|
||||
|
||||
assert.ok(exists(".export-csv-btn"));
|
||||
});
|
||||
|
|
|
@ -59,8 +59,7 @@ let signups = {
|
|||
prev_end_date: "2018-06-17T00:00:00Z",
|
||||
prev30Days: null,
|
||||
dates_filtering: true,
|
||||
report_key:
|
||||
'reports:signups:20180616:20180716:[:prev_period]:50:{"group":"88"}:4',
|
||||
report_key: 'reports:signups:start:end:[:prev_period]:50:{"group":"88"}:4',
|
||||
available_filters: [
|
||||
{ id: "group", allow_any: false, choices: [], default: "88" }
|
||||
],
|
||||
|
@ -159,9 +158,7 @@ const page_view_total_reqs = {
|
|||
prev_end_date: "2018-07-23T00:00:00Z",
|
||||
prev30Days: 58110,
|
||||
dates_filtering: true,
|
||||
report_key: `reports:page_view_total_reqs:${startDate.format(
|
||||
"YYYYMMDD"
|
||||
)}:${endDate.format("YYYYMMDD")}:[:prev_period]:${SCHEMA_VERSION}`,
|
||||
report_key: `reports:page_view_total_reqs:start:end:[:prev_period]:${SCHEMA_VERSION}`,
|
||||
labels: [
|
||||
{ type: "date", property: "x", title: "Day" },
|
||||
{ type: "number", property: "y", title: "Count" }
|
||||
|
|
Loading…
Reference in New Issue
Block a user