Commit 8ca7f8d3 authored by Swergas's avatar Swergas

add full description of Test Scenario 2 in documentation, and improvements in implementation

parent 8aa6231c
......@@ -29,8 +29,8 @@ Verifications all along the process is done using command line tools `belenios-t
## Detailed steps of the Test Scenario 1 process
- Creation of the election (action of the administrator)
- Starting creation of the election
- Starting setup of the election (action of the administrator)
- Creation of the draft election
- Alice has been given administrator rights on an online voting app called Belenios. She goes to check out its homepage and logs in.
- She clicks on the "Prepare a new election" link
- (She keeps default values on the form: Credential management is automatic (not manual), and Authentication method is Password, not CAS)
......@@ -44,7 +44,7 @@ Verifications all along the process is done using command line tools `belenios-t
- She clicks on the "Save changes" button (this redirects to the "Preparation of election" page)
- Setting election's voters
- She clicks on the "Edit voters" link, to then type the list of voters
- She types N e-mail addresses (the list of invited voters)
- She types `N` e-mail addresses (the list of invited voters)
- She clicks on the "Add" button to submit changes
- She clicks on "Return to draft page" link
- She clicks on button "Generate on server"
......@@ -73,7 +73,7 @@ Verifications all along the process is done using command line tools `belenios-t
- She checks that the page shows a confirmation message similar to "A new password has been mailed to name@email.com"
- She clicks on the "Proceed" link (She arrives back to the election administration page)
- We do a sanity check that server has really tried to send these emails, and to these users only.
- Log out and close the browser window
- She logs out and closes the browser window
- Verify election consistency (using command line tool `belenios_tool verify`)
- All voting electors cast their vote (`K` electors vote). We check vote data consistency for every batch of `X` votes (using `belenios_tool verify-diff` and a snapshot of election data copied in previous batch). For each batch of `X` voters:
- Create election data snapshot
......
This diff is collapsed.
......@@ -160,7 +160,10 @@ class BeleniosTestElectionScenario2(BeleniosElectionTestBase):
# She sends the remembered link to the credential authority by email (actually we don't need to send anything because we will act as the credential authority)
# She closes the browser
# Optionnaly, she logs out
# log_out(browser)
# She closes the browser window
browser.quit()
......@@ -185,7 +188,7 @@ class BeleniosTestElectionScenario2(BeleniosElectionTestBase):
wait_a_bit()
# She clicks on the "private credentials" and "public credentials" links and downloads these files. Files are by default downloaded to /tmp using filenames creds.txt and public_creds.txt respectively, but we choose to name them using an unique identifier instead.
# She clicks on the "private credentials" and "public credentials" links and downloads these files. Files are by default downloaded to /tmp using filenames `creds.txt` and `public_creds.txt` respectively, but we choose to name them using an unique identifier instead.
link_css_ids = ["creds", "public_creds"]
file_labels = ["private credentials", "public credentials"]
link_css_selectors = ["#" + el for el in link_css_ids]
......@@ -323,12 +326,15 @@ The election administrator.\
custom_content = content_format.format(link_for_trustee=self.links_for_trustees[idx])
self.fake_sent_emails_manager.send_email(settings.ADMINISTRATOR_EMAIL_ADDRESS, trustee_email_address, subject, custom_content)
# Optionnaly, she logs out
# log_out(browser)
# She closes the window
browser.quit()
def trustees_generate_election_private_keys(self):
# Each trustee will do the following process
# Each trustee (Tom and Taylor) will do the following process
for idx, trustee_email_address in enumerate(settings.TRUSTEES_EMAIL_ADDRESSES):
# Trustee opens link that has been sent to him by election administrator
link_for_this_trustee = self.links_for_trustees[idx] # TODO: Decide either not send trustee email at all or read trustee link from email content
......@@ -348,7 +354,7 @@ The election administrator.\
generate_button_element = wait_for_element_exists_and_contains_expected_text(browser, generate_button_css_selector, generate_button_expected_label)
generate_button_element.click()
# He clicks on the "private key" and "public key" links, to download the private key and the public key (files are respectively saved by default to private_key.json and public_key.json, but we decide to save them as a unique file name)
# He clicks on the "private key" and "public key" links, to download the private key and the public key (files are respectively saved by default as `private_key.json` and `public_key.json`, but we decide to save them as a unique file name)
link_css_ids = ["private_key", "public_key"]
link_expected_labels = ["private key", "public key"]
self.downloaded_files_paths_per_trustee[trustee_email_address] = dict()
......@@ -482,13 +488,17 @@ The election administrator.\
custom_content = content_format.format(link_for_trustee=self.closed_election_tally_links_for_trustees[idx])
self.fake_sent_emails_manager.send_email(settings.ADMINISTRATOR_EMAIL_ADDRESS, trustee_email_address, subject, custom_content)
# She logs out
log_out(browser)
# She closes the window
browser.quit()
def trustees_do_partial_decryption(self):
# Tom and Talyor are trustees and open the link that Alice, election administrator, has sent to them.
# Each trustee (Tom and Taylor) will do the following process:
for idx, trustee_email_address in enumerate(settings.TRUSTEES_EMAIL_ADDRESSES):
# He opens the link that Alice (the election administrator) has sent to him
self.browser = initialize_browser_for_scenario_2()
browser = self.browser
link_for_trustee = self.closed_election_tally_links_for_trustees[idx]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment