-
Notifications
You must be signed in to change notification settings - Fork 609
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
T1261532: DataGrid - FocusedRowChanged event isn't raised when the push API is used to remove the last row #28687
base: 25_1
Are you sure you want to change the base?
Conversation
…_25_1 # Conflicts: # e2e/testcafe-devextreme/tests/dataGrid/focus/focus.ts
await t | ||
.expect(Selector('#otherContainer').innerText) | ||
.eql('Success'); |
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 feel strange about the checking the text of #otherContainer. Is it possible to use this instead of setting text in onFocusedRowChanged?
await t | |
.expect(Selector('#otherContainer').innerText) | |
.eql('Success'); | |
const key = await grid.option('focusedRowKey'); | |
const index = await grid.option('focusedRowIndex'); | |
await t.expect(key === null && index === -1).ok(); |
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.
TestCafe is designed to work with markup, and in our tests, we use the Page Object Model for the DataGrid, which operates with a markup (CCS classes and DOM elements) and does not have a method for retrieving options from the business object. It seems that transforming the state into markup and verifying it using TestCafe is the most appropriate and natural approach.
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.
Seems that we can retrieve options from the datagrid.
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 current test implementation does its job, but it just feels unnaturally to me to do it like that. If using grid.option() will also do the job, then I suggest to use it 🙂
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.
Yep, finally I see, thank you! The correct check looks slightly different)
The whole expression should be wrapped to the "except" method so the expression could calculate continuously, not only once while a declaration.
No description provided.