Skip to content

Commit

Permalink
Merge pull request #1380 from glogiotatidis/update-entrypoint-to-snippet
Browse files Browse the repository at this point in the history
[Issue #1355] Update entrypoint value.
  • Loading branch information
glogiotatidis committed May 18, 2020
2 parents 1fd05de + 8c73040 commit 356b2a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions snippets/base/tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ def test_multiple_links_with_metrics(self):
'action': 'OPEN_ABOUT_PAGE',
'args': 'about',
'entrypoint_name': 'entryPoint',
'entrypoint_value': 'snippets',
'entrypoint_value': 'snippet',
},
'link8': {
'action': 'OPEN_PREFERENCES_PAGE',
'entrypoint_value': 'snippets',
'entrypoint_value': 'snippet',
},
}
}
Expand Down Expand Up @@ -133,9 +133,9 @@ def test_base(self):
inputs = [
('https://example.com', (None, None, None, None)),
('special:menu:foo', ('OPEN_APPLICATIONS_MENU', 'foo', None, None)),
('special:about:login', ('OPEN_ABOUT_PAGE', 'login', 'entryPoint', 'snippets')),
('special:about:login', ('OPEN_ABOUT_PAGE', 'login', 'entryPoint', 'snippet')),
('special:highlight:foo', ('HIGHLIGHT_FEATURE', 'foo', None, None)),
('special:preferences', ('OPEN_PREFERENCES_PAGE', None, None, 'snippets')),
('special:preferences', ('OPEN_PREFERENCES_PAGE', None, None, 'snippet')),
('special:accounts', ('SHOW_FIREFOX_ACCOUNTS', None, None, None)),
('special:monitor', ('ENABLE_FIREFOX_MONITOR', monitor_data, None, None)),
# This is invalid link but test that the app doesn't choke.
Expand Down
4 changes: 2 additions & 2 deletions snippets/base/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ def convert_special_link(url):
action = 'OPEN_ABOUT_PAGE'
args = url.rsplit(':', 1)[1]
entrypoint_name = 'entryPoint'
entrypoint_value = 'snippets'
entrypoint_value = 'snippet'
elif url.startswith('special:highlight:'):
action = 'HIGHLIGHT_FEATURE'
args = url.rsplit(':', 1)[1]
elif url == 'special:preferences':
action = 'OPEN_PREFERENCES_PAGE'
entrypoint_value = 'snippets'
entrypoint_value = 'snippet'
elif url == 'special:accounts':
action = 'SHOW_FIREFOX_ACCOUNTS'
elif url == 'special:monitor':
Expand Down

0 comments on commit 356b2a5

Please sign in to comment.