UX: Lightbox support for image uploader. (#7034)
This commit is contained in:
@@ -17,18 +17,12 @@ componentTest("with image", {
|
||||
"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");
|
||||
await click(".image-uploader-lightbox-btn");
|
||||
|
||||
assert.equal(
|
||||
this.$(".image-uploader-info").length,
|
||||
$(".mfp-container").length,
|
||||
1,
|
||||
"it displays the image info"
|
||||
"it displays the image lightbox"
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -50,9 +44,9 @@ componentTest("without image", {
|
||||
);
|
||||
|
||||
assert.equal(
|
||||
this.$(".image-uploader-info-btn").length,
|
||||
this.$(".image-uploader-lightbox-btn").length,
|
||||
0,
|
||||
"it does not display the image info button toggle"
|
||||
"it does not display the button to open image lightbox"
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -536,6 +536,15 @@ export default function() {
|
||||
});
|
||||
});
|
||||
|
||||
this.post("/uploads/lookup-metadata", () => {
|
||||
return response(200, {
|
||||
imageFilename: "somefile.png",
|
||||
imageFilesize: "10 KB",
|
||||
imageWidth: "1",
|
||||
imageHeight: "1"
|
||||
});
|
||||
});
|
||||
|
||||
this.get("/inline-onebox", request => {
|
||||
if (
|
||||
request.queryParams.urls.includes(
|
||||
|
||||
Reference in New Issue
Block a user