-
Notifications
You must be signed in to change notification settings - Fork 667
DataGrid: Fix the banded Columns' vertical borders (T1318812) #32802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Alyar666
wants to merge
3
commits into
DevExpress:26_1
Choose a base branch
from
Alyar666:T1318812_26_1_attempt_3
base: 26_1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+216
−111
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
e2e/testcafe-devextreme/tests/dataGrid/common/bandColumns/functional.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| import Button from 'devextreme-testcafe-models/button'; | ||
| import DataGrid from 'devextreme-testcafe-models/dataGrid'; | ||
| import url from '../../../../helpers/getPageUrl'; | ||
| import { createWidget } from '../../../../helpers/createWidget'; | ||
|
|
||
| fixture.disablePageReloads`Band columns.Functional` | ||
| .page(url(__dirname, '../../../container.html')); | ||
|
|
||
| const GRID_CONTAINER = '#container'; | ||
|
|
||
| test('Changing dataField for a banded column with the columnOption method does not work as expected (T1210340)', async (t) => { | ||
| const dataGrid = new DataGrid(GRID_CONTAINER); | ||
| const changeFieldButton = new Button('#otherContainer'); | ||
|
|
||
| await t | ||
| .expect(dataGrid.getDataCell(0, 4).element.innerText) | ||
| .eql('2353025') | ||
| .click(changeFieldButton.element) | ||
| .expect(dataGrid.getDataCell(0, 4).element.innerText) | ||
| .eql('0.672'); | ||
| }).before(async () => { | ||
| await createWidget('dxDataGrid', { | ||
| dataSource: [{ | ||
| id: 1, | ||
| Country: 'Brazil', | ||
| Area: 8515767, | ||
| Population_Urban: 0.85, | ||
| Population_Rural: 0.15, | ||
| Population_Total: 205809000, | ||
| GDP_Agriculture: 0.054, | ||
| GDP_Industry: 0.274, | ||
| GDP_Services: 0.672, | ||
| GDP_Total: 2353025, | ||
| }], | ||
| columns: [ | ||
| 'Country', | ||
| 'Area', { | ||
| caption: 'Population', | ||
| columns: [ | ||
| 'Population_Total', | ||
| 'Population_Urban', | ||
| ], | ||
| }, { | ||
| caption: 'Nominal GDP', | ||
| columns: [{ | ||
| caption: 'Total, mln $', | ||
| dataField: 'GDP_Total', | ||
| name: 'GDP_Total', | ||
| }, { | ||
| caption: 'By Sector', | ||
| columns: [{ | ||
| caption: 'Agriculture', | ||
| dataField: 'GDP_Agriculture', | ||
| }, { | ||
| caption: 'Industry', | ||
| dataField: 'GDP_Industry', | ||
| format: { | ||
| type: 'percent', | ||
| }, | ||
| }, { | ||
| caption: 'Services', | ||
| dataField: 'GDP_Services', | ||
| }], | ||
| }], | ||
| }], | ||
| keyExpr: 'id', | ||
| showBorders: true, | ||
| }); | ||
|
|
||
| await createWidget('dxButton', { | ||
| text: 'Change fields', | ||
| onClick() { | ||
| const grid = ($('#container') as any).dxDataGrid('instance'); | ||
| grid.columnOption('GDP_Total', 'dataField', 'GDP_Services'); | ||
| }, | ||
| }, '#otherContainer'); | ||
| }); |
101 changes: 101 additions & 0 deletions
101
e2e/testcafe-devextreme/tests/dataGrid/common/bandColumns/matrix.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| import { createScreenshotsComparer } from 'devextreme-screenshot-comparer'; | ||
| import DataGrid from 'devextreme-testcafe-models/dataGrid'; | ||
| import url from '../../../../helpers/getPageUrl'; | ||
| import { createWidget } from '../../../../helpers/createWidget'; | ||
| import { testScreenshot } from '../../../../helpers/themeUtils'; | ||
|
|
||
| fixture.disablePageReloads`Band columns.Matrix` | ||
| .page(url(__dirname, '../../../container.html')); | ||
|
|
||
| const GRID_CONTAINER = '#container'; | ||
|
|
||
| const configs = [{ | ||
| showColumnLines: true, | ||
| rtlEnabled: false, | ||
| }, { | ||
| showColumnLines: true, | ||
| rtlEnabled: true, | ||
| }, { | ||
| showColumnLines: false, | ||
| rtlEnabled: false, | ||
| }, { | ||
| showColumnLines: false, | ||
| rtlEnabled: true, | ||
| }]; | ||
|
|
||
| configs.forEach(( | ||
| { showColumnLines, rtlEnabled }: { showColumnLines: boolean; rtlEnabled: boolean; }, | ||
| ): void => { | ||
| test('test', async (t) => { | ||
| const { takeScreenshot, compareResults } = createScreenshotsComparer(t); | ||
| const dataGrid = new DataGrid(GRID_CONTAINER); | ||
|
|
||
| await t.expect(dataGrid.isReady()).ok(); | ||
|
|
||
| await testScreenshot( | ||
| t, | ||
| takeScreenshot, | ||
| `T1318812__datagrid__band-columns__vertical-borders(showColumnLines=${showColumnLines},rtl=${rtlEnabled}).png`, | ||
| { element: dataGrid.element }, | ||
| ); | ||
|
|
||
| await t.expect(compareResults.isValid()) | ||
| .ok(compareResults.errorMessages()); | ||
| }).before(async () => { | ||
| await createWidget('dxDataGrid', { | ||
| dataSource: [ | ||
| { | ||
| Col1: 'Data A', Col2: 'Desc A', Col3: 'Group 1', Col4: 'X', Col5: 100, Col6: 50, | ||
| }, | ||
| { | ||
| Col1: 'Data B', Col2: 'Desc B', Col3: 'Group 1', Col4: 'Y', Col5: 200, Col6: 20, | ||
| }, | ||
| { | ||
| Col1: 'Data C', Col2: 'Desc C', Col3: 'Group 2', Col4: 'Z', Col5: 300, Col6: 10, | ||
| }, | ||
| ], | ||
| columns: [ | ||
| { | ||
| caption: 'Band Column 1', | ||
| columns: [ | ||
| { | ||
| caption: 'Nested BandColumn 1', | ||
| columns: [ | ||
| { dataField: 'Col1', width: 150 }, | ||
| { dataField: 'Col2', width: 300 }, | ||
| { dataField: 'Col3', width: 300, groupIndex: 0 }, | ||
| ], | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
| caption: 'Band Column 2', | ||
| fixed: true, | ||
| columns: [ | ||
| { | ||
| caption: 'Nested Band Column 2', | ||
| columns: [ | ||
| { dataField: 'Col4', width: 120 }, | ||
| ], | ||
| }, | ||
| ], | ||
| }, | ||
| { | ||
| caption: 'Band Column 3', | ||
| columns: [ | ||
| { | ||
| caption: 'Nested Band Column 3', | ||
| columns: [ | ||
| { dataField: 'Col5', width: 150 }, | ||
| { dataField: 'Col6', width: 150 }, | ||
| ], | ||
| }, | ||
| ], | ||
| }, | ||
| ], | ||
| showColumnLines, | ||
| rtlEnabled, | ||
| columnWidth: 100, | ||
| }); | ||
| }); | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generated tests all use the same title ('test'). This makes TestCafe output hard to interpret and can also produce ambiguous reporting when multiple tests fail. Please use a descriptive, unique test name (e.g., include the T1318812 reference and the current showColumnLines/rtlEnabled values).