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/vue to v8 #647

Merged
merged 11 commits into from
Feb 12, 2024
8 changes: 4 additions & 4 deletions cypress/e2e/column-datetime.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ describe('Test column ' + columnTitle, () => {

// insert row with int value
cy.get('button').contains('Create row').click()
cy.get('.modal__content input').first().clear().type('2023-12-24 05:15')
cy.get('.modal-container .checkbox-radio-switch label').click().click()
cy.get('.modal__content input').first().clear().type('2023-12-24T05:15')
cy.get('[data-cy="createRowAddMoreSwitch"]').click().click()
cy.get('button').contains('Save').click()
cy.get('.custom-table table tr td div').contains('24').should('be.visible')
cy.get('.custom-table table tr td div').contains('Dec').should('be.visible')
Expand All @@ -49,8 +49,8 @@ describe('Test column ' + columnTitle, () => {
cy.createDatetimeColumn(columnTitle, true, true)

cy.get('button').contains('Create row').click()
cy.get('.modal__content input').first().should('contain.value', '2023-12-24 07:21')
cy.get('.modal-container .checkbox-radio-switch label').click().click()
cy.get('.modal__content input').first().should('contain.value', '2023-12-24T07:21')
cy.get('[data-cy="createRowAddMoreSwitch"]').click().click()
cy.get('button').contains('Save').click()
cy.get('.custom-table table tr td div').contains('7:').should('be.visible')
cy.get('.custom-table table tr td div').contains('Dec').should('be.visible')
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/column-datetimeDate.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Test column ' + columnTitle, () => {
// insert row with int value
cy.get('button').contains('Create row').click()
cy.get('.modal__content input').first().clear().type('2023-12-24')
cy.get('.modal-container .checkbox-radio-switch label').click().click()
cy.get('[data-cy="createRowAddMoreSwitch"]').click().click()
cy.get('button').contains('Save').click()
cy.get('.custom-table table tr td div').contains('24').should('be.visible')
cy.get('.custom-table table tr td div').contains('Dec').should('be.visible')
Expand All @@ -49,7 +49,7 @@ describe('Test column ' + columnTitle, () => {
cy.get('button').contains('Create row').click()
const date = new Date().toISOString().slice(2, 10)
cy.get('.modal__content input').first().should('contain.value', date)
cy.get('.modal-container .checkbox-radio-switch label').click().click()
cy.get('[data-cy="createRowAddMoreSwitch"]').click().click()
cy.get('button').contains('Save').click()
const monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'June',
'July', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec']
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/column-datetimeTime.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Test column ' + columnTitle, () => {
// insert row with int value
cy.get('button').contains('Create row').click()
cy.get('.modal__content input').first().clear().type('05:15')
cy.get('.modal-container .checkbox-radio-switch label').click().click()
cy.get('[data-cy="createRowAddMoreSwitch"]').click().click()
cy.get('button').contains('Save').click()
cy.get('.custom-table table tr td div').contains('5:15').should('be.visible')

Expand All @@ -48,7 +48,7 @@ describe('Test column ' + columnTitle, () => {
// insert row with int value
cy.get('button').contains('Create row').click()
cy.get('.modal__content input').first().should('contain.value', '07:21')
cy.get('.modal-container .checkbox-radio-switch label').click().click()
cy.get('[data-cy="createRowAddMoreSwitch"]').click().click()
cy.get('button').contains('Save').click()
cy.get('.custom-table table tr td div').contains('7:21').should('be.visible')
})
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/column-selection-check.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('Test column ' + columnTitle, () => {

// insert row
cy.get('button').contains('Create row').click()
cy.get('.modal__content .checkbox-radio-switch__label').first().click()
cy.get('[data-cy="selectionCheckFormSwitch"]').first().click()
cy.get('button').contains('Save').click()
cy.get('.custom-table table tr td div .material-design-icon.check-circle-outline-icon').should('be.visible')

Expand All @@ -49,7 +49,7 @@ describe('Test column ' + columnTitle, () => {

// insert row
cy.get('button').contains('Create row').click()
cy.get('.modal__content .checkbox-radio-switch__label').first().click()
cy.get('[data-cy="selectionCheckFormSwitch"]').first().click()
cy.get('button').contains('Save').click()
cy.get('.custom-table table tr td div .material-design-icon.radiobox-blank-icon').should('be.visible')

Expand Down
32 changes: 16 additions & 16 deletions cypress/e2e/tables-fe-filters.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,30 +74,30 @@ describe('FE sorting and filtering', () => {
cy.createView('view for third tab')

// all tables and views should be visible
cy.get('.app-navigation-entry__title').contains('first table').should('be.visible')
cy.get('.app-navigation-entry__title').contains('second table').should('be.visible')
cy.get('.app-navigation-entry__title').contains('third table 🙇').should('be.visible')
cy.get('.app-navigation-entry__title').contains('view for third tab').should('be.visible')
cy.get('[data-cy="navigationTableItem"]').contains('first table').should('be.visible')
cy.get('[data-cy="navigationTableItem"]').contains('second table').should('be.visible')
cy.get('[data-cy="navigationTableItem"]').contains('third table 🙇').should('be.visible')
cy.get('[data-cy="navigationTableItem"]').contains('view for third tab').should('be.visible')

// only tables should be visible
cy.get('.filter-box input').clear().type('table')
cy.get('.app-navigation-entry__title').contains('first table').should('be.visible')
cy.get('.app-navigation-entry__title').contains('second table').should('be.visible')
cy.get('.app-navigation-entry__title').contains('third table 🙇').should('be.visible')
cy.get('.app-navigation-entry__title').contains('view for third tab').should('not.exist')
cy.get('[data-cy="navigationTableItem"]').contains('first table').should('be.visible')
cy.get('[data-cy="navigationTableItem"]').contains('second table').should('be.visible')
cy.get('[data-cy="navigationTableItem"]').contains('third table 🙇').should('be.visible')
cy.get('[data-cy="navigationTableItem"]').contains('view for third tab').should('not.exist')

// only the second table should be visible
cy.get('.filter-box input').clear().type('second')
cy.get('.app-navigation-entry__title').contains('first table').should('not.exist')
cy.get('.app-navigation-entry__title').contains('second table').should('be.visible')
cy.get('.app-navigation-entry__title').contains('third table 🙇').should('not.exist')
cy.get('.app-navigation-entry__title').contains('view for third tab').should('not.exist')
cy.get('[data-cy="navigationTableItem"]').contains('first table').should('not.exist')
cy.get('[data-cy="navigationTableItem"]').contains('second table').should('be.visible')
cy.get('[data-cy="navigationTableItem"]').contains('third table 🙇').should('not.exist')
cy.get('[data-cy="navigationTableItem"]').contains('view for third tab').should('not.exist')

// only the third table and it's view should be visible
cy.get('.filter-box input').clear().type('view for third')
cy.get('.app-navigation-entry__title').contains('first table').should('not.exist')
cy.get('.app-navigation-entry__title').contains('second table').should('not.exist')
cy.get('.app-navigation-entry__title').contains('third table 🙇').should('be.visible')
cy.get('.app-navigation-entry__title').contains('view for third tab').should('be.visible')
cy.get('[data-cy="navigationTableItem"]').contains('first table').should('not.exist')
cy.get('[data-cy="navigationTableItem"]').contains('second table').should('not.exist')
cy.get('[data-cy="navigationTableItem"]').contains('third table 🙇').should('be.visible')
cy.get('[data-cy="navigationTableItem"]').contains('view for third tab').should('be.visible')
})
})
66 changes: 33 additions & 33 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Cypress.Commands.add('createTable', (title) => {

Cypress.Commands.add('createView', (title) => {
cy.get('[data-cy="customTableAction"] button').click()
cy.get('.v-popper__popper li button span').contains('Create view').click({ force: true })
cy.get('[data-cy="dataTableCreateViewBtn"]').contains('Create view').click({ force: true })

cy.get('.modal-container #settings-section_title input').type(title)

Expand All @@ -58,7 +58,7 @@ Cypress.Commands.add('createView', (title) => {

Cypress.Commands.add('clickOnTableThreeDotMenu', (optionName) => {
cy.get('[data-cy="customTableAction"] button').click()
cy.get('.v-popper__popper li button span').contains(optionName).click({ force: true })
cy.get('[data-cy="dataTableExportBtn"]').contains(optionName).click({ force: true })
})

Cypress.Commands.add('sortTableColumn', (columnTitle, mode = 'ASC') => {
Expand Down Expand Up @@ -89,20 +89,20 @@ Cypress.Commands.add('createTextLinkColumn', (title, ressourceProvider, firstCol
cy.get('.button-vue__text').contains('Create column').click({ force: true })
} else {
cy.get('[data-cy="customTableAction"] button').click()
cy.get('.v-popper__popper li button span').contains('Create column').click({ force: true })
cy.get('[data-cy="dataTableCreateColumnBtn"]').contains('Create column').click({ force: true })
}

cy.get('.modal-container').get('input[placeholder*="Enter a column title"]').clear().type(title)
cy.get('.columnTypeSelection .vs__open-indicator').click({ force: true })
cy.get('.multiSelectOptionLabel').contains('Link').click({ force: true })
// deactivate unwanted provider
cy.get('.typeSelection span label').contains('Url', { matchCase: false }).click()
cy.get('.typeSelection span label').contains('Files').click()
cy.get('.typeSelection span').contains('Url', { matchCase: false }).click()
cy.get('.typeSelection span').contains('Files').click()
// TODO is the contacts search provider deactivated by default beginning with nc28
// cy.get('.typeSelection span label').contains('Contacts').click()

ressourceProvider.forEach(provider =>
cy.get('.typeSelection span label').contains(provider, { matchCase: false }).click(),
cy.get('.typeSelection span').contains(provider, { matchCase: false }).click(),
)
cy.get('.modal-container button').contains('Save').click()

Expand All @@ -115,22 +115,22 @@ Cypress.Commands.add('createSelectionColumn', (title, options, defaultOption, fi
cy.get('.button-vue__text').contains('Create column').click({ force: true })
} else {
cy.get('[data-cy="customTableAction"] button').click()
cy.get('.v-popper__popper li button span').contains('Create column').click({ force: true })
cy.get('[data-cy="dataTableCreateColumnBtn"]').contains('Create column').click({ force: true })
}

cy.get('.modal-container').get('input[placeholder*="Enter a column title"]').clear().type(title)
cy.get('.columnTypeSelection .vs__open-indicator').click({ force: true })
cy.get('.multiSelectOptionLabel').contains('Selection').click({ force: true })
// remove default option
cy.get('[data-cy="selection-option"] button').first().click()
cy.get('[data-cy="selection-option"] button').first().click()
cy.get('[data-cy="selectionOption"] button').first().click()
cy.get('[data-cy="selectionOption"] button').first().click()

// add wanted option
options.forEach(option => {
cy.get('button').contains('Add option').click()
cy.get('[data-cy="selection-option-label"]').last().type(option)
cy.get('[data-cy="selectionOptionLabel"]').last().type(option)
if (defaultOption === option) {
cy.get('[data-cy="selection-option"] span label').last().click()
cy.get('[data-cy="selectionOption"] .checkbox-content').last().click()
}
})
cy.get('.modal-container button').contains('Save').click()
Expand All @@ -144,24 +144,24 @@ Cypress.Commands.add('createSelectionMultiColumn', (title, options, defaultOptio
cy.get('.button-vue__text').contains('Create column').click({ force: true })
} else {
cy.get('[data-cy="customTableAction"] button').click()
cy.get('.v-popper__popper li button span').contains('Create column').click({ force: true })
cy.get('[data-cy="dataTableCreateColumnBtn"]').contains('Create column').click({ force: true })
}

cy.get('.modal-container').get('input[placeholder*="Enter a column title"]').clear().type(title)
cy.get('.columnTypeSelection .vs__open-indicator').click({ force: true })
cy.get('.multiSelectOptionLabel').contains('Selection').click({ force: true })
cy.get('.modal-container label').contains('Multiple selection').click()
cy.get('[data-cy="createColumnMultipleSelectionSwitch"]').contains('Multiple selection').click()

// remove default option
cy.get('[data-cy="selection-option"] button').first().click()
cy.get('[data-cy="selection-option"] button').first().click()
cy.get('[data-cy="selectionOption"] button').first().click()
cy.get('[data-cy="selectionOption"] button').first().click()

// add wanted option
options?.forEach(option => {
cy.get('button').contains('Add option').click()
cy.get('[data-cy="selection-option-label"]').last().type(option)
cy.get('[data-cy="selectionOptionLabel"]').last().type(option)
if (defaultOptions?.includes(option)) {
cy.get('[data-cy="selection-option"] span label').last().click()
cy.get('[data-cy="selectionOption"] .checkbox-content').last().click()
}
})
cy.get('.modal-container button').contains('Save').click()
Expand All @@ -175,7 +175,7 @@ Cypress.Commands.add('createTextLineColumn', (title, defaultValue, maxLength, fi
cy.get('.button-vue__text').contains('Create column').click({ force: true })
} else {
cy.get('[data-cy="customTableAction"] button').click()
cy.get('.v-popper__popper li button span').contains('Create column').click({ force: true })
cy.get('[data-cy="dataTableCreateColumnBtn"]').contains('Create column').click({ force: true })
}
cy.get('.modal-container').get('input[placeholder*="Enter a column title"]').clear().type(title)
if (defaultValue) {
Expand All @@ -194,14 +194,14 @@ Cypress.Commands.add('createDatetimeColumn', (title, setNow, firstColumn) => {
cy.get('.button-vue__text').contains('Create column').click({ force: true })
} else {
cy.get('[data-cy="customTableAction"] button').click()
cy.get('.v-popper__popper li button span').contains('Create column').click({ force: true })
cy.get('[data-cy="dataTableCreateColumnBtn"]').contains('Create column').click({ force: true })
}
cy.get('.modal-container').get('input[placeholder*="Enter a column title"]').clear().type(title)
cy.get('.columnTypeSelection .vs__open-indicator').click({ force: true })
cy.get('.multiSelectOptionLabel').contains('Date and time').click({ force: true })

if (setNow) {
cy.get('[data-cy="DatetimeForm"] label').first().click()
cy.get('[data-cy="datetimeFormNowSwitch"]').click()
}

cy.get('.modal-container button').contains('Save').click()
Expand All @@ -214,15 +214,15 @@ Cypress.Commands.add('createDatetimeDateColumn', (title, setNow, firstColumn) =>
cy.get('.button-vue__text').contains('Create column').click({ force: true })
} else {
cy.get('[data-cy="customTableAction"] button').click()
cy.get('.v-popper__popper li button span').contains('Create column').click({ force: true })
cy.get('[data-cy="dataTableCreateColumnBtn"]').contains('Create column').click({ force: true })
}
cy.get('.modal-container').get('input[placeholder*="Enter a column title"]').clear().type(title)
cy.get('.columnTypeSelection .vs__open-indicator').click({ force: true })
cy.get('.multiSelectOptionLabel').contains('Date and time').click({ force: true })
cy.get('.modal-container label').contains('Date').click()
cy.get('[data-cy="createColumnDateSwitch"]').contains('Date').click()

if (setNow) {
cy.get('[data-cy="DatetimeDateForm"] label').first().click()
cy.get('[data-cy="datetimeDateFormTodaySwitch"]').click()
}

cy.get('.modal-container button').contains('Save').click()
Expand All @@ -235,15 +235,15 @@ Cypress.Commands.add('createDatetimeTimeColumn', (title, setNow, firstColumn) =>
cy.get('.button-vue__text').contains('Create column').click({ force: true })
} else {
cy.get('[data-cy="customTableAction"] button').click()
cy.get('.v-popper__popper li button span').contains('Create column').click({ force: true })
cy.get('[data-cy="dataTableCreateColumnBtn"]').contains('Create column').click({ force: true })
}
cy.get('.modal-container').get('input[placeholder*="Enter a column title"]').clear().type(title)
cy.get('.columnTypeSelection .vs__open-indicator').click({ force: true })
cy.get('.multiSelectOptionLabel').contains('Date and time').click({ force: true })
cy.get('.modal-container label').contains('Time').click()
cy.get('[data-cy="createColumnTimeSwitch"]').contains('Time').click()

if (setNow) {
cy.get('[data-cy="DatetimeTimeForm"] label').first().click()
cy.get('[data-cy="datetimeTimeFormNowSwitch"]').click()
}

cy.get('.modal-container button').contains('Save').click()
Expand All @@ -256,7 +256,7 @@ Cypress.Commands.add('createNumberColumn', (title, defaultValue, decimals, min,
cy.get('.button-vue__text').contains('Create column').click({ force: true })
} else {
cy.get('[data-cy="customTableAction"] button').click()
cy.get('.v-popper__popper li button span').contains('Create column').click({ force: true })
cy.get('[data-cy="dataTableCreateColumnBtn"]').contains('Create column').click({ force: true })
}
cy.get('.modal-container').get('input[placeholder*="Enter a column title"]').clear().type(title)
cy.get('.columnTypeSelection .vs__open-indicator').click({ force: true })
Expand Down Expand Up @@ -290,7 +290,7 @@ Cypress.Commands.add('createNumberProgressColumn', (title, defaultValue, firstCo
cy.get('.button-vue__text').contains('Create column').click({ force: true })
} else {
cy.get('[data-cy="customTableAction"] button').click()
cy.get('.v-popper__popper li button span').contains('Create column').click({ force: true })
cy.get('[data-cy="dataTableCreateColumnBtn"]').contains('Create column').click({ force: true })
}
cy.get('.modal-container').get('input[placeholder*="Enter a column title"]').clear().type(title)
cy.get('.columnTypeSelection .vs__open-indicator').click({ force: true })
Expand All @@ -309,7 +309,7 @@ Cypress.Commands.add('createNumberStarsColumn', (title, defaultValue, firstColum
cy.get('.button-vue__text').contains('Create column').click({ force: true })
} else {
cy.get('[data-cy="customTableAction"] button').click()
cy.get('.v-popper__popper li button span').contains('Create column').click({ force: true })
cy.get('[data-cy="dataTableCreateColumnBtn"]').contains('Create column').click({ force: true })
}
cy.get('.modal-container').get('input[placeholder*="Enter a column title"]').clear().type(title)
cy.get('.columnTypeSelection .vs__open-indicator').click({ force: true })
Expand All @@ -330,15 +330,15 @@ Cypress.Commands.add('createSelectionCheckColumn', (title, defaultValue, firstCo
cy.get('.button-vue__text').contains('Create column').click({ force: true })
} else {
cy.get('[data-cy="customTableAction"] button').click()
cy.get('.v-popper__popper li button span').contains('Create column').click({ force: true })
cy.get('[data-cy="dataTableCreateColumnBtn"]').contains('Create column').click({ force: true })
}
cy.get('.modal-container').get('input[placeholder*="Enter a column title"]').clear().type(title)
cy.get('.columnTypeSelection .vs__open-indicator').click({ force: true })
cy.get('.multiSelectOptionLabel').contains('Selection').click({ force: true })
cy.get('.modal-container label').contains('Yes/No').click()
cy.get('[data-cy="createColumnYesNoSwitch"').contains('Yes/No').click()

if (defaultValue) {
cy.get('[data-cy="SelectionCheckForm"] label').last().click()
cy.get('[data-cy="selectionCheckFormDefaultSwitch"]').click()
}
cy.get('.modal-container button').contains('Save').click()
cy.wait(10).get('.toastify.toast-success').should('be.visible')
Expand Down Expand Up @@ -438,5 +438,5 @@ Cypress.Commands.add('fillInValueSelectionMulti', (columnTitle, optionLabels) =>
})
})
Cypress.Commands.add('fillInValueSelectionCheck', (columnTitle) => {
cy.get('.modal__content [data-cy="' + columnTitle + '"] .checkbox-radio-switch__label').click()
cy.get('.modal__content [data-cy="' + columnTitle + '"] [data-cy="selectionCheckFormSwitch"]').click()
})
4 changes: 4 additions & 0 deletions cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@
// Import commands.js using ES2015 syntax:
import './commands'

Cypress.on('uncaught:exception', (err) => {
return !err.message.includes('ResizeObserver loop limit exceeded')
})

// Alternatively you can use CommonJS syntax:
// require('./commands')
Loading
Loading