We need some tests that:

  1. Inserts an image via the WYSIWYG editor, setting it's Alt and Title text
  2. Edits the image again (selecting it and clicking the Media button) and verifies the Alt and Title are as they should be
  3. It should include characters that are frequently encoded (like & and < or >), and make sure they get decoded properly
  4. Checks that changes "stick" when ultimately viewing the image outside of the WYSIWYG

This will help to verify that issues like these won't recur:

Comments

dsnopek’s picture

Status: Active » Needs review
StatusFileSize
new9.35 KB

Here is my first sort of maybe working attempt. Posting here so I can try in Travis-CI!

dsnopek’s picture

StatusFileSize
new9.35 KB

Here is an alternate patch that tries to use the Mink API rather than Javascript. I don't actually expect it to work, but I'd really like to try it on Travis-CI just in case, because it would be cleaner approach.

dsnopek’s picture

StatusFileSize
new9.39 KB

Here's another "real" patch for this - hopefully it'll fix the couple of failures on Travis.

dsnopek’s picture

StatusFileSize
new7.54 KB

The previous patch worked:

https://travis-ci.org/dsnopek/panopoly/builds/30780536

Here is one last patch for Travis-CI. This one remove the code related to the failed attempt at using the Mink API. If that passes, this is ready to be committed.

  • dsnopek committed 77113b3 on 7.x-1.x
    Update Panopoly Test for #2308325: Write Behat test for alt/title text...
dsnopek’s picture

Status: Needs review » Fixed

Alright, it passed! Committed. :-) Let's see what the final word from Travis is:

https://travis-ci.org/panopoly/panopoly/builds/30784912

dsnopek’s picture

Status: Fixed » Needs review
StatusFileSize
new2.55 KB

There were a few extra characters we failed to check, namely: apostrophes and quotes. Since these were at one point broken and now appear to be working, I'd like it to stay that way! Here is a patch that I'm going to test on Travis, since I'm having trouble running it locally.

dsnopek’s picture

StatusFileSize
new3.89 KB

Didn't get the quote escaping quite right - here's another attempt. (It's sort of ironic that I'm dealing with quote escaping issues in the Behat test file, while trying to test for quote escaping issues in Panopoly. ;-))

  • dsnopek committed 5a7566b on 7.x-1.x
    Update Panopoly Test for #2308325 by dsnopek: Write Behat test for alt/...
dsnopek’s picture

Status: Needs review » Fixed

Ok, it's now checking quotes too! I already tested with Travis while working on the patch, but here is the final build of what was committed:

https://travis-ci.org/panopoly/panopoly/builds/31178687

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.