@pacharanero Cool , I’ll lay out a proposed plan for the question answer plugin below tomorrow morning.
I’m going to be working on tests for the custom wizard plugin starting 2019-12-05T04:00:00Z → 2019-12-05T09:00:00Z then continuing 2019-12-05T22:00:00Z → 2019-12-06T01:00:00Z. I will be live at whereby.com/thepavilion for that time working on tests.
My plan for the custom wizard plugin
@fzngagan proposed we prepare for this hackday by writing up a list of tests we want to implement.
In that spirit, I’ve laid out what I’m going to focus on for the custom wizard. I’ve created the initial folder structure and written the test titles for a fair chunk of it.
I’ve committed the initial structure and test skeletons to a new branch “add_tests”.
For server-side Rspec I’m focusing on:
- Saving a wizard template
- Building and serving a wizard to the user
- Send to API action
- “After time” setting
Rspec folder structure:
api_spec.rb // to test the send to api functionality
builder_spec.rb // the big one! testing building of wizards
admin_controller_spec.rb // testing the saving wizard templates
application_controller_spec.rb // testing user re-routing
wizard_controller.spec.rb // testing serving the wizard
As a result of this planning process I’m already seeing some ways we can significantly improve the server-side structure of the custom wizard plugin. This often happens when writing tests (and is part of the point).
I may also do these in the process of writing up the rspec tests:
Add an enabled setting!
Move the edits of existing custom wizard classes from the generic ‘wizard_edits.rb’ lib file to proper plugin methods in the plugin.rb file
Properly file the custom wizard classes in the Discourse folder structure
For the acceptance tests I’m going to focus on the behaviour of the custom wizard admin form builder. I’ll add in the structure for that tomorrow.