Plugin for SUnit test method pane integration with template auto-generation
hernanmd opened this issue · 0 comments
I started to work on a plugin to show two methods on the code pane of the System Browser.
It was discussed on the mailing list some time ago: http://forum.world.st/Test-method-auto-generation-in-Calypso-tp5104463.html
The code is dirty as I had to discover how to override ClyMethodCodeEditorToolMorph to duplicate method pane functionality for the new test pane, and add the text morph.
How it works:
WARNING: Every click on a method selector on a Calypso method list generates a test method/test class if not already created.
This plugin currently adds a tab with priority 1 (leftmost) to the Calypso System Browser. This should be changed for usability but I couldn't do it yet. Actually it would be better to add a checkbox at the bottom with "generate test" to switch to this editor morph.
The proposed tab contains two panes. Upper is for an editable generated test template. Bottom is the current method itself as a normal method pane.
It should be reviewed by someone more knowledgeable in Calypso. Currently I couldn't discover how to link the test code pane with a Command to Accept the test method.
There is some basic & dirty check for avoiding metaclass auto generation of method tests.
Link to the branch on the forked repo: https://github.com/hernanmd/Calypso/tree/clysunit/integration