liquidvotingio / decidim-module-liquidvoting

GNU Affero General Public License v3.0
4 stars 0 forks source link

Add happy path UAT specs #72

Closed davefrey closed 3 years ago

davefrey commented 3 years ago

This is to add enough UAT (capybara in spec/system) to have basic coverage of our four main cases: create/remove a vote, create/remove a delegation.

Asserting that the LV api is called correctly for each, but otherwise not testing the api client here.

jinjagit commented 3 years ago

unsupport_proposal_spec.rb needs work, as currently relies on clicking Support button to create initial 'supported' state, which means un-supporting is not tested in isolation.

oliverbarnes commented 3 years ago

unsupport_proposal_spec.rb needs work, as currently relies on clicking Support button to create initial 'supported' state, which means un-supporting is not tested in isolation.

It's the only way, since we can't setup state without sending actual requests to the api.

Stubbing in-memory state would defeat the purpose of the acceptance spec, which is to exercise the whole stack and ensure the user-facing feature is fully working

jinjagit commented 3 years ago

It's the only way, since we can't setup state without sending actual requests to the api.

Yup, that was where I was getting stuck. Thanks. I'll remove the TODO comments then. :+1:

oliverbarnes commented 3 years ago

See my comments above - in the end I don't think the local teardown is blocking this PR. I'd just remove the local teardown scripts and fix the rubocop error on the CI, and open the PR for review

jinjagit commented 3 years ago

I think this might be ready to merge now. Please check!

@davefrey I can't ask for your review as this is your PR.