Skip to content
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
23 changes: 15 additions & 8 deletions cypress/e2e/tables-table.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,31 @@ describe('Manage a table', () => {
cy.get('[data-cy="importResultRowErrors"]').should('contain.text', '0')
})

it('Update title And Description', () => {
cy.get('.app-navigation__list').contains('to do list').click({ force: true })
it('Update description', () => {
cy.loadTable('to do list')
cy.get('[data-cy="customTableAction"] button').click()
cy.get('.action-button__text').contains('Edit table').click()
cy.get('[data-cy="dataTableEditTableBtn"]').click()

cy.get('[data-cy="editTableModal"]').should('be.visible')
cy.get('.modal-container input').last().should('be.visible').should('be.enabled')
cy.get('.modal-container input').last().clear().type('ToDo list')
cy.get('.modal__content #description-editor .tiptap.ProseMirror').type('Updated ToDo List description')
cy.get('.modal-container button').contains('Save').click()
cy.get('[data-cy="editTableSaveBtn"]').should('be.enabled').click()

cy.wait(10).get('.toastify.toast-success').should('be.visible')
cy.get('.app-navigation__list').contains('ToDo list').should('exist')
// cy.get('.app-navigation__list').contains('ToDo list').should('exist')
cy.contains('.text-editor__content p', 'Updated ToDo List description').should('be.visible')
})

it('Delete', () => {
cy.deleteTable('ToDo list')
cy.createTable('New list')
cy.loadTable('New list')
cy.createTextLineColumn('text line', 'test', '12', true)
cy.get('[data-cy="createRowBtn"]').click()
cy.get('[data-cy="createRowModal"] input').first().should('be.visible')
cy.get('[data-cy="createRowModal"] input').first().clear().type('hello world')
cy.get('[data-cy="createRowSaveButton"]').click()
cy.deleteTable('New list')
})

it('Transfer', () => {
Expand All @@ -90,9 +97,9 @@ describe('Manage a table', () => {
cy.get('.tile').contains('ToDo').click({ force: true })
cy.contains('button', 'Create table').click()

cy.get('.app-navigation__list').contains('test table').click({ force: true })
cy.loadTable('test table')
cy.get('[data-cy="customTableAction"] button').click()
cy.get('.action-button__text').contains('Edit table').click()
cy.get('[data-cy="dataTableEditTableBtn"]').click()

cy.get('[data-cy="editTableModal"]').should('be.visible')
cy.get('[data-cy="editTableModal"] button').contains('Change owner').click()
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Cypress.Commands.add('deleteTable', (title) => {
cy.get('[data-cy="editTableModal"] [data-cy="editTableDeleteBtn"]').click()
cy.get('[data-cy="editTableModal"] [data-cy="editTableConfirmDeleteBtn"]').click()
cy.wait(10).get('.toastify.toast-success').should('be.visible')
cy.get('[data-cy="navigationTableItem"]').contains('to do list').should('not.exist')
cy.get('[data-cy="navigationTableItem"]').contains(title).should('not.exist')
})


Expand Down
2 changes: 1 addition & 1 deletion src/modules/modals/EditTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<NcButton v-if="ownsTable(localTable)" @click="actionTransfer">
{{ t('tables', 'Change owner') }}
</NcButton>
<NcButton type="primary" @click="submit">
<NcButton type="primary" data-cy="editTableSaveBtn" @click="submit">
{{ t('tables', 'Save') }}
</NcButton>
</div>
Expand Down