Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
belenios
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
belenios
belenios
Commits
79153535
Commit
79153535
authored
Jan 22, 2019
by
Swergas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactoring: move BeleniosElectionTestBase to its own file, remove unused imports
parent
b4f56eee
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
641 additions
and
640 deletions
+641
-640
tests/settings.py
tests/settings.py
+1
-1
tests/test_scenario_1.py
tests/test_scenario_1.py
+4
-627
tests/test_scenario_2.py
tests/test_scenario_2.py
+4
-10
tests/util/election_test_base.py
tests/util/election_test_base.py
+630
-0
tests/util/fake_sent_emails_manager.py
tests/util/fake_sent_emails_manager.py
+1
-1
tests/util/selenium_tools.py
tests/util/selenium_tools.py
+1
-1
No files found.
tests/settings.py
View file @
79153535
#!/usr/bin/python
#
-*- coding: utf-8 -*
#
coding: utf-8
from
os.path
import
abspath
,
dirname
...
...
tests/test_scenario_1.py
View file @
79153535
This diff is collapsed.
Click to expand it.
tests/test_scenario_2.py
View file @
79153535
#!/usr/bin/python
#
-*- coding: utf-8 -*
#
coding: utf-8
import
unittest
import
time
import
string
import
random
import
os
import
shutil
import
subprocess
import
re
import
sys
from
uuid
import
uuid4
from
distutils.util
import
strtobool
from
selenium
import
webdriver
from
selenium.webdriver.common.keys
import
Keys
from
selenium.webdriver.common.alert
import
Alert
from
selenium.common.exceptions
import
UnexpectedAlertPresentException
from
util.fake_sent_emails_manager
import
FakeSentEmailsManager
from
util.selenium_tools
import
wait_for_element_exists
,
wait_for_elements_exist
,
wait_for_element_exists_and_contains_expected_text
,
wait_for_element_exists_and_has_non_empty_content
,
wait_for_an_element_with_partial_link_text_exists
,
set_element_attribute
,
verify_element_label
,
wait_for_element_exists_and_has_non_empty_attribute
from
util.election_testing
import
console_log
,
random_email_addresses_generator
,
populate_credential_and_password_for_voters_from_sent_emails
,
populate_random_votes_for_voters
,
repopulate_vote_confirmations_for_voters_from_sent_emails
,
remove_database_folder
,
wait_a_bit
,
build_css_selector_to_find_buttons_in_page_content_by_value
,
find_button_in_page_content_by_value
,
find_buttons_in_page_content_by_value
,
initialize_server
,
initialize_browser
,
election_page_url_to_election_id
,
verify_election_consistency
,
create_election_data_snapshot
,
delete_election_data_snapshot
,
log_in_as_administrator
,
log_out
,
administrator_starts_creation_of_election
,
administrator_edits_election_questions
,
administrator_sets_election_voters
,
administrator_validates_creation_of_election
from
test_scenario_1
import
BeleniosElectionTestBase
from
util.selenium_tools
import
wait_for_element_exists
,
wait_for_elements_exist
,
wait_for_element_exists_and_contains_expected_text
,
wait_for_element_exists_and_has_non_empty_content
,
wait_for_an_element_with_partial_link_text_exists
,
set_element_attribute
,
wait_for_element_exists_and_has_non_empty_attribute
from
util.election_testing
import
console_log
,
random_email_addresses_generator
,
remove_database_folder
,
wait_a_bit
,
build_css_selector_to_
find_buttons_in_page_content_by_value
,
initialize_server
,
initialize_browser
,
election_page_url_to_election_id
,
verify_election_consistency
,
create_election_data_snapshot
,
delete_election_data_snapshot
,
log_in_as_administrator
,
log_out
,
administrator_starts_creation_of_election
,
administrator_edits_election_questions
,
administrator_sets_election_voters
,
administrator_validates_creation_of_election
from
util.election_test_base
import
BeleniosElectionTestBase
import
settings
...
...
tests/util/election_test_base.py
0 → 100644
View file @
79153535
This diff is collapsed.
Click to expand it.
tests/util/fake_sent_emails_manager.py
View file @
79153535
#!/usr/bin/python
#
-*- coding: utf-8 -*
#
coding: utf-8
import
re
import
subprocess
...
...
tests/util/selenium_tools.py
View file @
79153535
#!/usr/bin/python
#
-*- coding: utf-8 -*
#
coding: utf-8
from
selenium.webdriver.support.ui
import
WebDriverWait
from
selenium.webdriver.common.by
import
By
from
selenium.webdriver.support
import
expected_conditions
as
EC
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment