Skip to content

Commit e009b11

Browse files
committed
chore: add some missing types in Cypress tests
1 parent f4e7533 commit e009b11

8 files changed

Lines changed: 20 additions & 20 deletions

File tree

demos/aurelia/test/cypress/e2e/example05.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ describe('Example 5 - OData Grid', () => {
283283
.find('option')
284284
.last()
285285
.then((element) => {
286-
cy.get('.search-filter.filter-name select').select(element.val());
286+
cy.get('.search-filter.filter-name select').select(element.val() ?? '');
287287
});
288288

289289
cy.get('.search-filter.filter-name').find('input').clear().type('Jo%yn%er');

demos/aurelia/test/cypress/e2e/example48.cy.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { getScrollDistanceWhenDragOutsideGrid } from '../support/drag';
22

33
function testScroll(fromClass: string, toClass: string, fromRow: number, fromCol: number) {
4-
return getScrollDistanceWhenDragOutsideGrid(fromClass, 'topLeft', 'right', fromRow, fromCol, 165).then((cellScrollDistance) => {
5-
return getScrollDistanceWhenDragOutsideGrid(toClass, 'topLeft', 'bottom', fromRow, fromCol, 165).then((rowScrollDistance) => {
4+
return getScrollDistanceWhenDragOutsideGrid(fromClass, 'topLeft', 'right', fromRow, fromCol, 165).then((cellScrollDistance: any) => {
5+
return getScrollDistanceWhenDragOutsideGrid(toClass, 'topLeft', 'bottom', fromRow, fromCol, 165).then((rowScrollDistance: any) => {
66
return cy.wrap({
77
cell: {
88
scrollBefore: cellScrollDistance.scrollLeftBefore,
@@ -104,7 +104,7 @@ describe('Example 48 - Hybrid Selection Model', () => {
104104
it('should auto scroll take effect to display the selecting element when dragging', { scrollBehavior: false }, () => {
105105
cy.get('#grid48-1 .slick-viewport-top.slick-viewport-left').scrollTo('top');
106106

107-
testScroll('#grid48-1', '#grid48-1', 0, 1).then((scrollDistance) => {
107+
testScroll('#grid48-1', '#grid48-1', 0, 1).then((scrollDistance: { cell: any; row: any }) => {
108108
expect(scrollDistance.cell.scrollBefore).to.be.lte(scrollDistance.cell.scrollAfter);
109109
expect(scrollDistance.row.scrollBefore).to.be.lte(scrollDistance.row.scrollAfter);
110110
});
@@ -136,7 +136,7 @@ describe('Example 48 - Hybrid Selection Model', () => {
136136

137137
cy.get('#grid48-2 .slick-row[data-row="1"] .slick-cell.l3.r3').trigger('mouseup', 'bottomRight', { which: 1, force: true });
138138

139-
testScroll('#grid48-2', '#grid48-2', 0, 1).then((scrollDistance) => {
139+
testScroll('#grid48-2', '#grid48-2', 0, 1).then((scrollDistance: { cell: any; row: any }) => {
140140
expect(scrollDistance.cell.scrollBefore).to.be.lte(scrollDistance.cell.scrollAfter);
141141
expect(scrollDistance.row.scrollBefore).to.be.lte(scrollDistance.row.scrollAfter);
142142
});

demos/react/test/cypress/e2e/example05.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ describe('Example 5 - OData Grid', () => {
283283
.find('option')
284284
.last()
285285
.then((element) => {
286-
cy.get('.search-filter.filter-name select').select(element.val());
286+
cy.get('.search-filter.filter-name select').select(element.val() ?? '');
287287
});
288288

289289
cy.get('.search-filter.filter-name').find('input').clear().type('Jo%yn%er');

demos/react/test/cypress/e2e/example48.cy.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { getScrollDistanceWhenDragOutsideGrid } from '../support/drag';
22

33
function testScroll(fromClass: string, toClass: string, fromRow: number, fromCol: number) {
4-
return getScrollDistanceWhenDragOutsideGrid(fromClass, 'topLeft', 'right', fromRow, fromCol, 165).then((cellScrollDistance) => {
5-
return getScrollDistanceWhenDragOutsideGrid(toClass, 'topLeft', 'bottom', fromRow, fromCol, 165).then((rowScrollDistance) => {
4+
return getScrollDistanceWhenDragOutsideGrid(fromClass, 'topLeft', 'right', fromRow, fromCol, 165).then((cellScrollDistance: any) => {
5+
return getScrollDistanceWhenDragOutsideGrid(toClass, 'topLeft', 'bottom', fromRow, fromCol, 165).then((rowScrollDistance: any) => {
66
return cy.wrap({
77
cell: {
88
scrollBefore: cellScrollDistance.scrollLeftBefore,
@@ -104,7 +104,7 @@ describe('Example 48 - Hybrid Selection Model', () => {
104104
it('should auto scroll take effect to display the selecting element when dragging', { scrollBehavior: false }, () => {
105105
cy.get('#grid48-1 .slick-viewport-top.slick-viewport-left').scrollTo('top');
106106

107-
testScroll('#grid48-1', '#grid48-1', 0, 1).then((scrollDistance) => {
107+
testScroll('#grid48-1', '#grid48-1', 0, 1).then((scrollDistance: { cell: any; row: any }) => {
108108
expect(scrollDistance.cell.scrollBefore).to.be.lte(scrollDistance.cell.scrollAfter);
109109
expect(scrollDistance.row.scrollBefore).to.be.lte(scrollDistance.row.scrollAfter);
110110
});
@@ -136,7 +136,7 @@ describe('Example 48 - Hybrid Selection Model', () => {
136136

137137
cy.get('#grid48-2 .slick-row[data-row="1"] .slick-cell.l3.r3').trigger('mouseup', 'bottomRight', { which: 1, force: true });
138138

139-
testScroll('#grid48-2', '#grid48-2', 0, 1).then((scrollDistance) => {
139+
testScroll('#grid48-2', '#grid48-2', 0, 1).then((scrollDistance: { cell: any; row: any }) => {
140140
expect(scrollDistance.cell.scrollBefore).to.be.lte(scrollDistance.cell.scrollAfter);
141141
expect(scrollDistance.row.scrollBefore).to.be.lte(scrollDistance.row.scrollAfter);
142142
});

demos/vue/test/cypress/e2e/example05.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ describe('Example 5 - OData Grid', () => {
283283
.find('option')
284284
.last()
285285
.then((element) => {
286-
cy.get('.search-filter.filter-name select').select(element.val());
286+
cy.get('.search-filter.filter-name select').select(element.val() ?? '');
287287
});
288288

289289
cy.get('.search-filter.filter-name').find('input').clear().type('Jo%yn%er');

demos/vue/test/cypress/e2e/example48.cy.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { getScrollDistanceWhenDragOutsideGrid } from '../support/drag';
22

33
function testScroll(fromClass: string, toClass: string, fromRow: number, fromCol: number) {
4-
return getScrollDistanceWhenDragOutsideGrid(fromClass, 'topLeft', 'right', fromRow, fromCol, 165).then((cellScrollDistance) => {
5-
return getScrollDistanceWhenDragOutsideGrid(toClass, 'topLeft', 'bottom', fromRow, fromCol, 165).then((rowScrollDistance) => {
4+
return getScrollDistanceWhenDragOutsideGrid(fromClass, 'topLeft', 'right', fromRow, fromCol, 165).then((cellScrollDistance: any) => {
5+
return getScrollDistanceWhenDragOutsideGrid(toClass, 'topLeft', 'bottom', fromRow, fromCol, 165).then((rowScrollDistance: any) => {
66
return cy.wrap({
77
cell: {
88
scrollBefore: cellScrollDistance.scrollLeftBefore,
@@ -104,7 +104,7 @@ describe('Example 48 - Hybrid Selection Model', () => {
104104
it('should auto scroll take effect to display the selecting element when dragging', { scrollBehavior: false }, () => {
105105
cy.get('#grid48-1 .slick-viewport-top.slick-viewport-left').scrollTo('top');
106106

107-
testScroll('#grid48-1', '#grid48-1', 0, 1).then((scrollDistance) => {
107+
testScroll('#grid48-1', '#grid48-1', 0, 1).then((scrollDistance: { cell: any; row: any }) => {
108108
expect(scrollDistance.cell.scrollBefore).to.be.lte(scrollDistance.cell.scrollAfter);
109109
expect(scrollDistance.row.scrollBefore).to.be.lte(scrollDistance.row.scrollAfter);
110110
});
@@ -136,7 +136,7 @@ describe('Example 48 - Hybrid Selection Model', () => {
136136

137137
cy.get('#grid48-2 .slick-row[data-row="1"] .slick-cell.l3.r3').trigger('mouseup', 'bottomRight', { which: 1, force: true });
138138

139-
testScroll('#grid48-2', '#grid48-2', 0, 1).then((scrollDistance) => {
139+
testScroll('#grid48-2', '#grid48-2', 0, 1).then((scrollDistance: { cell: any; row: any }) => {
140140
expect(scrollDistance.cell.scrollBefore).to.be.lte(scrollDistance.cell.scrollAfter);
141141
expect(scrollDistance.row.scrollBefore).to.be.lte(scrollDistance.row.scrollAfter);
142142
});

frameworks/angular-slickgrid/test/cypress/e2e/example05.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ describe('Example 5 - OData Grid', () => {
282282
.find('option')
283283
.last()
284284
.then((element) => {
285-
cy.get('.search-filter.filter-name select').select(element.val());
285+
cy.get('.search-filter.filter-name select').select(element.val() ?? '');
286286
});
287287

288288
cy.get('.search-filter.filter-name').find('input').clear().type('Jo%yn%er');

frameworks/angular-slickgrid/test/cypress/e2e/example48.cy.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { getScrollDistanceWhenDragOutsideGrid } from '../support/drag';
22

33
function testScroll(fromClass: string, toClass: string, fromRow: number, fromCol: number) {
4-
return getScrollDistanceWhenDragOutsideGrid(fromClass, 'topLeft', 'right', fromRow, fromCol, 165).then((cellScrollDistance) => {
5-
return getScrollDistanceWhenDragOutsideGrid(toClass, 'topLeft', 'bottom', fromRow, fromCol, 165).then((rowScrollDistance) => {
4+
return getScrollDistanceWhenDragOutsideGrid(fromClass, 'topLeft', 'right', fromRow, fromCol, 165).then((cellScrollDistance: any) => {
5+
return getScrollDistanceWhenDragOutsideGrid(toClass, 'topLeft', 'bottom', fromRow, fromCol, 165).then((rowScrollDistance: any) => {
66
return cy.wrap({
77
cell: {
88
scrollBefore: cellScrollDistance.scrollLeftBefore,
@@ -104,7 +104,7 @@ describe('Example 48 - Hybrid Selection Model', () => {
104104
it('should auto scroll take effect to display the selecting element when dragging', { scrollBehavior: false }, () => {
105105
cy.get('#grid48-1 .slick-viewport-top.slick-viewport-left').scrollTo('top');
106106

107-
testScroll('#grid48-1', '#grid48-1', 0, 1).then((scrollDistance) => {
107+
testScroll('#grid48-1', '#grid48-1', 0, 1).then((scrollDistance: { cell: any; row: any }) => {
108108
expect(scrollDistance.cell.scrollBefore).to.be.lte(scrollDistance.cell.scrollAfter);
109109
expect(scrollDistance.row.scrollBefore).to.be.lte(scrollDistance.row.scrollAfter);
110110
});
@@ -136,7 +136,7 @@ describe('Example 48 - Hybrid Selection Model', () => {
136136

137137
cy.get('#grid48-2 .slick-row[data-row="1"] .slick-cell.l3.r3').trigger('mouseup', 'bottomRight', { which: 1, force: true });
138138

139-
testScroll('#grid48-2', '#grid48-2', 0, 1).then((scrollDistance) => {
139+
testScroll('#grid48-2', '#grid48-2', 0, 1).then((scrollDistance: { cell: any; row: any }) => {
140140
expect(scrollDistance.cell.scrollBefore).to.be.lte(scrollDistance.cell.scrollAfter);
141141
expect(scrollDistance.row.scrollBefore).to.be.lte(scrollDistance.row.scrollAfter);
142142
});

0 commit comments

Comments
 (0)