-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add end2end test for column type selection check
Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>
- Loading branch information
Florian Steffens
committed
Nov 13, 2023
1 parent
b75d163
commit 6b58f3c
Showing
2 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
let localUser | ||
const columnTitle = 'check' | ||
const tableTitle = 'Test selection check' | ||
|
||
describe('Test column ' + columnTitle, () => { | ||
|
||
before(function() { | ||
cy.createRandomUser().then(user => { | ||
localUser = user | ||
cy.login(localUser) | ||
}) | ||
}) | ||
|
||
beforeEach(function() { | ||
cy.login(localUser) | ||
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) | ||
|
||
// insert row | ||
cy.get('button').contains('Create row').click() | ||
cy.get('button').contains('Save').click() | ||
cy.get('.custom-table table tr td div .material-design-icon.radiobox-blank-icon').should('be.visible') | ||
|
||
// insert row | ||
cy.get('button').contains('Create row').click() | ||
cy.get('.modal__content .checkbox-radio-switch__label').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') | ||
|
||
cy.removeColumn(columnTitle) | ||
}) | ||
|
||
it('Insert and test rows - default value checked', () => { | ||
cy.loadTable(tableTitle) | ||
cy.createSelectionCheckColumn(columnTitle, true, true) | ||
|
||
// insert row | ||
cy.get('button').contains('Create row').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') | ||
|
||
// insert row | ||
cy.get('button').contains('Create row').click() | ||
cy.get('.modal__content .checkbox-radio-switch__label').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') | ||
|
||
cy.removeColumn(columnTitle) | ||
}) | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters