Skip to content

Commit

Permalink
tests: fix slider range failing Cypress E2E tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Nov 4, 2022
1 parent cd12ec1 commit f595008
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions test/cypress/e2e/example05.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Example 05 - Tree Data (from a flat dataset with parentId references)'
});

it('should have a Grid Preset Filter on 3rd column "% Complete" and expect all rows to be filtered as well', () => {
cy.get('.input-group-text.rangeOutput_percentComplete')
cy.get('.input-group-text.highest-range-percentComplete')
.contains('25');

cy.get('.search-filter.filter-percentComplete')
Expand Down Expand Up @@ -115,7 +115,7 @@ describe('Example 05 - Tree Data (from a flat dataset with parentId references)'
cy.get('.search-filter.filter-percentComplete .operator .form-control')
.should('have.value', '>=');

cy.get('.rangeInput_percentComplete')
cy.get('input.slider-filter-input')
.invoke('val')
.then(text => expect(text).to.eq('25'));

Expand Down Expand Up @@ -156,7 +156,7 @@ describe('Example 05 - Tree Data (from a flat dataset with parentId references)'
cy.get('.search-filter.filter-percentComplete .operator .form-control')
.should('have.value', '');

cy.get('.rangeInput_percentComplete')
cy.get('input.slider-filter-input')
.invoke('val')
.then(text => expect(text).to.eq('0'));

Expand Down Expand Up @@ -230,7 +230,7 @@ describe('Example 05 - Tree Data (from a flat dataset with parentId references)'

cy.get('.slick-viewport-top.slick-viewport-left')
.scrollTo('top');

const now = new Date();
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
const today = changeTimezone(now, tz);
Expand Down
12 changes: 6 additions & 6 deletions test/cypress/e2e/example11.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ describe('Example 11 - Batch Editing', { retries: 1 }, () => {
it('should not have filters set', () => {
cy.get('.selected-view').should('contain', '');

cy.get('.rangeInput_percentComplete')
cy.get('input.slider-filter-input')
.invoke('val')
.then(text => expect(text).to.eq('0'));

Expand All @@ -218,7 +218,7 @@ describe('Example 11 - Batch Editing', { retries: 1 }, () => {
.children()
.each(($child, index) => expect($child.text()).to.eq(expectedTitles[index]));

cy.get('.rangeInput_percentComplete')
cy.get('input.slider-filter-input')
.invoke('val')
.then(text => expect(text).to.eq('50'));

Expand Down Expand Up @@ -315,7 +315,7 @@ describe('Example 11 - Batch Editing', { retries: 1 }, () => {
.children()
.each(($child, index) => expect($child.text()).to.eq(expectedTitles[index]));

cy.get('.rangeInput_percentComplete')
cy.get('input.slider-filter-input')
.invoke('val')
.then(text => expect(text).to.eq('0'));

Expand Down Expand Up @@ -449,7 +449,7 @@ describe('Example 11 - Batch Editing', { retries: 1 }, () => {
cy.get('.slick-sort-indicator.slick-sort-indicator-desc')
.should('have.length', 0);

cy.get('.rangeInput_percentComplete')
cy.get('input.slider-filter-input')
.invoke('val')
.then(text => expect(text).to.eq('0'));

Expand Down Expand Up @@ -497,7 +497,7 @@ describe('Example 11 - Batch Editing', { retries: 1 }, () => {
cy.get('.slick-sort-indicator.slick-sort-indicator-desc')
.should('have.length', 0);

cy.get('.rangeInput_percentComplete')
cy.get('input.slider-filter-input')
.invoke('val')
.then(text => expect(text).to.eq('0'));

Expand Down Expand Up @@ -670,7 +670,7 @@ describe('Example 11 - Batch Editing', { retries: 1 }, () => {
.children()
.each(($child, index) => expect($child.text()).to.eq(expectedTitles[index]));

cy.get('.rangeInput_percentComplete')
cy.get('input.slider-filter-input')
.invoke('val')
.then(text => expect(text).to.eq('50'));

Expand Down

0 comments on commit f595008

Please sign in to comment.