Then I should see an image with the "Sample image alt text" alt text

Assert an <img> whose alt or title attribute contains the given text is, or is not, on the page. This is how an image field's alternative text and title are checked without knowing the file URL or image style.

Examples

Then I should see an image with the "Sample image alt text" alt text
And I should see an image with the "Sample image title text" title text
Then we should see an image with the "Company logo" alt text
And I should not see an image with the "Placeholder" alt text
Then I should not see an image with the "Draft banner" title text

Pattern

Then(/^(I |we )*should( not)* see an image with the "([^"]*)" (alt|title) text$/, …)

Part of @webship-js/drupal-core-steps (github.com/webship/drupal-core-steps), a step pack for Webship-js 2.0.x.