Skip to content

Commit

Permalink
Merge pull request #2190 from nextcloud/fix/a11y-favorite
Browse files Browse the repository at this point in the history
fix: Adjust favorite icon to be accessible
  • Loading branch information
artonge authored Dec 13, 2023
2 parents 9f73a6a + 5bb7b9f commit dabd93e
Show file tree
Hide file tree
Showing 38 changed files with 151 additions and 66 deletions.
10 changes: 5 additions & 5 deletions cypress/e2e/albums.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,20 @@ describe('Manage albums', () => {
it('Favorite a file from an album content view', () => {
selectMedia([0])
favoriteSelection()
cy.get('[data-test="media"]').eq(0).find('[aria-label="The file is in the favorites"]')
cy.get('[data-test="media"]').eq(0).find('[aria-label="Favorite"]')
unfavoriteSelection()
unselectMedia([0])
cy.get('[aria-label="The file is in the favorites"]').should('not.exist')
cy.get('[aria-label="Favorite"]').should('not.exist')
})

it('Favorite multiple files from an album content view', () => {
selectMedia([1, 2])
favoriteSelection()
cy.get('[data-test="media"]').eq(1).find('[aria-label="The file is in the favorites"]')
cy.get('[data-test="media"]').eq(2).find('[aria-label="The file is in the favorites"]')
cy.get('[data-test="media"]').eq(1).find('[aria-label="Favorite"]')
cy.get('[data-test="media"]').eq(2).find('[aria-label="Favorite"]')
unfavoriteSelection()
unselectMedia([1, 2])
cy.get('[aria-label="The file is in the favorites"]').should('not.exist')
cy.get('[aria-label="Favorite"]').should('not.exist')
})

// it('Download a file from an album content view', () => {
Expand Down
10 changes: 5 additions & 5 deletions cypress/e2e/timelines.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,20 @@ describe('View list of photos in the main timeline', () => {
it('Favorite a file from a timeline', () => {
selectMedia([0])
favoriteSelection()
cy.get('[data-test="media"]').eq(0).find('[aria-label="The file is in the favorites"]')
cy.get('[data-test="media"]').eq(0).find('[aria-label="Favorite"]')
unfavoriteSelection()
unselectMedia([0])
cy.get('[aria-label="The file is in the favorites"]').should('not.exist')
cy.get('[aria-label="Favorite"]').should('not.exist')
})

it('Favorite multiple files from a timeline', () => {
selectMedia([1, 2])
favoriteSelection()
cy.get('[data-test="media"]').eq(1).find('[aria-label="The file is in the favorites"]')
cy.get('[data-test="media"]').eq(2).find('[aria-label="The file is in the favorites"]')
cy.get('[data-test="media"]').eq(1).find('[aria-label="Favorite"]')
cy.get('[data-test="media"]').eq(2).find('[aria-label="Favorite"]')
unfavoriteSelection()
unselectMedia([1, 2])
cy.get('[aria-label="The file is in the favorites"]').should('not.exist')
cy.get('[aria-label="Favorite"]').should('not.exist')
})

it('Download a file from a timeline', () => {
Expand Down
4 changes: 2 additions & 2 deletions js/photos-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-main.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit dabd93e

Please sign in to comment.