-
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 number stars
Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>
- Loading branch information
Florian Steffens
committed
Nov 13, 2023
1 parent
c3316d3
commit 6e666b2
Showing
2 changed files
with
67 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,46 @@ | ||
let localUser | ||
const columnTitle = 'stars' | ||
const tableTitle = 'Test number stars' | ||
|
||
describe('Test column stars', () => { | ||
|
||
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 values', () => { | ||
cy.loadTable(tableTitle) | ||
cy.createNumberStarsColumn(columnTitle, 2, true) | ||
|
||
// insert default value row | ||
cy.get('button').contains('Create row').click() | ||
cy.get('.modal__content').contains('β β βββ').should('be.visible') | ||
cy.get('button').contains('Save').click() | ||
cy.get('.custom-table table tr td div').contains('β β βββ').should('be.visible') | ||
|
||
// insert row | ||
cy.get('button').contains('Create row').click() | ||
cy.get('.slot button').last().click().click() | ||
cy.get('button').contains('Save').click() | ||
cy.get('.custom-table table tr td div').contains('β β β β β').should('be.visible') | ||
|
||
// insert row | ||
cy.get('button').contains('Create row').click() | ||
cy.get('.slot button').first().click().click() | ||
cy.get('button').contains('Save').click() | ||
cy.get('.custom-table table tr td div').contains('βββββ').should('be.visible') | ||
}) | ||
|
||
}) |
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