Skip to content

Commit

Permalink
Updates Alt Text dom element
Browse files Browse the repository at this point in the history
  • Loading branch information
thejimbirch committed Feb 3, 2024
1 parent 7e00114 commit 57f69be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mediaLibraryAdd.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Cypress.Commands.add("mediaLibraryAdd", (selector, fileName, type="") => {

// Basic check if the file is an image so we know if we have to add some alt tags.
if (fileName.includes(".png") || fileName.includes(".jpg")) {
cy.get('input[name="media[0][fields][field_media_image][0][alt]"]').type('alt text');
cy.get('.media-library-add-form').contains('Alternative text').next().type('alt text');
}

// Select the uploaded file.
Expand Down

0 comments on commit 57f69be

Please sign in to comment.