Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#808 review fixes #923

Merged
merged 3 commits into from
Jul 2, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions shopelectro/tests/tests_js_analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,15 @@ 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()

# @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;')

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):
Expand Down