From 110d9d6fb6372395c72dbc167e003eaba3f76f11 Mon Sep 17 00:00:00 2001 From: Artemiy Rodionov Date: Tue, 2 Jul 2019 08:52:56 +0300 Subject: [PATCH 1/3] Apply review fixes --- shopelectro/tests/tests_js_analytics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shopelectro/tests/tests_js_analytics.py b/shopelectro/tests/tests_js_analytics.py index 111bf118..df0648e4 100644 --- a/shopelectro/tests/tests_js_analytics.py +++ b/shopelectro/tests/tests_js_analytics.py @@ -96,13 +96,13 @@ def tearDown(self): # delete the session to clear the cart self.browser.delete_cookie('sessionid') self.browser.execute_script('localStorage.clear();') - super().setUp() + super().tearDown() def get_goals(self): return self.browser.execute_script('return window.dataLayer.results;') def get_goal(self, reached, index=0): - """Get the first reached goal and unfold it.""" + """Get a goal with the given index and unfold it.""" return reached[index][0]['ecommerce'] def test_purchase(self): From dbf9e4aee0faa396666ddd0e4ea59ff3e1ec5773 Mon Sep 17 00:00:00 2001 From: Artemiy Rodionov Date: Tue, 2 Jul 2019 09:07:55 +0300 Subject: [PATCH 2/3] Create todo to create Goals class --- shopelectro/tests/tests_js_analytics.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shopelectro/tests/tests_js_analytics.py b/shopelectro/tests/tests_js_analytics.py index df0648e4..c3a7cc99 100644 --- a/shopelectro/tests/tests_js_analytics.py +++ b/shopelectro/tests/tests_js_analytics.py @@ -98,6 +98,8 @@ def tearDown(self): self.browser.execute_script('localStorage.clear();') super().tearDown() + # @todo #808:30m Create Goals class for tests. + # Remove these utility functions in favor of the class. def get_goals(self): return self.browser.execute_script('return window.dataLayer.results;') From 0bfceab0be050bc8c6af458a05a2031a19a6962e Mon Sep 17 00:00:00 2001 From: Artemiy Rodionov Date: Tue, 2 Jul 2019 16:45:55 +0300 Subject: [PATCH 3/3] Skip test_accordion_minimized --- shopelectro/tests/tests_selenium.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shopelectro/tests/tests_selenium.py b/shopelectro/tests/tests_selenium.py index 3100bfc7..03570e14 100644 --- a/shopelectro/tests/tests_selenium.py +++ b/shopelectro/tests/tests_selenium.py @@ -857,6 +857,10 @@ def accordion_content(self): 'js-accordion-content-{}'.format(self.page_top.id) ) + # @todo #808:15m Resurrect test_accordion_minimized. + # The test is unstable. https://ci.fidals.com/fidals/shopelectro/1617/10 + + @unittest.skip def test_accordion_minimized(self): """Accordion item should be minimized by default.""" self.assertFalse(self.accordion_content.is_displayed())