Skip to content

Commit

Permalink
Merge pull request #2296 from nextcloud/enh/migrate-to-ncdialog
Browse files Browse the repository at this point in the history
enh: Migrate photos picker to use NcDialog
  • Loading branch information
JuliaKirschenheuter authored Feb 7, 2024
2 parents 8f699e9 + 02170f8 commit 1f85e5b
Show file tree
Hide file tree
Showing 56 changed files with 226 additions and 231 deletions.
15 changes: 3 additions & 12 deletions cypress/e2e/albums.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,21 @@ Cypress.on('uncaught:exception', (err) => {
}
})

describe('Manage albums', () => {
describe('Manage albums', { testIsolation: true }, () => {
let user = null

before(function() {
beforeEach(function() {
cy.createRandomUser()
.then(_user => {
user = _user
uploadTestMedia(user)
cy.login(user)
cy.visit('/apps/photos')
})
})

beforeEach(() => {
cy.visit(`${Cypress.env('baseUrl')}/index.php/apps/photos/albums`)
createAnAlbumFromAlbums('albums_test')
addFilesToAlbumFromAlbum('albums_test', [0, 1, 2])
})

afterEach(() => {
deleteAnAlbumFromAlbumContent()
cy.contains('There is no album yet!').click()
})

it('Create an album, populate it and delete it', () => {
cy.get('[data-test="media"]').should('have.length', 3)
})
Expand Down Expand Up @@ -156,7 +147,7 @@ describe('Manage albums', () => {
})

it('Delete a file that was added to an album', () => {
addFilesToAlbumFromAlbumFromHeader('albums_test', [0])
addFilesToAlbumFromAlbumFromHeader('albums_test', [3])
cy.get('[data-test="media"]').should('have.length', 4)
cy.visit('/apps/photos')
selectMedia([3])
Expand Down
3 changes: 1 addition & 2 deletions cypress/e2e/albumsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,11 @@ export function addFilesToAlbumFromAlbum(albumName: string, itemsIndex: number[]

export function addFilesToAlbumFromAlbumFromHeader(albumName: string, itemsIndex: number[]) {
cy.contains('New').click()
cy.intercept({ times: 1, method: 'SEARCH', url: '**/dav/' }).as('search')
cy.contains('Add photos to this album').click()
cy.wait('@search')
cy.get('.photos-picker__file-list').within(() => {
selectMedia(itemsIndex)
})

cy.intercept({ times: 1, method: 'PROPFIND', url: `**/dav/photos/**/albums/${albumName}` }).as('propFind')
cy.contains(`Add to ${albumName}`).click()
cy.wait('@propFind')
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.

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.

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.

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.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-public.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-src_components_Albums_AlbumForm_vue.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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.

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.

4 changes: 2 additions & 2 deletions js/photos-src_views_AlbumContent_vue.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-src_views_Albums_vue.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-src_views_FaceContent_vue.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-src_views_Folders_vue.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-src_views_Tags_vue.js

Large diffs are not rendered by default.

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

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.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@nextcloud/router": "^2.0.0",
"@nextcloud/sharing": "^0.1.0",
"@nextcloud/upload": "^1.0.4",
"@nextcloud/vue": "^8.5.0",
"@nextcloud/vue": "^8.6.1",
"camelcase": "^8.0.0",
"debounce": "^1.2.1",
"he": "^1.2.0",
Expand Down
Loading

0 comments on commit 1f85e5b

Please sign in to comment.