fix: stabilize cypress

Signed-off-by: grnd-alt <github@belakkaf.net>
This commit is contained in:
grnd-alt
2025-06-24 12:15:55 +02:00
parent 1d7bf30e8f
commit f3a8de2c48
8 changed files with 13 additions and 16 deletions

View File

@@ -84,7 +84,7 @@ describe('Card', function () {
cy.get('.modal-mask.card-selector .multiselect-list').should('be.visible').click() cy.get('.modal-mask.card-selector .multiselect-list').should('be.visible').click()
cy.get('.vs__dropdown-menu span[title="TestList"]').should('be.visible').click() cy.get('.vs__dropdown-menu span[title="TestList"]').should('be.visible').click()
cy.get('.modal-mask.card-selector button.button-vue--vue-primary').should('be.visible').click() cy.get('.modal-mask.card-selector button.button-vue--primary').contains('Create card').should('be.visible').click()
cy.wait('@save', { timeout: 7000 }) cy.wait('@save', { timeout: 7000 })
cy.reload() cy.reload()
@@ -187,7 +187,7 @@ describe('Card', function () {
cy.get('.file-picker__main').should('be.visible') cy.get('.file-picker__main').should('be.visible')
cy.get('.file-picker__main [data-filename="welcome.txt"]', { timeout: 30000 }).should('be.visible') cy.get('.file-picker__main [data-filename="welcome.txt"]', { timeout: 30000 }).should('be.visible')
.click() .click()
cy.get('.dialog__actions button.button-vue--vue-primary').click() cy.get('.dialog__actions button.button-vue--primary').click()
cy.get('.attachment-list .filename').contains('welcome') cy.get('.attachment-list .filename').contains('welcome')
cy.get('.attachment-list .filename .extension').contains('txt') cy.get('.attachment-list .filename .extension').contains('txt')
}) })
@@ -302,8 +302,10 @@ describe('Card', function () {
.first().click() .first().click()
cy.get(`.card:contains("${newCardTitle}")`).should('be.visible').click() cy.get(`.card:contains("${newCardTitle}")`).should('be.visible').click()
cy.get('#app-sidebar-vue [data-test="tag-selector"] .vs__dropdown-toggle').should('be.visible').click() cy.get('#app-sidebar-vue [data-test="tag-selector"] .vs__dropdown-toggle .vs__actions').should('be.visible').click()
cy.get('.vs__dropdown-menu .tag:contains("Action needed")').should('be.visible').click() cy.get('.vs__dropdown-menu .tag:contains("Action needed")').should('be.visible').click()
cy.get('.vs__dropdown-menu .tag:contains("Later")').should('not.exist')
cy.get('#app-sidebar-vue [data-test="tag-selector"] .vs__dropdown-toggle .vs__actions').should('be.visible').click()
cy.get('.vs__dropdown-menu .tag:contains("Later")').should('be.visible').click() cy.get('.vs__dropdown-menu .tag:contains("Later")').should('be.visible').click()
cy.get('.vs__selected .tag:contains("Action needed")').should('be.visible') cy.get('.vs__selected .tag:contains("Action needed")').should('be.visible')

View File

@@ -27,7 +27,7 @@ describe('Deck dashboard', function() {
const defaultBoard = 'Welcome to Nextcloud Deck!' const defaultBoard = 'Welcome to Nextcloud Deck!'
cy.get('.app-navigation-entry-wrapper[icon=icon-deck]') cy.get('#deck-navigation-all')
.find('ul.app-navigation-entry__children .app-navigation-entry:contains(' + defaultBoard + ')') .find('ul.app-navigation-entry__children .app-navigation-entry:contains(' + defaultBoard + ')')
.first() .first()
.contains(defaultBoard) .contains(defaultBoard)

View File

@@ -93,7 +93,7 @@ Cypress.Commands.add('createExampleBoard', ({ user, board }) => {
}) })
Cypress.Commands.add('getNavigationEntry', (boardTitle) => { Cypress.Commands.add('getNavigationEntry', (boardTitle) => {
return cy.get('.app-navigation-entry-wrapper[icon=icon-deck]') return cy.get('#deck-navigation-all')
.find('ul.app-navigation-entry__children .app-navigation-entry:contains(' + boardTitle + ')') .find('ul.app-navigation-entry__children .app-navigation-entry:contains(' + boardTitle + ')')
.find('a.app-navigation-entry-link') .find('a.app-navigation-entry-link')
}) })

8
package-lock.json generated
View File

@@ -22,7 +22,7 @@
"@nextcloud/moment": "^1.3.2", "@nextcloud/moment": "^1.3.2",
"@nextcloud/notify_push": "^1.3.0", "@nextcloud/notify_push": "^1.3.0",
"@nextcloud/router": "^3.0.1", "@nextcloud/router": "^3.0.1",
"@nextcloud/vue": "^9.0.0-alpha.7", "@nextcloud/vue": "^9.0.0-rc.3",
"@vue/compiler-sfc": "^3.5.13", "@vue/compiler-sfc": "^3.5.13",
"@vue/vue3-jest": "^29.2.6", "@vue/vue3-jest": "^29.2.6",
"@vueuse/core": "^13.1.0", "@vueuse/core": "^13.1.0",
@@ -3895,9 +3895,9 @@
} }
}, },
"node_modules/@nextcloud/vue": { "node_modules/@nextcloud/vue": {
"version": "9.0.0-rc.2", "version": "9.0.0-rc.3",
"resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-9.0.0-rc.2.tgz", "resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-9.0.0-rc.3.tgz",
"integrity": "sha512-/YDkNt81zwAixP7H52LrqXGMwa0goPtH4jPlUqPiNaco65avQDdn125W3w/Tk6bznhVQpN3y8y3Y5gpVGNrIGQ==", "integrity": "sha512-80eW36oUZIYwcwCQX58Aubao8ZXZS2ms0+tyYmkTCpVait9/eT9BmbwmvVxqD8y966572CSyyZf0DCsScLxqVQ==",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"dependencies": { "dependencies": {
"@ckpack/vue-color": "^1.6.0", "@ckpack/vue-color": "^1.6.0",

View File

@@ -43,7 +43,7 @@
"@nextcloud/moment": "^1.3.2", "@nextcloud/moment": "^1.3.2",
"@nextcloud/notify_push": "^1.3.0", "@nextcloud/notify_push": "^1.3.0",
"@nextcloud/router": "^3.0.1", "@nextcloud/router": "^3.0.1",
"@nextcloud/vue": "^9.0.0-alpha.7", "@nextcloud/vue": "^9.0.0-rc.3",
"@vue/compiler-sfc": "^3.5.13", "@vue/compiler-sfc": "^3.5.13",
"@vue/vue3-jest": "^29.2.6", "@vue/vue3-jest": "^29.2.6",
"@vueuse/core": "^13.1.0", "@vueuse/core": "^13.1.0",

View File

@@ -31,10 +31,6 @@ export default {
type: String, type: String,
default: '', default: '',
}, },
id: {
type: String,
required: true,
},
text: { text: {
type: String, type: String,
required: true, required: true,

View File

@@ -343,7 +343,6 @@ export default {
commit('removeUserFromCard', user) commit('removeUserFromCard', user)
}, },
async addLabel({ commit }, data) { async addLabel({ commit }, data) {
alert('hello world')
await apiClient.assignLabelToCard(data) await apiClient.assignLabelToCard(data)
commit('updateCardProperty', { property: 'labels', card: data.card }) commit('updateCardProperty', { property: 'labels', card: data.card })
}, },

View File

@@ -131,7 +131,7 @@ const store = createStore({
state.isFullApp = isFullApp state.isFullApp = isFullApp
}, },
setHasCardSaveError(state, hasCardSaveError) { setHasCardSaveError(state, hasCardSaveError) {
Vue.set(state, 'hasCardSaveError', hasCardSaveError) state.hasCardSaveError = hasCardSaveError
}, },
SET_CONFIG(state, { key, value }) { SET_CONFIG(state, { key, value }) {
const [scope, id, configKey] = key.split(':', 3) const [scope, id, configKey] = key.split(':', 3)