decidim-vocdoni / decidim-module-vocdoni

(WIP) A module for Decidim that brings an elections component based on the Vocdoni SDK and API
GNU Affero General Public License v3.0
8 stars 0 forks source link

Replace born_at with token in Voters' census data #48

Closed andreslucena closed 1 year ago

andreslucena commented 1 year ago

This PR brings 3 changes:

  1. We change the name and type of one of the Census fields: as date of birth (born_at) isn't a data that we have for the pilot that we'll do in 10 days we'll use "tokens" (strings of texts). By design we don't validate them (as they could be any string with any length)
  2. We allow the vote overwrite and show a callout message when that's the case

Testing

Census with token

  1. Create a new census file with the header "email;token"
  2. The token can be any string
  3. Do the whole process (specially setup and voting, as they're the tasks where the census is used)

Vote overwrite

  1. Vote once
  2. Vote again
  3. See callout
codecov[bot] commented 1 year ago

Codecov Report

Merging #48 (df709ed) into main (113fba2) will decrease coverage by 0.02%. The diff coverage is 100.00%.

:exclamation: Current head df709ed differs from pull request most recent head 3f8361b. Consider uploading reports for the commit 3f8361b to get more accurate results

@@            Coverage Diff             @@
##             main      #48      +/-   ##
==========================================
- Coverage   86.80%   86.78%   -0.02%     
==========================================
  Files          80       80              
  Lines        1508     1506       -2     
==========================================
- Hits         1309     1307       -2     
  Misses        199      199              
Impacted Files Coverage Δ
...ms/decidim/vocdoni/admin/census_credential_form.rb 100.00% <100.00%> (ø)
app/forms/decidim/vocdoni/login_form.rb 100.00% <100.00%> (ø)
app/models/decidim/vocdoni/answer.rb 100.00% <100.00%> (ø)
app/models/decidim/vocdoni/csv_census/data.rb 95.65% <100.00%> (ø)
app/models/decidim/vocdoni/voter.rb 92.85% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more