The `type: :feature` is automatically detected by RSpec because these
tests are inside the `spec/features` folder. Using `feature` re-adds a
`type: :feature` to these files, which will result in a conflict when we
upgrade to Rails 5.1's system tests.
Because of this change, we also need to change `background` to `before`
or else these tests will fail.
Since we removed the `best_in_place` gem, this method doesn't exist
anymore. We're replacing it with what the method actually does.
Note the test doesn't check the poll is correctly updated. We could add
a `visit proposal_dashboard_polls_path(proposal)` before checking the
"Show results" field, but then we would enter a race condition between
this request and the AJAX request. A proper solution would be to provide
actual feedback to the user so they know the poll has been updated, and
then checking that feedback is present in the tests.
Before we used the standard poll url (vota/:id) for a user generated poll.
However this url is considered too important for this kind of polls, so we are changing it to a namespaced url (proposals/:proposal_id/polls/:id)
An author will see a "new" tag on each action or resource that has appeared on his dashboard since his last login.
Too add "new" tag on dashbord menu when there are new resources.
Add to active_for class method and to active_resources controller method the new scope by_proposal.
- Published proposal: display all actions.
- Draft proposal: only display actions for draft proposals.
- Display recommended_proposals on new section as goals with toogle.
- Divide recommended actions into actions done and actions pending to clarify the information to the user as summary_recomended_actions.
- Divide recommended actions into actions done and actions pending.
- Display recomended actions as goals (diplay four by defalut) without toggle but with link to new recommended actions page.
- Display description over short_description
Dashboard routes have been refactored. Now instead of having resources
for dashboard and routes inside a dashboard namespace the proposal
routes contain a dashboar singleton containing everything related to it.
* Added missing specs
* Removed models that were refactored previously
* Added simplecov when executing specs locally
* Fixed bug in poll model validation that was causing an 500 error.
Applies new card design for polls in proposals dashboard.
Fixes warnings during tests.
Adds tests for new card design for polls in proposals dashboard.
View questions now is View results and redirects to results
in public view.
Fixed flaky spec that was making the tests fail.
Added missing specs for polls feature as well as poll model.