There was a typo: `new_order = eq(all(` instead of `new_order = all(`,
which was causing the tests to pass.
However, the final expectation should test that we keep the same order
in the same session, and we were accidentally testing the opposite.
We're also adding an extra check to verify there are investments on the
page, since in some cases we were accessing pages with no investments,
and so these tests were always passing.
This is the actual number of investments per page in the index action.
Also note one test was generating 100 extra records, which made the test
take more than 40 seconds (on my machine).
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.
The line:
create(:poll_voter, booth_assignment: booth_assignment_final_recounted)
Creates a new poll for the poll voter. Not only it wastes time by
creating new database records, but it doesn't make sense to have a poll
voter for a poll which isn't the same as its booth assignment's poll.
The spec was assuming there was only 1 custom page created in the
DB. With this change the spec will pass no matter how many custom
pages there are in the DB.
From now on these static pages:
`/privacy'
`/conditions'
`/accesibility'
`/help/faq'
`/welcome'
have been moved to the DB and can be modified easily by any
administrator in `/admin/site_customization/pages'
We are trying to avoid Officers from forgetting to click the “Confirm
vote” button, which is necessary to keep track of who has voted a Poll
To do that, we are not displaying the menu item to go back to the next
person that wants to vote, until the Officer clicks the “Confirm Vote”
button or the “The user has decided not to vote” button
Note: Due to mobile version we have duplicate ids, so using classes for
the menu items to hide them without errors
Note2: We are only hidding the menu item, if there are votable polls,
otherwise the “Confirm vote” button does not appear, and there is no
way of going back to help the next person that wants to vote