Skip to content

Commit

Permalink
test(aggrid): regression test for v28 and v29 (#1698)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielleroux authored Feb 17, 2025
1 parent 2d4e3b8 commit 8bec56d
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/aggrid/tests/aggrid.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ regressionTest.describe('aggrid', () => {
await page.getByRole('columnheader').nth(0).hover();
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot();
});

regressionTest('29', async ({ page }) => {
await page.goto('basic_v29.html');

await page.getByRole('columnheader').nth(0).hover();
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot();
});

regressionTest('28', async ({ page }) => {
await page.goto('basic_v28.html');

await page.getByRole('columnheader').nth(0).hover();
expect(await page.screenshot({ fullPage: true })).toMatchSnapshot();
});
});

regressionTest('filter', async ({ page }) => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions packages/aggrid/tests/basic_v28.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!--
SPDX-FileCopyrightText: 2024 Siemens AG
SPDX-License-Identifier: MIT
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
-->
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/ag-grid-community@28/dist/ag-grid-community.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/ag-grid-community@28/styles/ag-grid.css" />
<link rel="stylesheet" href="https://unpkg.com/ag-grid-community@28/styles/ag-theme-alpine.css" />

<link rel="stylesheet" href="/dist/ix-aggrid/ix-aggrid.css" />
<link rel="stylesheet" href="/www/siemens-ix.css" />
<link rel="stylesheet" href="/www/ix-icons.css" />
<style>
body {
min-height: 100vh;
width: 100%;
}
</style>
</head>
<body>
<div style="width: 100%; height: 100%" class="ag-theme-alpine-dark ag-theme-ix"></div>
<script type="module">
import { themeSwitcher } from './utils/test/theme-switcher.js';

themeSwitcher();

(() => {
const columnDefs = [
{ field: 'make', resizable: true, checkboxSelection: true },
{ field: 'model', resizable: true, sortable: true, filter: true },
{ field: 'price', resizable: true, editable: true },
];

const rowData = [
{ make: 'Toyota', model: 'Celica', price: 35000, checked: false },
{ make: 'Ford', model: 'Mondeo', price: 32000, checked: true },
{ make: 'Porsche', model: 'Boxster', price: 72000, checked: false },
];

const gridOptions = {
columnDefs: columnDefs,
rowData: rowData,
rowSelection: 'multiple',
suppressCellFocus: true,
};

const gridDiv = document.querySelector('div.ag-theme-ix');
const grid = new agGrid.Grid(gridDiv, gridOptions);
})();
</script>
</body>
</html>
57 changes: 57 additions & 0 deletions packages/aggrid/tests/basic_v29.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!--
SPDX-FileCopyrightText: 2024 Siemens AG
SPDX-License-Identifier: MIT
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
-->
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/ag-grid-community@29/dist/ag-grid-community.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/ag-grid-community@29/styles/ag-grid.css" />
<link rel="stylesheet" href="https://unpkg.com/ag-grid-community@29/styles/ag-theme-alpine.css" />

<link rel="stylesheet" href="/dist/ix-aggrid/ix-aggrid.css" />
<link rel="stylesheet" href="/www/siemens-ix.css" />
<link rel="stylesheet" href="/www/ix-icons.css" />
<style>
body {
min-height: 100vh;
width: 100%;
}
</style>
</head>
<body>
<div style="width: 100%; height: 100%" class="ag-theme-alpine-dark ag-theme-ix"></div>
<script type="module">
import { themeSwitcher } from './utils/test/theme-switcher.js';

themeSwitcher();

(() => {
const columnDefs = [
{ field: 'make', resizable: true, checkboxSelection: true },
{ field: 'model', resizable: true, sortable: true, filter: true },
{ field: 'price', resizable: true, editable: true },
];

const rowData = [
{ make: 'Toyota', model: 'Celica', price: 35000, checked: false },
{ make: 'Ford', model: 'Mondeo', price: 32000, checked: true },
{ make: 'Porsche', model: 'Boxster', price: 72000, checked: false },
];

const gridOptions = {
columnDefs: columnDefs,
rowData: rowData,
rowSelection: 'multiple',
suppressCellFocus: true,
};

const gridDiv = document.querySelector('div.ag-theme-ix');
const grid = new agGrid.Grid(gridDiv, gridOptions);
})();
</script>
</body>
</html>

0 comments on commit 8bec56d

Please sign in to comment.