From b091a4ccdd941fc89c2f6b33f160563d3ce49615 Mon Sep 17 00:00:00 2001 From: jrbenny35 Date: Wed, 18 Mar 2020 12:11:06 -0500 Subject: [PATCH 1/3] Move tests to 'app/' dir --- Makefile | 7 +- {tests => app/tests}/integration/conftest.py | 0 app/tests/integration/integration-test.html | 685 ++++++++++++++++++ .../tests}/integration/pages/__init__.py | 0 .../tests}/integration/pages/base.py | 9 +- .../integration/pages/experiment_design.py | 6 +- .../integration/pages/experiment_detail.py | 5 +- .../experiment_objective_and_analysis.py | 0 .../integration/pages/experiment_overview.py | 15 +- .../experiment_timeline_and_population.py | 0 .../tests}/integration/pages/home.py | 9 +- .../integration/pages/owned_experiments.py | 6 +- .../pages/subscribed_experiments.py | 6 +- .../integration/test_create_experiment.py | 0 .../tests}/integration/test_homepage.py | 0 .../test_objective_and_analysis.py | 4 +- .../tests}/integration/test_overview.py | 0 .../test_timeline_and_population.py | 0 {tests => app/tests}/integration/tox.ini | 0 {tests => app/tests}/requirements.txt | 0 20 files changed, 705 insertions(+), 47 deletions(-) rename {tests => app/tests}/integration/conftest.py (100%) create mode 100644 app/tests/integration/integration-test.html rename {tests => app/tests}/integration/pages/__init__.py (100%) rename {tests => app/tests}/integration/pages/base.py (90%) rename {tests => app/tests}/integration/pages/experiment_design.py (96%) rename {tests => app/tests}/integration/pages/experiment_detail.py (95%) rename {tests => app/tests}/integration/pages/experiment_objective_and_analysis.py (100%) rename {tests => app/tests}/integration/pages/experiment_overview.py (96%) rename {tests => app/tests}/integration/pages/experiment_timeline_and_population.py (100%) rename {tests => app/tests}/integration/pages/home.py (63%) rename {tests => app/tests}/integration/pages/owned_experiments.py (84%) rename {tests => app/tests}/integration/pages/subscribed_experiments.py (85%) rename {tests => app/tests}/integration/test_create_experiment.py (100%) rename {tests => app/tests}/integration/test_homepage.py (100%) rename {tests => app/tests}/integration/test_objective_and_analysis.py (96%) rename {tests => app/tests}/integration/test_overview.py (100%) rename {tests => app/tests}/integration/test_timeline_and_population.py (100%) rename {tests => app/tests}/integration/tox.ini (100%) rename {tests => app/tests}/requirements.txt (100%) diff --git a/Makefile b/Makefile index 27a5815048..647bc39364 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ ESLINT = yarn lint ESLINT_FIX = yarn lint-fix JS_TEST = yarn test FLAKE8 = flake8 . -BLACK_CHECK = black -l 90 --check . +BLACK_CHECK = black -l 90 --check --diff . BLACK_FIX = black -l 90 . CHECK_DOCS = python manage.py generate-docs --check=true GENERATE_DOCS = python manage.py generate-docs @@ -163,4 +163,7 @@ integration_vnc_up_detached: integration_build $(COMPOSE_INTEGRATION) up -d vnc integration_test: integration_build - $(COMPOSE_INTEGRATION) run firefox tox -c tests/integration \ No newline at end of file + $(COMPOSE_INTEGRATION) run firefox tox -c app/tests/integration + +integration_test_parallel: integration_build + $(COMPOSE_INTEGRATION) run firefox tox -c app/tests/integration -- -n 4 \ No newline at end of file diff --git a/tests/integration/conftest.py b/app/tests/integration/conftest.py similarity index 100% rename from tests/integration/conftest.py rename to app/tests/integration/conftest.py diff --git a/app/tests/integration/integration-test.html b/app/tests/integration/integration-test.html new file mode 100644 index 0000000000..ee6fa9054e --- /dev/null +++ b/app/tests/integration/integration-test.html @@ -0,0 +1,685 @@ + + + + + Test Report + + + +

integration-test.html

+

Report generated on 18-Mar-2020 at 17:09:15 by pytest-html v1.22.0

+

Environment

+ + + + + + + + + + + + + + + + + + + + + +
Base URLhttps://nginx/
Capabilities{}
DriverFirefox
Packages{'pytest': '5.0.1', 'py': '1.8.0', 'pluggy': '0.12.0'}
PlatformLinux-5.5.3-050503-generic-x86_64-with-Ubuntu-18.04-bionic
Plugins{'metadata': '1.8.0', 'xdist': '1.29.0', 'selenium': '1.17.0', 'variables': '1.7.1', 'base-url': '1.4.1', 'forked': '1.0.2', 'html': '1.22.0'}
Python3.6.9
+

Summary

+

25 tests ran in 59.86 seconds.

+ 25 passed, 1 skipped, 0 failed, 0 errors, 0 expected failures, 0 unexpected passes +

Results

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ResultTestDurationLinks
Skippedtest_overview.py::test_overview_owner_changes_correctly::setup0.00
+
[gw3] linux -- Python 3.6.9 /code/app/tests/integration/.tox/integration-test/bin/python3
('test_overview.py', 31, 'Skipped: unconditional skip')
Passedtest_homepage.py::test_owned_experiments_page_loads2.61
+
---------------------------- Captured stderr setup -----------------------------
/code/app/tests/integration/.tox/integration-test/lib/python3.6/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings + InsecureRequestWarning) +/code/app/tests/integration/.tox/integration-test/lib/python3.6/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings + InsecureRequestWarning) +
Passedtest_create_experiment.py::test_remove_branch5.09
+
---------------------------- Captured stderr setup -----------------------------
/code/app/tests/integration/.tox/integration-test/lib/python3.6/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings + InsecureRequestWarning) +/code/app/tests/integration/.tox/integration-test/lib/python3.6/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings + InsecureRequestWarning) +
Passedtest_create_experiment.py::test_add_branch5.18
+
---------------------------- Captured stderr setup -----------------------------
/code/app/tests/integration/.tox/integration-test/lib/python3.6/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings + InsecureRequestWarning) +
Passedtest_create_experiment.py::test_duplicate_branch_name6.50
+
---------------------------- Captured stderr setup -----------------------------
/code/app/tests/integration/.tox/integration-test/lib/python3.6/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings + InsecureRequestWarning) +/code/app/tests/integration/.tox/integration-test/lib/python3.6/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings + InsecureRequestWarning) +
Passedtest_objective_and_analysis.py::test_survey_checkbox1.41
+
No log output captured.
Passedtest_homepage.py::test_subscribed_experiments_page_loads1.76
+
No log output captured.
Passedtest_objective_and_analysis.py::test_edit_objectives_box1.63
+
No log output captured.
Passedtest_objective_and_analysis.py::test_edit_analysis_box1.75
+
No log output captured.
Passedtest_overview.py::test_overview_type_changes_correctly1.76
+
No log output captured.
Passedtest_objective_and_analysis.py::test_survey_urls2.11
+
No log output captured.
Passedtest_overview.py::test_overview_engineering_owner_changes_correctly1.41
+
No log output captured.
Passedtest_objective_and_analysis.py::test_survey_launch_instructions2.01
+
No log output captured.
Passedtest_overview.py::test_related_work_url_changes_correctly1.63
+
No log output captured.
Passedtest_overview.py::test_public_name_changes_correctly1.74
+
No log output captured.
Passedtest_overview.py::test_feature_bugzilla_url_changes_correctly1.77
+
No log output captured.
Passedtest_overview.py::test_public_description_changes_correctly1.68
+
No log output captured.
Passedtest_overview.py::test_related_experiments_updates_correctly1.90
+
No log output captured.
Passedtest_timeline_and_population.py::test_proposed_start_date_fills_correctly0.93
+
No log output captured.
Passedtest_timeline_and_population.py::test_proposed_experiment_duration_updates_correctly0.99
+
No log output captured.
Passedtest_timeline_and_population.py::test_proposed_enrollment_duration_updates_correctly1.01
+
No log output captured.
Passedtest_timeline_and_population.py::test_population_precentage_updates_correctly0.99
+
No log output captured.
Passedtest_timeline_and_population.py::test_firefox_channel_updates_correctly1.29
+
No log output captured.
Passedtest_timeline_and_population.py::test_firefox_min_version_updates_correctly1.80
+
No log output captured.
Passedtest_timeline_and_population.py::test_firefox_max_version_updates_correctly1.38
+
No log output captured.
Passedtest_timeline_and_population.py::test_platform_selection_updates_correctly0.99
+
No log output captured.
\ No newline at end of file diff --git a/tests/integration/pages/__init__.py b/app/tests/integration/pages/__init__.py similarity index 100% rename from tests/integration/pages/__init__.py rename to app/tests/integration/pages/__init__.py diff --git a/tests/integration/pages/base.py b/app/tests/integration/pages/base.py similarity index 90% rename from tests/integration/pages/base.py rename to app/tests/integration/pages/base.py index 7f9c071a6a..b662c82969 100644 --- a/tests/integration/pages/base.py +++ b/app/tests/integration/pages/base.py @@ -15,9 +15,7 @@ def __init__(self, selenium, base_url, locale="en-US", **kwargs): ) def wait_for_page_to_load(self): - self.wait.until( - EC.presence_of_element_located(self._page_wait_locator) - ) + self.wait.until(EC.presence_of_element_located(self._page_wait_locator)) return self @@ -36,6 +34,7 @@ def save_btn(self): return DetailPage(self.driver, self.base_url).wait_for_page_to_load() + class Header(Region): _current_user_locator = (By.CSS_SELECTOR, ".fa-user") @@ -57,9 +56,7 @@ def click_owned_experiments(self): self.find_element(*self._owned_experiments_link_locator).click() from pages.owned_experiments import OwnedExperiments - return OwnedExperiments( - self.driver, self.page.base_url - ).wait_for_page_to_load() + return OwnedExperiments(self.driver, self.page.base_url).wait_for_page_to_load() def click_subscribed_experiments(self): """Clicks subscribed experiments link.""" diff --git a/tests/integration/pages/experiment_design.py b/app/tests/integration/pages/experiment_design.py similarity index 96% rename from tests/integration/pages/experiment_design.py rename to app/tests/integration/pages/experiment_design.py index efd1e6c66d..1ceb0be964 100644 --- a/tests/integration/pages/experiment_design.py +++ b/app/tests/integration/pages/experiment_design.py @@ -25,9 +25,8 @@ class DesignPage(Base): def wait_for_page_to_load(self): self.wait.until( - lambda _: self.find_element( - *self._firefox_pref_name_locator).is_displayed() - ) + lambda _: self.find_element(*self._firefox_pref_name_locator).is_displayed() + ) return self def create_new_branch(self): @@ -70,6 +69,7 @@ def click_continue(self): return class BranchRegion(Region): + def __init__(self, page, root=None, count=None, **kwargs): super().__init__(page=page, root=root, **kwargs) self.number = count diff --git a/tests/integration/pages/experiment_detail.py b/app/tests/integration/pages/experiment_detail.py similarity index 95% rename from tests/integration/pages/experiment_detail.py rename to app/tests/integration/pages/experiment_detail.py index b2618dddfc..1094bcd079 100644 --- a/tests/integration/pages/experiment_detail.py +++ b/app/tests/integration/pages/experiment_detail.py @@ -33,10 +33,7 @@ def click_edit(self): class ObjectivesRegion(Region): _edit_btn_locator = (By.CSS_SELECTOR, "#objectives-edit-btn") - _detail_locator = ( - By.CSS_SELECTOR, - "#objectives-section-detail > p:nth-child(1)", - ) + _detail_locator = (By.CSS_SELECTOR, "#objectives-section-detail > p:nth-child(1)") def click_edit(self): self.find_element(*self._edit_btn_locator).click() diff --git a/tests/integration/pages/experiment_objective_and_analysis.py b/app/tests/integration/pages/experiment_objective_and_analysis.py similarity index 100% rename from tests/integration/pages/experiment_objective_and_analysis.py rename to app/tests/integration/pages/experiment_objective_and_analysis.py diff --git a/tests/integration/pages/experiment_overview.py b/app/tests/integration/pages/experiment_overview.py similarity index 96% rename from tests/integration/pages/experiment_overview.py rename to app/tests/integration/pages/experiment_overview.py index ccc9ccafe4..9377aa20ba 100644 --- a/tests/integration/pages/experiment_overview.py +++ b/app/tests/integration/pages/experiment_overview.py @@ -16,14 +16,8 @@ class ExperimentOverview(Base): ) _engineering_owner_locator = (By.CSS_SELECTOR, "#id_engineering_owner") _experiment_owner_locator = (By.CSS_SELECTOR, "#id_owner > option") - _analysis_owner_locator = ( - By.CSS_SELECTOR, - "#id_analysis_owner > option", - ) - _experiment_public_description_locator = ( - By.CSS_SELECTOR, - "#id_public_description", - ) + _analysis_owner_locator = (By.CSS_SELECTOR, "#id_analysis_owner > option") + _experiment_public_description_locator = (By.CSS_SELECTOR, "#id_public_description") _experiment_public_description_locator = (By.CSS_SELECTOR, "#id_public_description") _experiment_public_name_locator = (By.CSS_SELECTOR, "#id_public_name") _experiment_related_experiments_locator = ( @@ -36,10 +30,7 @@ class ExperimentOverview(Base): _page_wait_locator = (By.CSS_SELECTOR, "body.page-edit-overview") _name_locator = (By.CSS_SELECTOR, "#id_name") _short_description_locator = (By.CSS_SELECTOR, "#id_short_description") - _ds_issue_url_locator = ( - By.CSS_SELECTOR, - "#id_data_science_issue_url", - ) + _ds_issue_url_locator = (By.CSS_SELECTOR, "#id_data_science_issue_url") _overview_name_locator = (By.CSS_SELECTOR, "#id_name") _overview_description_locator = (By.CSS_SELECTOR, "#id_short_description") _overview_ds_issue_url_locator = (By.CSS_SELECTOR, "#id_data_science_issue_url") diff --git a/tests/integration/pages/experiment_timeline_and_population.py b/app/tests/integration/pages/experiment_timeline_and_population.py similarity index 100% rename from tests/integration/pages/experiment_timeline_and_population.py rename to app/tests/integration/pages/experiment_timeline_and_population.py diff --git a/tests/integration/pages/home.py b/app/tests/integration/pages/home.py similarity index 63% rename from tests/integration/pages/home.py rename to app/tests/integration/pages/home.py index 36146c90fe..2c6eb98c8e 100644 --- a/tests/integration/pages/home.py +++ b/app/tests/integration/pages/home.py @@ -6,15 +6,10 @@ class Home(Base): _create_experiment_btn_locator = (By.CSS_SELECTOR, "a.col.btn-primary") - _page_wait_locator = ( - By.CSS_SELECTOR, - "body.page-list-view", - ) + _page_wait_locator = (By.CSS_SELECTOR, "body.page-list-view") def create_experiment(self): self.find_element(*self._create_experiment_btn_locator).click() from pages.experiment_overview import ExperimentOverview - return ExperimentOverview( - self.driver, self.base_url - ).wait_for_page_to_load() + return ExperimentOverview(self.driver, self.base_url).wait_for_page_to_load() diff --git a/tests/integration/pages/owned_experiments.py b/app/tests/integration/pages/owned_experiments.py similarity index 84% rename from tests/integration/pages/owned_experiments.py rename to app/tests/integration/pages/owned_experiments.py index ae284d7f87..09f39449c9 100644 --- a/tests/integration/pages/owned_experiments.py +++ b/app/tests/integration/pages/owned_experiments.py @@ -8,11 +8,7 @@ class OwnedExperiments(Base): _owned_text_locator = (By.CSS_SELECTOR, ".m-0") - _page_wait_locator = ( - By.CSS_SELECTOR, - "body.page-list-view", - ) - + _page_wait_locator = (By.CSS_SELECTOR, "body.page-list-view") @property def count(self): diff --git a/tests/integration/pages/subscribed_experiments.py b/app/tests/integration/pages/subscribed_experiments.py similarity index 85% rename from tests/integration/pages/subscribed_experiments.py rename to app/tests/integration/pages/subscribed_experiments.py index 70cfd0606f..c3db9e2532 100644 --- a/tests/integration/pages/subscribed_experiments.py +++ b/app/tests/integration/pages/subscribed_experiments.py @@ -8,11 +8,7 @@ class SubscribedExperiments(Base): _subscribed_text_locator = (By.CSS_SELECTOR, ".m-0") - _page_wait_locator = ( - By.CSS_SELECTOR, - "body.page-list-view", - ) - + _page_wait_locator = (By.CSS_SELECTOR, "body.page-list-view") @property def count(self): diff --git a/tests/integration/test_create_experiment.py b/app/tests/integration/test_create_experiment.py similarity index 100% rename from tests/integration/test_create_experiment.py rename to app/tests/integration/test_create_experiment.py diff --git a/tests/integration/test_homepage.py b/app/tests/integration/test_homepage.py similarity index 100% rename from tests/integration/test_homepage.py rename to app/tests/integration/test_homepage.py diff --git a/tests/integration/test_objective_and_analysis.py b/app/tests/integration/test_objective_and_analysis.py similarity index 96% rename from tests/integration/test_objective_and_analysis.py rename to app/tests/integration/test_objective_and_analysis.py index 6182caba2f..d47a3d0973 100644 --- a/tests/integration/test_objective_and_analysis.py +++ b/app/tests/integration/test_objective_and_analysis.py @@ -65,6 +65,4 @@ def test_survey_launch_instructions(base_url, selenium, fill_overview): launch_instructions = "PUSH THE BUTTON" analysis.survey_launch_instructions = launch_instructions detail_page = analysis.save_btn() - assert ( - launch_instructions in detail_page.analysis_section.survey_launch_instructions - ) + assert launch_instructions in detail_page.analysis_section.survey_launch_instructions diff --git a/tests/integration/test_overview.py b/app/tests/integration/test_overview.py similarity index 100% rename from tests/integration/test_overview.py rename to app/tests/integration/test_overview.py diff --git a/tests/integration/test_timeline_and_population.py b/app/tests/integration/test_timeline_and_population.py similarity index 100% rename from tests/integration/test_timeline_and_population.py rename to app/tests/integration/test_timeline_and_population.py diff --git a/tests/integration/tox.ini b/app/tests/integration/tox.ini similarity index 100% rename from tests/integration/tox.ini rename to app/tests/integration/tox.ini diff --git a/tests/requirements.txt b/app/tests/requirements.txt similarity index 100% rename from tests/requirements.txt rename to app/tests/requirements.txt From 0885106b4c06bfa5ea77cb7d26f9b2d71033e371 Mon Sep 17 00:00:00 2001 From: jrbenny35 Date: Wed, 18 Mar 2020 13:14:07 -0500 Subject: [PATCH 2/3] Updates. --- app/.flake8 | 2 +- app/tests/integration/integration-test.html | 70 +++++++++---------- .../integration/pages/experiment_design.py | 5 +- .../integration/pages/experiment_detail.py | 3 - .../experiment_timeline_and_population.py | 4 -- .../integration/test_create_experiment.py | 1 - .../test_objective_and_analysis.py | 3 - app/tests/integration/test_overview.py | 12 ++-- .../test_timeline_and_population.py | 3 - 9 files changed, 42 insertions(+), 61 deletions(-) diff --git a/app/.flake8 b/app/.flake8 index 9138c4206f..4094f641ff 100644 --- a/app/.flake8 +++ b/app/.flake8 @@ -1,3 +1,3 @@ [flake8] -exclude=migrations,settings* +exclude=migrations,settings*,.tox max-line-length = 90 \ No newline at end of file diff --git a/app/tests/integration/integration-test.html b/app/tests/integration/integration-test.html index ee6fa9054e..136adbce5f 100644 --- a/app/tests/integration/integration-test.html +++ b/app/tests/integration/integration-test.html @@ -398,7 +398,7 @@ }

integration-test.html

-

Report generated on 18-Mar-2020 at 17:09:15 by pytest-html v1.22.0

+

Report generated on 18-Mar-2020 at 17:35:33 by pytest-html v1.22.0

Environment

@@ -423,7 +423,7 @@

Environment

Python 3.6.9

Summary

-

25 tests ran in 59.86 seconds.

+

25 tests ran in 64.76 seconds.

25 passed, 1 skipped, 0 failed, 0 errors, 0 expected failures, 0 unexpected passes

Results

@@ -443,12 +443,12 @@

Results

+
[gw3] linux -- Python 3.6.9 /code/app/tests/integration/.tox/integration-test/bin/python3
('test_overview.py', 29, 'Skipped: unconditional skip')
- + - + - + - + - + - + - + - - + + - + @@ -552,7 +552,7 @@

Results

- + - + - + - - + + - - + + - - + + - + - + - - + + - - + + - + - + - + - + - +
-
[gw3] linux -- Python 3.6.9 /code/app/tests/integration/.tox/integration-test/bin/python3
('test_overview.py', 31, 'Skipped: unconditional skip')
Passed test_homepage.py::test_owned_experiments_page_loads2.612.83
@@ -461,7 +461,7 @@

Results

Passed test_create_experiment.py::test_remove_branch5.096.61
@@ -474,31 +474,31 @@

Results

Passed test_create_experiment.py::test_add_branch5.186.40
---------------------------- Captured stderr setup -----------------------------
/code/app/tests/integration/.tox/integration-test/lib/python3.6/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning) +/code/app/tests/integration/.tox/integration-test/lib/python3.6/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings + InsecureRequestWarning)
Passed test_create_experiment.py::test_duplicate_branch_name6.507.66
---------------------------- Captured stderr setup -----------------------------
/code/app/tests/integration/.tox/integration-test/lib/python3.6/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning) -/code/app/tests/integration/.tox/integration-test/lib/python3.6/site-packages/urllib3/connectionpool.py:851: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings - InsecureRequestWarning)
Passed test_objective_and_analysis.py::test_survey_checkbox1.411.42
@@ -507,7 +507,7 @@

Results

Passed test_homepage.py::test_subscribed_experiments_page_loads1.762.12
@@ -516,7 +516,7 @@

Results

Passed test_objective_and_analysis.py::test_edit_objectives_box1.631.68
@@ -533,8 +533,8 @@

Results

Passedtest_overview.py::test_overview_type_changes_correctly1.76test_objective_and_analysis.py::test_survey_urls2.28
@@ -542,7 +542,7 @@

Results

Passedtest_objective_and_analysis.py::test_survey_urlstest_overview.py::test_overview_type_changes_correctly 2.11
Passed test_overview.py::test_overview_engineering_owner_changes_correctly1.411.68
@@ -561,7 +561,7 @@

Results

Passed test_objective_and_analysis.py::test_survey_launch_instructions2.012.26
@@ -570,7 +570,7 @@

Results

Passed test_overview.py::test_related_work_url_changes_correctly1.631.82
@@ -578,8 +578,8 @@

Results

Passedtest_overview.py::test_public_name_changes_correctly1.74test_overview.py::test_feature_bugzilla_url_changes_correctly2.07
@@ -587,8 +587,8 @@

Results

Passedtest_overview.py::test_feature_bugzilla_url_changes_correctly1.77test_overview.py::test_public_description_changes_correctly1.97
@@ -596,8 +596,8 @@

Results

Passedtest_overview.py::test_public_description_changes_correctly1.68test_overview.py::test_public_name_changes_correctly1.85
@@ -606,7 +606,7 @@

Results

Passed test_overview.py::test_related_experiments_updates_correctly1.901.85
@@ -615,7 +615,7 @@

Results

Passed test_timeline_and_population.py::test_proposed_start_date_fills_correctly0.931.11
@@ -623,8 +623,8 @@

Results

Passedtest_timeline_and_population.py::test_proposed_experiment_duration_updates_correctly0.99test_timeline_and_population.py::test_proposed_enrollment_duration_updates_correctly1.40
@@ -632,8 +632,8 @@

Results

Passedtest_timeline_and_population.py::test_proposed_enrollment_duration_updates_correctly1.01test_timeline_and_population.py::test_proposed_experiment_duration_updates_correctly0.98
@@ -642,7 +642,7 @@

Results

Passed test_timeline_and_population.py::test_population_precentage_updates_correctly0.990.94
@@ -651,7 +651,7 @@

Results

Passed test_timeline_and_population.py::test_firefox_channel_updates_correctly1.291.96
@@ -660,7 +660,7 @@

Results

Passed test_timeline_and_population.py::test_firefox_min_version_updates_correctly1.801.51
@@ -669,7 +669,7 @@

Results

Passed test_timeline_and_population.py::test_firefox_max_version_updates_correctly1.381.51
@@ -678,7 +678,7 @@

Results

Passed test_timeline_and_population.py::test_platform_selection_updates_correctly0.991.07
diff --git a/app/tests/integration/pages/experiment_design.py b/app/tests/integration/pages/experiment_design.py index 1ceb0be964..178974b8a9 100644 --- a/app/tests/integration/pages/experiment_design.py +++ b/app/tests/integration/pages/experiment_design.py @@ -17,10 +17,7 @@ class DesignPage(Base): _firefox_pref_name_locator = (By.CSS_SELECTOR, "#id_pref_name") _firefox_pref_type_locator = (By.CSS_SELECTOR, "#id_pref_type") _firefox_pref_branch_locator = (By.CSS_SELECTOR, "#id_pref_branch") - _new_branch_locator = ( - By.CSS_SELECTOR, - "#formset > div:nth-child(5) > div:nth-child(3) > div:nth-child(1) > h4:nth-child(1)", - ) + _new_branch_locator = (By.CSS_SELECTOR, "#add-branch-button") _page_wait_locator = (By.CSS_SELECTOR, "body.page-edit-variants") def wait_for_page_to_load(self): diff --git a/app/tests/integration/pages/experiment_detail.py b/app/tests/integration/pages/experiment_detail.py index 1094bcd079..60b25cf72c 100644 --- a/app/tests/integration/pages/experiment_detail.py +++ b/app/tests/integration/pages/experiment_detail.py @@ -1,8 +1,5 @@ """Representaion of the Experiment Detail Page.""" -import random -import string - from selenium.webdriver.common.by import By from pypom import Region diff --git a/app/tests/integration/pages/experiment_timeline_and_population.py b/app/tests/integration/pages/experiment_timeline_and_population.py index 7012a11c4b..eb3034afbd 100644 --- a/app/tests/integration/pages/experiment_timeline_and_population.py +++ b/app/tests/integration/pages/experiment_timeline_and_population.py @@ -1,10 +1,6 @@ """Representaion of the Timeline & Population Page.""" -import random -import string - from selenium.webdriver.common.by import By -from pypom import Region from pages.base import Base diff --git a/app/tests/integration/test_create_experiment.py b/app/tests/integration/test_create_experiment.py index 7ad2ed4fa1..6909608448 100644 --- a/app/tests/integration/test_create_experiment.py +++ b/app/tests/integration/test_create_experiment.py @@ -1,6 +1,5 @@ import pytest -from pages.base import Base from pages.home import Home diff --git a/app/tests/integration/test_objective_and_analysis.py b/app/tests/integration/test_objective_and_analysis.py index d47a3d0973..fed075c821 100644 --- a/app/tests/integration/test_objective_and_analysis.py +++ b/app/tests/integration/test_objective_and_analysis.py @@ -1,8 +1,5 @@ import pytest -from pages.base import Base -from pages.home import Home - @pytest.mark.nondestructive def test_edit_objectives_box(base_url, selenium, fill_overview): diff --git a/app/tests/integration/test_overview.py b/app/tests/integration/test_overview.py index 3a399d1f8a..2eb1968065 100644 --- a/app/tests/integration/test_overview.py +++ b/app/tests/integration/test_overview.py @@ -1,8 +1,6 @@ import pytest -from pages.base import Base from pages.home import Home -from pages.experiment_design import DesignPage @pytest.mark.nondestructive @@ -23,7 +21,7 @@ def test_overview_engineering_owner_changes_correctly(base_url, selenium): selenium.get(base_url) home = Home(selenium, base_url).wait_for_page_to_load() experiment = home.create_experiment() - assert experiment.engineering_owner is "" + assert experiment.engineering_owner == "" new_owner = "uitester" experiment.engineering_owner = new_owner assert new_owner in experiment.engineering_owner @@ -48,7 +46,7 @@ def test_public_name_changes_correctly(base_url, selenium): selenium.get(base_url) home = Home(selenium, base_url).wait_for_page_to_load() experiment = home.create_experiment() - assert experiment.public_name is "" + assert experiment.public_name == "" new_public_name = "uitested exp" experiment.public_name = new_public_name assert new_public_name in experiment.public_name @@ -60,7 +58,7 @@ def test_public_description_changes_correctly(base_url, selenium): selenium.get(base_url) home = Home(selenium, base_url).wait_for_page_to_load() experiment = home.create_experiment() - assert experiment.public_description is "" + assert experiment.public_description == "" new_public_description = "THIS IS A LONG DESCRIPTION..!" experiment.public_description = new_public_description assert new_public_description in experiment.public_description @@ -72,7 +70,7 @@ def test_feature_bugzilla_url_changes_correctly(base_url, selenium): selenium.get(base_url) home = Home(selenium, base_url).wait_for_page_to_load() experiment = home.create_experiment() - assert experiment.feature_bugzilla_url is "" + assert experiment.feature_bugzilla_url == "" new_url = "http://bugzilla.org/1234-new-url" experiment.feature_bugzilla_url = new_url assert new_url in experiment.feature_bugzilla_url @@ -84,7 +82,7 @@ def test_related_work_url_changes_correctly(base_url, selenium): selenium.get(base_url) home = Home(selenium, base_url).wait_for_page_to_load() experiment = home.create_experiment() - assert experiment.related_work_urls is "" + assert experiment.related_work_urls == "" new_url = "http://someawesomeurl.com" experiment.related_work_urls = new_url assert new_url in experiment.related_work_urls diff --git a/app/tests/integration/test_timeline_and_population.py b/app/tests/integration/test_timeline_and_population.py index a616a693ca..f300041b6f 100644 --- a/app/tests/integration/test_timeline_and_population.py +++ b/app/tests/integration/test_timeline_and_population.py @@ -3,9 +3,6 @@ from dateutil.parser import parse import pytest -from pages.base import Base -from pages.home import Home - @pytest.mark.nondestructive def test_proposed_start_date_fills_correctly(selenium, base_url, fill_overview): From ce4eb3707f31a76e7fb5a59bb28c59db1d8376d7 Mon Sep 17 00:00:00 2001 From: jrbenny35 Date: Wed, 18 Mar 2020 16:37:26 -0500 Subject: [PATCH 3/3] Makefile updates. --- .circleci/config.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ce9de6f111..6c3f26607a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -59,7 +59,7 @@ jobs: - run: name: Run integration tests command: | - sudo chown -R ubuntu tests/ + sudo chown -R ubuntu app/tests/ cp .env.sample .env make refresh make up_detached diff --git a/Makefile b/Makefile index 647bc39364..b145fcdc9f 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ COMPOSE_TEST = docker-compose -f docker-compose-test.yml COMPOSE_INTEGRATION = docker-compose -f docker-compose.yml -f docker-compose.integration-test.yml COMPOSE_FULL = docker-compose -f docker-compose.yml -f docker-compose-full.yml -PYTHON_TEST = pytest -vvvv --cov --cov-report term-missing --show-capture=no +PYTHON_TEST = pytest -vvvv --cov --cov-report term-missing --show-capture=no --ignore=tests/integration PYTHON_TEST_FAST = python manage.py test -v 3 --parallel PYTHON_CHECK_MIGRATIONS = python manage.py makemigrations --check --dry-run --noinput ESLINT = yarn lint