Skip to content

Commit

Permalink
Fix testcafe tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Alyar committed Sep 10, 2024
1 parent 1659ab4 commit c6374fa
Showing 1 changed file with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@ fixture.disablePageReloads`Resize columns - nextColumn mode`
const dataGrid = new DataGrid(DATA_GRID_SELECTOR);
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
const columnIndex = rtlEnabled ? 24 : 0;

await t.debug();
const scrollLeft = rtlEnabled ? -10000 : 10000;

// act
await dataGrid.resizeHeader(columnIndex, -100);

await takeScreenshot(`resize_first_fixed_column_with_left_position_1_(nextColumn_mode_and_rtl_=_${rtlEnabled}).png`, dataGrid.element);

// act
await dataGrid.scrollTo(t, { x: 10000 });
await dataGrid.scrollTo(t, { x: scrollLeft });

await takeScreenshot(`resize_first_fixed_column_with_left_position_2_(nextColumn_mode_and_rtl_=_${rtlEnabled}).png`, dataGrid.element);

Expand Down Expand Up @@ -53,16 +52,15 @@ fixture.disablePageReloads`Resize columns - nextColumn mode`
const dataGrid = new DataGrid(DATA_GRID_SELECTOR);
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
const columnIndex = rtlEnabled ? 1 : 23;

await t.debug();
const scrollLeft = rtlEnabled ? -10000 : 10000;

// act
await dataGrid.resizeHeader(columnIndex, -100);

await takeScreenshot(`resize_first_fixed_column_with_right_position_1_(nextColumn_mode_and_rtl_=_${rtlEnabled}).png`, dataGrid.element);

// act
await dataGrid.scrollTo(t, { x: 10000 });
await dataGrid.scrollTo(t, { x: scrollLeft });

await takeScreenshot(`resize_first_fixed_column_with_right_position_2_(nextColumn_mode_and_rtl_=_${rtlEnabled}).png`, dataGrid.element);

Expand Down Expand Up @@ -95,16 +93,15 @@ fixture.disablePageReloads`Resize columns - widget mode`
const dataGrid = new DataGrid(DATA_GRID_SELECTOR);
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
const columnIndex = rtlEnabled ? 24 : 0;

await t.debug();
const scrollLeft = rtlEnabled ? -10000 : 10000;

// act
await dataGrid.resizeHeader(columnIndex, 100);

await takeScreenshot(`resize_first_fixed_column_with_left_position_1_(widget_mode_and_rtl_=_${rtlEnabled}).png`, dataGrid.element);

// act
await dataGrid.scrollTo(t, { x: 10000 });
await dataGrid.scrollTo(t, { x: scrollLeft });

await takeScreenshot(`resize_first_fixed_column_with_left_position_2_(widget_mode_and_rtl_=_${rtlEnabled}).png`, dataGrid.element);

Expand Down Expand Up @@ -132,14 +129,15 @@ fixture.disablePageReloads`Resize columns - widget mode`
const dataGrid = new DataGrid(DATA_GRID_SELECTOR);
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
const columnIndex = rtlEnabled ? 1 : 23;
const scrollLeft = rtlEnabled ? -10000 : 10000;

// act
await dataGrid.resizeHeader(columnIndex, 100);

await takeScreenshot(`resize_first_fixed_column_with_right_position_1_(widget_mode_and_rtl_=_${rtlEnabled}).png`, dataGrid.element);

// act
await dataGrid.scrollTo(t, { x: 10000 });
await dataGrid.scrollTo(t, { x: scrollLeft });

await takeScreenshot(`resize_first_fixed_column_with_right_position_2_(widget_mode_and_rtl_=_${rtlEnabled}).png`, dataGrid.element);

Expand Down

0 comments on commit c6374fa

Please sign in to comment.