-
Notifications
You must be signed in to change notification settings - Fork 67
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
test: add a test for item click on edit column cell #6331
test: add a test for item click on edit column cell #6331
Conversation
GridTHTDElement cell = grid.getCell(0, 2); | ||
cell.click(); | ||
|
||
assertCellEnterEditModeOnDoubleClick(0, 2, "vaadin-combo-box"); | ||
String eventsPanelText = getPanelText("events-panel"); | ||
Assert.assertEquals(1, eventsPanelText.split("ItemClicked").length - 1); | ||
Assert.assertTrue(eventsPanelText |
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.
nit: Could the test be made slightly stricter?
GridTHTDElement cell = grid.getCell(0, 2); | |
cell.click(); | |
assertCellEnterEditModeOnDoubleClick(0, 2, "vaadin-combo-box"); | |
String eventsPanelText = getPanelText("events-panel"); | |
Assert.assertEquals(1, eventsPanelText.split("ItemClicked").length - 1); | |
Assert.assertTrue(eventsPanelText | |
GridTHTDElement cell = grid.getCell(0, 2); | |
cell.click(); | |
Assert.assertEquals(1, eventsPanelText.split("ItemClicked").length - 1); | |
assertCellEnterEditModeOnDoubleClick(0, 2, "vaadin-combo-box"); | |
String eventsPanelText = getPanelText("events-panel"); | |
Assert.assertEquals(1, eventsPanelText.split("ItemClicked").length - 1); | |
Assert.assertTrue(eventsPanelText |
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.
That assertCellEnterEditModeOnDoubleClick
line serves no purpose in the test at all. The helper method doesn't actually perform a double-click on the line but dispatches a "dblclick" event manually.
Removed the accidental line altogether since it isn't related to the test case. An actual double-click on the row would dispatch 2 additional item click listener invocations.
Quality Gate passedIssues Measures |
Description
Add a test case to verify vaadin/web-components#7453 fixes the item click listener regression in Grid Pro which manifested after this addition to the grid connector.
Related to vaadin/web-components#637
Type of change
Tests