mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
FEATURE: Add Top Uploads
report (#6825)
Co-Authored-By: I am very Pro-Grammer. <khalilovcmded@users.noreply.github.com>
This commit is contained in:
@ -404,7 +404,8 @@ QUnit.test("computed labels", assert => {
|
||||
topic_id: 2,
|
||||
topic_title: "Test topic",
|
||||
post_number: 3,
|
||||
post_raw: "This is the beginning of"
|
||||
post_raw: "This is the beginning of",
|
||||
filesize: 582641
|
||||
}
|
||||
];
|
||||
|
||||
@ -437,7 +438,8 @@ QUnit.test("computed labels", assert => {
|
||||
truncated_raw: "post_raw"
|
||||
},
|
||||
title: "Post"
|
||||
}
|
||||
},
|
||||
{ type: "bytes", property: "filesize", title: "Filesize" }
|
||||
];
|
||||
|
||||
const report = Report.create({
|
||||
@ -516,6 +518,15 @@ QUnit.test("computed labels", assert => {
|
||||
);
|
||||
assert.equal(computedPostLabel.value, "This is the beginning of");
|
||||
|
||||
const filesizeLabel = computedLabels[6];
|
||||
assert.equal(filesizeLabel.mainProperty, "filesize");
|
||||
assert.equal(filesizeLabel.sortProperty, "filesize");
|
||||
assert.equal(filesizeLabel.title, "Filesize");
|
||||
assert.equal(filesizeLabel.type, "bytes");
|
||||
const computedFilesizeLabel = filesizeLabel.compute(row);
|
||||
assert.equal(computedFilesizeLabel.formatedValue, "569.0 KB");
|
||||
assert.equal(computedFilesizeLabel.value, 582641);
|
||||
|
||||
// subfolder support
|
||||
Discourse.BaseUri = "/forum";
|
||||
|
||||
|
Reference in New Issue
Block a user