Skip to content

Commit

Permalink
fix cypress
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr committed Jun 27, 2024
1 parent 7a5b780 commit 823e7f5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 2 additions & 0 deletions cypress/e2e/column-number-progress.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ describe('Test column progress', () => {
cy.createRandomUser().then(user => {
localUser = user
cy.login(localUser)
cy.visit('apps/tables')
cy.createTable(tableTitle)
})
})

Expand Down
10 changes: 4 additions & 6 deletions cypress/e2e/column-selection-check.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ describe('Test column ' + columnTitle, () => {
cy.createRandomUser().then(user => {
localUser = user
cy.login(localUser)
cy.visit('apps/tables')
cy.createTable(tableTitle)
})
})

Expand All @@ -16,10 +18,6 @@ describe('Test column ' + columnTitle, () => {
cy.visit('apps/tables')
})

it('Table and column setup', () => {
cy.createTable(tableTitle)
})

it('Insert and test rows - default value unchecked', () => {
cy.loadTable(tableTitle)
cy.createSelectionCheckColumn(columnTitle, null, true)
Expand All @@ -31,7 +29,7 @@ describe('Test column ' + columnTitle, () => {

// insert row
cy.get('button').contains('Create row').click()
cy.get('[data-cy="selectionCheckFormSwitch"]').first().click()
cy.get('[data-cy="selectionCheckFormSwitch"]').first().click({ force: true })
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 +47,7 @@ describe('Test column ' + columnTitle, () => {

// insert row
cy.get('button').contains('Create row').click()
cy.get('[data-cy="selectionCheckFormSwitch"]').first().click()
cy.get('[data-cy="selectionCheckFormSwitch"]').first().click({ force: true })
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
2 changes: 1 addition & 1 deletion cypress/e2e/tables-table.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('Manage a table', () => {

cy.get('.modal__content button').contains('Select from Files').click()
cy.get('.file-picker__files').contains('test-import').click()
cy.get('.file-picker button span').contains('Choose test-import.csv').click()
cy.get('.file-picker button span').contains('Import').click()
cy.get('.modal__content button').contains('Import').click()
cy.get('[data-cy="importResultColumnsFound"]').should('contain.text', '4')
cy.get('[data-cy="importResultColumnsMatch"]').should('contain.text', '0')
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Cypress.Commands.add('createDatetimeDateColumn', (title, setNow, firstColumn) =>
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('[data-cy="createColumnDateSwitch"]').contains('Date').click({ force: true })
cy.get('[data-cy="createColumnDateSwitch"]').parent().contains('Date').click({ force: true })

if (setNow) {
cy.get('[data-cy="datetimeDateFormTodaySwitch"]').click({ force: true })
Expand All @@ -209,7 +209,7 @@ Cypress.Commands.add('createDatetimeTimeColumn', (title, setNow, firstColumn) =>
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('[data-cy="createColumnTimeSwitch"]').contains('Time').click({ force: true })
cy.get('[data-cy="createColumnTimeSwitch"]').parent().contains('Time').click({ force: true })

if (setNow) {
cy.get('[data-cy="datetimeTimeFormNowSwitch"]').click({ force: true })
Expand Down

0 comments on commit 823e7f5

Please sign in to comment.