zulip/frontend_tests
Hashir Sarwar 9a6d83e731 lightbox: Use `$preview_src` as key for `asset_map`.
In case of video embeds, the previous logic used
`data-src-fullsize` or `src` as a key to look
for the metadata of video in `lightbox.open()`,
but while parsing, the key used while storing
the metadata was the video ID.

This doesn't make any sense because video's data
could never be accessed from `asset_map` and we
always needed to lookup the DOM for this.

This commit fixes this by using $img.attr('src')
as a key for `asset_map` for both, images and
videos. Since `src` is the link of preview image
in case of video embeds, it will always uniquely
determine the video ID and we won't loose
anything with the change in how videos handle
things.

Part of #14152.
2020-04-05 13:13:02 -07:00
..
casper_lib CVE-2020-9444: Prevent reverse tabnabbing attacks. 2020-04-01 14:01:45 -07:00
casper_tests capser: Extract wait_for_text(). 2020-03-31 10:57:08 -04:00
node_tests lightbox: Use `$preview_src` as key for `asset_map`. 2020-04-05 13:13:02 -07:00
puppeteer_tests tests: Add realm creation test using puppeteer. 2020-04-02 15:37:12 -07:00
zjsunit node tests: Auto-include zblueslip for node tests. 2020-04-03 12:56:49 -04:00
.eslintrc.json lint: Check eslint indentation for casper tests. 2018-05-06 19:35:18 -07:00
run-casper casper test: Refine --loop mode. 2020-03-31 10:57:08 -04:00