Skip to content

Commit

Permalink
Add test for grid view uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
darylldoyle committed Sep 30, 2024
1 parent 520f87f commit fd69010
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/cypress/e2e/safe-svg.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@ describe('Safe SVG Tests', () => {
cy.login();
});

it('Admin can upload SVG image', () => {
it('Admin can upload SVG image via add new media file', () => {
cy.uploadMedia('.wordpress-org/icon.svg');
cy.get('.media-item .media-list-title, .media-item .title').should('exist').contains('icon');
cy.get('.media-item a.edit-attachment').should('exist').contains('Edit');
});

it('Admin can upload SVG image via the media grid', () => {
cy.uploadMediaThroughGrid('.wordpress-org/icon.svg').then((attachmentId) => {
cy.get(`.attachments .attachment[data-id="${attachmentId}"]`).should('exist');
});
});

/**
* Flow for verify SVG sanitization.
*
Expand Down

0 comments on commit fd69010

Please sign in to comment.