-
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.
fix(design): Fix/545 reset frontend filter on table/view change (#551)
* fix: reset localViewFilter on every table/view change Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com> * test: add test for FE filter info - adjust and extend test command - add test scenario Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com> --------- Signed-off-by: Florian Steffens <florian.steffens@nextcloud.com>
- Loading branch information
Florian
authored
Sep 13, 2023
1 parent
6fef388
commit f969fc2
Showing
4 changed files
with
87 additions
and
40 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,67 @@ | ||
let localUser | ||
|
||
describe('The Home Page', () => { | ||
|
||
before(function() { | ||
cy.createRandomUser().then(user => { | ||
localUser = user | ||
}) | ||
}) | ||
|
||
beforeEach(function() { | ||
cy.login(localUser) | ||
cy.visit('apps/tables') | ||
}) | ||
|
||
it('FE Search in table', () => { | ||
cy.get('.app-navigation-entry-link').contains('Tutorial').click({ force: true }) | ||
|
||
// test case-sensitive | ||
cy.contains('Edit a row').should('exist') | ||
cy.get('.searchAndFilter input').type('tables') | ||
cy.contains('Edit a row').should('not.exist') | ||
cy.contains('Read the docs').should('exist') | ||
|
||
// test not case-sensitive | ||
cy.get('.searchAndFilter input').clear() | ||
cy.get('.searchAndFilter input').type('TABLES') | ||
cy.contains('Edit a row').should('not.exist') | ||
cy.contains('Read the docs').should('exist') | ||
|
||
// test search for number regarding a check field | ||
cy.get('.searchAndFilter input').clear() | ||
cy.get('.searchAndFilter input').type('3') | ||
cy.contains('Edit a row').should('not.exist') | ||
cy.contains('Read the docs').should('exist') | ||
}) | ||
|
||
it('Reset FE filter on table or view change', () => { | ||
// create a table and view, so we can change the active table and view later on | ||
cy.createTable('first table') | ||
cy.createTextLineColumn('colA', true) | ||
|
||
cy.createTable('second table') | ||
cy.createTextLineColumn('col1', true) | ||
|
||
// change between tables | ||
cy.loadTable('first table') | ||
cy.sortTableColumn('colA') | ||
cy.get('.info').contains('Reset local adjustments').should('be.visible') | ||
cy.loadTable('second table') | ||
cy.get('.info').contains('Reset local adjustments').should('not.exist') | ||
|
||
// change from view to table | ||
cy.createView('view for second table') | ||
cy.sortTableColumn('col1') | ||
cy.get('.info').contains('Reset local adjustments').should('be.visible') | ||
cy.loadTable('second table') | ||
cy.get('.info').contains('Reset local adjustments').should('not.exist') | ||
|
||
// change from table to view | ||
cy.loadTable('first table') | ||
cy.sortTableColumn('colA') | ||
cy.get('.info').contains('Reset local adjustments').should('be.visible') | ||
cy.loadView('view for second table') | ||
cy.get('.info').contains('Reset local adjustments').should('not.exist') | ||
}) | ||
}) |
This file was deleted.
Oops, something went wrong.
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
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