-
Notifications
You must be signed in to change notification settings - Fork 667
CardView - Column Chooser: Fix buttons in popup for Fluent Theme #29916
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
Changes from all commits
6a8a0aa
4213070
e1fc728
26a6b6f
76fc588
9ebc834
e0eff20
65ccf8f
77bbbf3
07b1df6
6ff18d7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,43 +5,51 @@ import DataGrid from 'devextreme-testcafe-models/dataGrid'; | |
| import url from '../../../helpers/getPageUrl'; | ||
| import { createWidget } from '../../../helpers/createWidget'; | ||
| import { getData } from '../helpers/generateDataSourceData'; | ||
| import { changeTheme } from '../../../helpers/changeTheme'; | ||
|
|
||
| fixture.disablePageReloads`Column chooser` | ||
| .page(url(__dirname, '../../container.html')); | ||
|
|
||
| test('Column chooser screenshot', async (t) => { | ||
| const { takeScreenshot, compareResults } = createScreenshotsComparer(t); | ||
| const dataGrid = new DataGrid('#container'); | ||
|
|
||
| await t | ||
| .click(dataGrid.getColumnChooserButton()) | ||
| // act | ||
| .expect(await takeScreenshot('column-chooser.png', dataGrid.element)) | ||
| .ok() | ||
| // assert | ||
| .expect(dataGrid.getColumnChooser().element.exists) | ||
| .ok() | ||
| .expect(compareResults.isValid()) | ||
| .ok(compareResults.errorMessages()); | ||
| }).before(async () => createWidget('dxDataGrid', { | ||
| dataSource: getData(20, 3), | ||
| height: 400, | ||
| showBorders: true, | ||
| columns: [{ | ||
| dataField: 'field_0', | ||
| dataType: 'string', | ||
| }, { | ||
| dataField: 'field_1', | ||
| dataType: 'string', | ||
| }, { | ||
| dataField: 'field_2', | ||
| dataType: 'string', | ||
| visible: false, | ||
| }], | ||
| columnChooser: { | ||
| enabled: true, | ||
| }, | ||
| })); | ||
| ['generic.light', 'material.blue.light', 'fluent.blue.light'].forEach((theme) => { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor: Let's use Themes from |
||
| ['dragAndDrop', 'select'].forEach((mode: any) => { | ||
| test(`Column chooser screenshot in mode=${mode}, theme=${theme}`, async (t) => { | ||
| const { takeScreenshot, compareResults } = createScreenshotsComparer(t); | ||
| const dataGrid = new DataGrid('#container'); | ||
|
|
||
| await dataGrid.apiShowColumnChooser(); | ||
|
|
||
| await t | ||
| .expect(await takeScreenshot(`column-chooser-${mode}-mode (${theme}).png`, dataGrid.element)) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using spaces in file names can lead to issues in different OS. We always use '_' or '-' as a separator instead
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All cardView etalons have the same etalon naming format, so I guess there should be no issues |
||
| .ok() | ||
| .expect(compareResults.isValid()) | ||
| .ok(compareResults.errorMessages()); | ||
| }).before(async () => { | ||
| await changeTheme(theme); | ||
| return createWidget('dxDataGrid', { | ||
| dataSource: getData(20, 3), | ||
| height: 400, | ||
| showBorders: true, | ||
| columns: [{ | ||
| dataField: 'field_0', | ||
| dataType: 'string', | ||
| }, { | ||
| dataField: 'field_1', | ||
| dataType: 'string', | ||
| }, { | ||
| dataField: 'field_2', | ||
| dataType: 'string', | ||
| visible: false, | ||
| }], | ||
| columnChooser: { | ||
| enabled: true, | ||
| mode, | ||
| }, | ||
| }); | ||
| }).after(async () => { | ||
| await changeTheme('generic.light'); | ||
| }); | ||
| }); | ||
| }); | ||
|
|
||
| test('Column chooser checkboxes should be aligned correctly with plain structure', async (t) => { | ||
| const { takeScreenshot, compareResults } = createScreenshotsComparer(t); | ||
|
|
||
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.
We can delete old screenshot now
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.
I already deleted it. Strange that GitHub doesn't show it.
There's no 'column-chooser.png' file in 'etalons' directory: https://github.com/Tucchhaa/DevExtreme/tree/fix_chooser_popup_btns_25_1/e2e/testcafe-devextreme/tests/dataGrid/common/etalons
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.
I found it :)
