mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
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:
parent
fa35b555b7
commit
31ffa5f64e
6 changed files with 99 additions and 4 deletions
|
@ -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"
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue