Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency @nextcloud/dialogs to v5 #930

Merged
merged 4 commits into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions cypress/e2e/settings.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ describe('Settings', function() {
cy.get('button').contains('Choose')
.click()
cy.wait('@setCollectivesFolder')
cy.getCollectivesFolder()
.should('be.equal', `/${randomFolder}`)

// Check if collectives are found in new folder in Files app
cy.log('Check if collectives are in configured user folder')
Expand All @@ -73,25 +75,7 @@ describe('Settings', function() {
cy.fileList().should('contain', 'A Collective')

// Change user folder back to default
cy.log('Change user folder back to default')
cy.visit('/apps/collectives')
cy.get('#app-settings')
.click()
cy.get('input[name="userFolder"]')
.click()
cy.wait('@propfindFolder')

// Open home folder
cy.get('[data-dir=""] > a, a[title="Home"]')
.click()
cy.wait('@propfindFolder')

// Open and select default folder
cy.get(filePickerListSelector).contains('Collectives')
.click()
cy.get('button').contains('Choose')
.click()
cy.wait('@setCollectivesFolder')
cy.setCollectivesFolder('/Collectives')
})
})
})
21 changes: 11 additions & 10 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,10 @@ Cypress.Commands.add('deleteAndSeedCollective', (name) => {
.findBy({ name })
})

Cypress.Commands.add('seedCollective', (name) => {
return api.newCollective({ name })
.catch(e => {
if (e.request && e.request.status === 422) {
// The collective already existed... carry on.
} else {
throw e
}
})
})
Cypress.Commands.add(
'seedCollective',
name => api.newCollective({ name }),
)

/**
* Create a collective via UI
Expand Down Expand Up @@ -214,6 +208,13 @@ Cypress.Commands.add('getCollectives', () => {
.then(response => response.data.data)
})

Cypress.Commands.add('getCollectivesFolder', () => {
return api.getCollectivesFolder()
.then(response => response.data.ocs.data)
})

Cypress.Commands.add('setCollectivesFolder', api.setCollectivesFolder)

/**
* Move a collective into the trash if it exists.
*
Expand Down
248 changes: 168 additions & 80 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 @@ -22,7 +22,7 @@
"@nextcloud/auth": "^2.2.1",
"@nextcloud/axios": "^2.4.0",
"@nextcloud/browser-storage": "^0.3.0",
"@nextcloud/dialogs": "^4.2.2",
"@nextcloud/dialogs": "^5.0.3",
"@nextcloud/event-bus": "^3.1.0",
"@nextcloud/files": "^3.0.0",
"@nextcloud/initial-state": "^2.1.0",
Expand Down
1 change: 0 additions & 1 deletion src/components/Nav/CollectivesGlobalSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export default {
selectCollectivesFolder() {
const picker = getFilePickerBuilder(t('collectives', 'Select location for collectives'))
.setMultiSelect(false)
.setModal(true)
.setType(1)
.addMimeTypeFilter('httpd/unix-directory')
.allowDirectories()
Expand Down