Week 11 Report
Hello LO Community,
The last week was the week 11 of coding weeks in GSoC program. I worked more on Adding support for new items in the uiLogger and the DSL.
Report in points:
- Overall work.
- FontWork Test case.
- How to Add support for Item in the UILogger and the DSL.
- ToolBar Support.
- Calc LaunchMenu support.
- Patch Status.
- Next Week Tasks.
The last week I worked on this 3 things:
1) Make Sure that FontWork Features more well and add a test case for it.
2) Add Support for the ToolBar Actions.
3)Add Support for Launch Menu in Calc.
Also after investigation the Fontwork Gallery Dialog I found out that the selector of fontworks is also a ValueSet object. So the support is already added in this patch. I added here a demo has a test case to test the selector. You can find the test case in this patch. The Patch still under review. The Work was done to make sure that all Font Works items work. As while investigation I found that not all items respond to a change in the Main window. But the solution was just to add some configuration to the environment that I use for running the test cases to see the changes and it is working now and ready to be merged.
You should know first How to Add support for Item in the UILogger and the DSL. Logging in LibreOffice is mainly handled by a class called UITestLogger, defined here. The logger class logs the user actions only if the member flag mbValid is set to true. The flag can be turned on by setting the environment variable LO_COLLECT_UIINFO to a file name where the logs should be collected (see the constructor of UITestLogger, defined here).
We maintain a pointer to an instance of UITestLogger class here. To use the logger object, the static function getInstance can be used to get access to the pointer.
So to add logging support for a new item. You should make sure that the event that you want to log sending message to the logger. So if you don't have this you may get instance of the logger and log message that represent you event. Form the Logger end you receive this message and print what you want to have in the log file. Note that you can also send multiple parameters.
Also after this you will need to add the syntax of the new added element to your DSL grammar and add the handler that will handle this syntax to convert it to the corresponding line in the generated test case.
So For the ToolBar the problem was that TooBar handled as a Window not an Element so I made a change in the Logger to handle events from the VCl window to be able to log actions from the toolbar. And the patch is added but it still under review. The support is tested on the FindBar and it works well . For example the DSL syntax in the FindBar should be like:
>>"Click on item number 3 in FindBar"
Also for the Launch Menu I added a support that generate a log line that simmilar to what we get in AUTOFILTER line. Also I added the corrensponding syntax and handler for the logged line. The support is tested on some random test cases. For example the DSL syntax will be:
>>"Launch SELECTMENU from Col 3 and Row 5"
The patch could be found here. But It's still under review.
Add demo for FontWork Selector ............"Waiting Review"
- uilogger : Add support in the Logger and DSL for the ToolBox ............"Waiting Review"
uilogger : Add support in the Logger and DSL for the LAUNCHMENU in CALC ............"Waiting Review"
Next week Tasks:
- Add the support in the logger for all the new added items to the UITest Framework .
- Finalize un-merged patches .
- Start working on the documentation of the project .
Thanks for reading. And I am really interested to hear all your feedback and comments.