UX: Allow users to see filename in image-uploader component. (#7022)

https://meta.discourse.org/t/downsides-of-the-new-logo-ui-in-site-settings/102247/23?u=tgxworld
This commit is contained in:
Guo Xiang Tan
2019-02-20 13:55:55 +08:00
committed by GitHub
parent fa35b555b7
commit 31ffa5f64e
6 changed files with 99 additions and 4 deletions

View File

@ -4,7 +4,7 @@ moduleForComponent("image-uploader", { integration: true });
componentTest("with image", {
template: "{{image-uploader imageUrl='/some/upload.png'}}",
test(assert) {
async test(assert) {
assert.equal(
this.$(".d-icon-far-image").length,
1,
@ -16,6 +16,20 @@ componentTest("with image", {
1,
"it displays the trash icon"
);
assert.equal(
this.$(".image-uploader-info").length,
0,
"it does not display the image info"
);
await click(".image-uploader-info-btn");
assert.equal(
this.$(".image-uploader-info").length,
1,
"it displays the image info"
);
}
});
@ -34,5 +48,11 @@ componentTest("without image", {
0,
"it does not display trash icon"
);
assert.equal(
this.$(".image-uploader-info-btn").length,
0,
"it does not display the image info button toggle"
);
}
});