@@ -5,13 +5,19 @@ import { createWidget } from '../../../helpers/createWidget';
55import { data } from '../helpers/simpleArrayData' ;
66import { testScreenshot } from '../../../helpers/themeUtils' ;
77import { a11yCheck } from '../../../helpers/accessibility/utils' ;
8+ import { safeSizeTest } from '../../../helpers/safeSizeTest' ;
89
910fixture . disablePageReloads `CardView - Sorting Behavior`
1011 . page ( url ( __dirname , '../../container.html' ) ) ;
1112
1213const CARD_VIEW_SELECTOR = '#container' ;
1314
14- test ( 'Sort index API' , async ( t ) => {
15+ const baseConfig = {
16+ dataSource : data ,
17+ height : 500 ,
18+ } ;
19+
20+ safeSizeTest ( 'Sort index API' , async ( t ) => {
1521 const { takeScreenshot, compareResults } = createScreenshotsComparer ( t ) ;
1622 const cardView = new CardView ( CARD_VIEW_SELECTOR ) ;
1723
@@ -23,7 +29,7 @@ test('Sort index API', async (t) => {
2329 await a11yCheck ( t , { } , CARD_VIEW_SELECTOR ) ;
2430} ) . before ( async ( ) => {
2531 await createWidget ( 'dxCardView' , {
26- dataSource : data ,
32+ ... baseConfig ,
2733 columns : [
2834 {
2935 dataField : 'id' ,
@@ -45,7 +51,7 @@ test('Sort index API', async (t) => {
4551 } ) ;
4652} ) ;
4753
48- test ( 'ShowSortIndexes API' , async ( t ) => {
54+ safeSizeTest ( 'ShowSortIndexes API' , async ( t ) => {
4955 const { takeScreenshot, compareResults } = createScreenshotsComparer ( t ) ;
5056 const cardView = new CardView ( CARD_VIEW_SELECTOR ) ;
5157
@@ -57,7 +63,7 @@ test('ShowSortIndexes API', async (t) => {
5763 await a11yCheck ( t , { } , CARD_VIEW_SELECTOR ) ;
5864} ) . before ( async ( ) => {
5965 await createWidget ( 'dxCardView' , {
60- dataSource : data ,
66+ ... baseConfig ,
6167 sorting : {
6268 showSortIndexes : false ,
6369 } ,
@@ -82,7 +88,7 @@ test('ShowSortIndexes API', async (t) => {
8288 } ) ;
8389} ) ;
8490
85- test ( 'AllowSorting API' , async ( t ) => {
91+ safeSizeTest ( 'AllowSorting API' , async ( t ) => {
8692 const { takeScreenshot, compareResults } = createScreenshotsComparer ( t ) ;
8793 const cardView = new CardView ( CARD_VIEW_SELECTOR ) ;
8894
@@ -97,7 +103,7 @@ test('AllowSorting API', async (t) => {
97103 await a11yCheck ( t , { } , CARD_VIEW_SELECTOR ) ;
98104} ) . before ( async ( ) => {
99105 await createWidget ( 'dxCardView' , {
100- dataSource : data ,
106+ ... baseConfig ,
101107 sorting : {
102108 showSortIndexes : false ,
103109 } ,
@@ -129,7 +135,7 @@ test('AllowSorting API', async (t) => {
129135 } ,
130136 'name' ,
131137] . forEach ( ( calculateSortValue ) => {
132- test ( 'CalculateSortValue API' , async ( t ) => {
138+ safeSizeTest ( 'CalculateSortValue API' , async ( t ) => {
133139 const { takeScreenshot, compareResults } = createScreenshotsComparer ( t ) ;
134140 const cardView = new CardView ( CARD_VIEW_SELECTOR ) ;
135141
@@ -141,7 +147,7 @@ test('AllowSorting API', async (t) => {
141147 await a11yCheck ( t , { } , CARD_VIEW_SELECTOR ) ;
142148 } ) . before ( async ( ) => {
143149 await createWidget ( 'dxCardView' , {
144- dataSource : data ,
150+ ... baseConfig ,
145151 sorting : {
146152 showSortIndexes : false ,
147153 } ,
@@ -165,7 +171,7 @@ test('AllowSorting API', async (t) => {
165171 } ) ;
166172} ) ;
167173
168- test ( 'SortingMethod API' , async ( t ) => {
174+ safeSizeTest ( 'SortingMethod API' , async ( t ) => {
169175 const { takeScreenshot, compareResults } = createScreenshotsComparer ( t ) ;
170176 const cardView = new CardView ( CARD_VIEW_SELECTOR ) ;
171177
@@ -177,7 +183,7 @@ test('SortingMethod API', async (t) => {
177183 await a11yCheck ( t , { } , CARD_VIEW_SELECTOR ) ;
178184} ) . before ( async ( ) => {
179185 await createWidget ( 'dxCardView' , {
180- dataSource : data ,
186+ ... baseConfig ,
181187 sorting : {
182188 showSortIndexes : false ,
183189 } ,
0 commit comments