Skip to content

Commit

Permalink
add search Icon from FilterCell class
Browse files Browse the repository at this point in the history
  • Loading branch information
tongsonbarbs committed Dec 12, 2024
1 parent ede1e06 commit 2315bb9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/testcafe-models/dataGrid/filter/cell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import FocusableElement from '../../internal/focusable';

const CLASS = {
filterMenu: 'dx-filter-menu',
filterMenuItem: 'dx-menu-item',
editorInput: 'dx-texteditor-input',
filterEditor: 'dx-editor-with-menu',
focused: 'dx-focused',
Expand All @@ -16,7 +17,7 @@ export default class FilterCell extends FocusableElement {
}

getSearchIcon(): FocusableElement {
return new FocusableElement(this.element.find(`.${CLASS.filterMenu}`));
return new FocusableElement(this.element.find(`.${CLASS.filterMenuItem}`));
}

getEditorInput(): FocusableElement {
Expand Down
6 changes: 4 additions & 2 deletions packages/testcafe-models/dataGrid/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import AdaptiveDetailRow from './adaptiveDetailRow';
import ColumnChooser from './columnChooser';
import TextBox from '../textBox';
import { GroupPanel } from './groupPanel';
import FilterCell from './filter/cell';
import FocusableElement from '../internal/focusable';

export const CLASS = {
dataGrid: 'dx-datagrid',
Expand Down Expand Up @@ -219,8 +221,8 @@ export default class DataGrid extends Widget {
return this.element.find(`.${this.addWidgetPrefix(CLASS.filterRow)}`);
}

getFilterRowSearchIcon(columnIndex?): Selector {
return this.getFilterCell(columnIndex ? columnIndex : 0).find(`.${CLASS.filterMenuItem}`);
getFilterRowSearchIcon(columnIndex?): FocusableElement {
return new FilterCell(this.getFilterCell(columnIndex ? columnIndex : 0)).getSearchIcon();
}

getFilterCell(columnIndex: number): Selector {
Expand Down

0 comments on commit 2315bb9

Please sign in to comment.