fix: UX tests linting (#3593)

This commit is contained in:
Florian Giroud 2021-02-07 21:27:12 +01:00 committed by GitHub
parent fb248495f1
commit 382c030a7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,79 +4,79 @@
describe('Checks Text-filter + Case Sensitive + Regex', () => { describe('Checks Text-filter + Case Sensitive + Regex', () => {
it('Test Exact string, check the number of occurrences', () => { it('Test Exact string, check the number of occurrences', () => {
cy.loadAndVisitProject('food.small') cy.loadAndVisitProject('food.small');
cy.columnActionClick('Shrt_Desc', ['Text filter']) cy.columnActionClick('Shrt_Desc', ['Text filter']);
cy.get('.input-container > input').should('be.visible').type('CHEESE') cy.get('.input-container > input').should('be.visible').type('CHEESE');
cy.get('#summary-bar > span').should( cy.get('#summary-bar > span').should(
'have.text', 'have.text',
'65 matching rows (199 total)' '65 matching rows (199 total)'
) );
}) });
it('Test Exact String with case sensitive', () => { it('Test Exact String with case sensitive', () => {
cy.loadAndVisitProject('food.small') cy.loadAndVisitProject('food.small');
cy.columnActionClick('Shrt_Desc', ['Text filter']) cy.columnActionClick('Shrt_Desc', ['Text filter']);
cy.get('.input-container > input').should('be.visible').type('Cheese') cy.get('.input-container > input').should('be.visible').type('Cheese');
cy.get('#summary-bar > span').should( cy.get('#summary-bar > span').should(
'have.text', 'have.text',
'65 matching rows (199 total)' '65 matching rows (199 total)'
) );
cy.get('#caseSensitiveCheckbox0').should('be.visible').click() cy.get('#caseSensitiveCheckbox0').should('be.visible').click();
cy.get('#summary-bar > span').should( cy.get('#summary-bar > span').should(
'have.text', 'have.text',
'0 matching rows (199 total)' '0 matching rows (199 total)'
) );
}) });
it('Test Partial String with case sensitive', () => { it('Test Partial String with case sensitive', () => {
cy.loadAndVisitProject('food.small') cy.loadAndVisitProject('food.small');
cy.columnActionClick('Shrt_Desc', ['Text filter']) cy.columnActionClick('Shrt_Desc', ['Text filter']);
cy.get('.input-container > input').should('be.visible').type('CHE') cy.get('.input-container > input').should('be.visible').type('CHE');
cy.get('#summary-bar > span').should( cy.get('#summary-bar > span').should(
'have.text', 'have.text',
'70 matching rows (199 total)' '70 matching rows (199 total)'
) );
cy.get('#caseSensitiveCheckbox0').click() cy.get('#caseSensitiveCheckbox0').click();
cy.get('#summary-bar > span').should( cy.get('#summary-bar > span').should(
'have.text', 'have.text',
'70 matching rows (199 total)' '70 matching rows (199 total)'
) );
}) });
it('check Regex option', () => { it('check Regex option', () => {
cy.loadAndVisitProject('food.small') cy.loadAndVisitProject('food.small');
cy.columnActionClick('Shrt_Desc', ['Text filter']) cy.columnActionClick('Shrt_Desc', ['Text filter']);
cy.get('.input-container > input').should('be.visible').type('[oO]G') cy.get('.input-container > input').should('be.visible').type('[oO]G');
cy.get('#summary-bar > span').should( cy.get('#summary-bar > span').should(
'have.text', 'have.text',
'0 matching rows (199 total)' '0 matching rows (199 total)'
) );
cy.get('#regexCheckbox0').click() cy.get('#regexCheckbox0').click();
cy.get('#summary-bar > span').should( cy.get('#summary-bar > span').should(
'have.text', 'have.text',
'15 matching rows (199 total)' '15 matching rows (199 total)'
) );
}) });
it('check Invert option and Reset Option', () => { it('check Invert option and Reset Option', () => {
cy.loadAndVisitProject('food.small') cy.loadAndVisitProject('food.small');
cy.columnActionClick('Shrt_Desc', ['Text filter']) cy.columnActionClick('Shrt_Desc', ['Text filter']);
cy.get('.input-container > input').should('be.visible').type('Cheese') cy.get('.input-container > input').should('be.visible').type('Cheese');
cy.get( cy.get(
'#facet-0 > div.facet-title.ui-sortable-handle > div > table > tbody > tr > td:nth-child(3) > a:nth-child(2)' '#facet-0 > div.facet-title.ui-sortable-handle > div > table > tbody > tr > td:nth-child(3) > a:nth-child(2)'
) )
.should('be.visible') .should('be.visible')
.click() .click();
cy.get('#summary-bar > span').should( cy.get('#summary-bar > span').should(
'have.text', 'have.text',
'134 matching rows (199 total)' '134 matching rows (199 total)'
) );
cy.get( cy.get(
'#facet-0 > div.facet-title.ui-sortable-handle > div > table > tbody > tr > td:nth-child(3) > a:nth-child(1)' '#facet-0 > div.facet-title.ui-sortable-handle > div > table > tbody > tr > td:nth-child(3) > a:nth-child(1)'
) )
.should('be.visible') .should('be.visible')
.click() .click();
cy.get('.input-container > input').should('have.value', '') cy.get('.input-container > input').should('have.value', '');
}) });
}) });