mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +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:
@ -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"
|
||||
);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user