-
Notifications
You must be signed in to change notification settings - Fork 14
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
Testing of GridPro component #28
Comments
Hi, hmm, it could be that GridPro listens for some double-click event which even bypasses the renderers altogether. Please let me take a look at the GridPro sources - perhaps there is an easier way to show the editor from the server-side. If I understand correctly, the task is just to open an editor for a particular row, is that correct? Then we should be able to target individual editor components and click the "Save" button from server-side. |
Yes. The desired behavior would be to double-click to edit. Then change a value and close the editor (loss of focus) and commit the value to the component's model. Thanks for checking! |
So this approach works, but not ideal. This is a snippet from a working test, to convey the idea.
|
Thank you. Initial work has been done in 74f06db but we need to also support invoking of the ItemUpdaters for individual columns, to also test those. Right now I'm thinking about simply adding extension property to Grid.Column such as |
The support for mocking inline Grid Pro editor has been added; please see the readme on how to use it: https://github.com/mvysny/karibu-testing/tree/master/karibu-testing-v10 Just let me know if there is something more needed for a proper GridPro testing. |
Hi Martin,
We are evaluating GridPro and one of the things we're looking at is testing. GridPro allows cell editing through a double-click. I see in Grid.kt code for clicking a cell Renderer (i.e. _clickRenderer). I started to model an approach after what you have there.
By default the GridPro column renderer is ColumnPathRenderer (which doesn't supply a Component). I was thinking that once I get the component I could fire two click events. I'd prefer a solution where I don't have to change the default renderer of GridPro.
Will I need to use a ComponentRenderer and call createComponent and fire click events for this component in order to enter into edit mode for a cell? Suggestions appreciated.
Thanks
The text was updated successfully, but these errors were encountered: