Skip to content

Commit 2ad3024

Browse files
test: Update row action tests
AI-assistant: Claude Code v2.1.101 (Claude Sonnet 4.6) Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
1 parent a4d4218 commit 2ad3024

2 files changed

Lines changed: 51 additions & 1 deletion

File tree

cypress/e2e/tables-table.cy.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,55 @@ describe('Manage a table', () => {
9090
cy.deleteTable('New list')
9191
})
9292

93+
it('Delete row via row action menu', () => {
94+
cy.createTable('Delete row test')
95+
cy.loadTable('Delete row test')
96+
cy.createTextLineColumn('title', null, null, true)
97+
98+
cy.get('[data-cy="createRowBtn"]').click()
99+
cy.get('[data-cy="createRowModal"] input').first().clear().type('row to delete')
100+
cy.get('[data-cy="createRowSaveButton"]').click()
101+
cy.get('[data-cy="createRowModal"]').should('not.exist')
102+
103+
cy.contains('[data-cy="ncTable"] [data-cy="customTableRow"]', 'row to delete').should('be.visible')
104+
105+
cy.contains('[data-cy="ncTable"] [data-cy="customTableRow"]', 'row to delete')
106+
.closest('[data-cy="customTableRow"]')
107+
.find('[data-cy="rowActionMenu"] button')
108+
.click()
109+
cy.get('[data-cy="deleteRowBtn"]').click()
110+
cy.get('.dialog__actions button').contains('Delete').click()
111+
112+
cy.contains('[data-cy="ncTable"] [data-cy="customTableRow"]', 'row to delete').should('not.exist')
113+
})
114+
115+
it('Copy row via row action menu prefills create dialog', () => {
116+
cy.createTable('Copy row test')
117+
cy.loadTable('Copy row test')
118+
cy.createTextLineColumn('title', null, null, true)
119+
120+
cy.get('[data-cy="createRowBtn"]').click()
121+
cy.get('[data-cy="createRowModal"] input').first().clear().type('original row')
122+
cy.get('[data-cy="createRowSaveButton"]').click()
123+
cy.get('[data-cy="createRowModal"]').should('not.exist')
124+
125+
cy.contains('[data-cy="ncTable"] [data-cy="customTableRow"]', 'original row')
126+
.closest('[data-cy="customTableRow"]')
127+
.find('[data-cy="rowActionMenu"] button')
128+
.click()
129+
cy.get('[data-cy="copyRowBtn"]').click()
130+
131+
cy.get('[data-cy="createRowModal"]').should('be.visible')
132+
cy.get('[data-cy="createRowModal"] input').first().should('have.value', 'original row')
133+
134+
cy.get('[data-cy="createRowModal"] input').first().clear().type('copied row')
135+
cy.get('[data-cy="createRowSaveButton"]').click()
136+
cy.get('[data-cy="createRowModal"]').should('not.exist')
137+
138+
cy.contains('[data-cy="ncTable"] [data-cy="customTableRow"]', 'original row').should('be.visible')
139+
cy.contains('[data-cy="ncTable"] [data-cy="customTableRow"]', 'copied row').should('be.visible')
140+
})
141+
93142
it('Transfer', () => {
94143
cy.get('.icon-loading').should('not.exist')
95144
cy.get('[data-cy="navigationCreateTableIcon"]').click({ force: true })

cypress/e2e/view-filtering-selection-row-removal.cy.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ describe('Filtering in a view by selection columns (Cypress supplement – row r
170170
// # edit checked row
171171
// ## uncheck
172172
cy.intercept({ method: 'PUT', url: '**/apps/tables/row/*' }).as('updateCheckedRow')
173-
cy.contains('[data-cy="ncTable"] [data-cy="customTableRow"]', 'checked row').closest('[data-cy="customTableRow"]').find('[data-cy="editRowBtn"]').click()
173+
cy.contains('[data-cy="ncTable"] [data-cy="customTableRow"]', 'checked row').closest('[data-cy="customTableRow"]').find('[data-cy="rowActionMenu"] button').click()
174+
cy.get('[data-cy="editRowBtn"]').click()
174175
cy.get('[data-cy="editRowModal"] .checkbox-radio-switch').click()
175176
cy.get('[data-cy="editRowSaveButton"]').click()
176177

0 commit comments

Comments
 (0)