Skip to content

Commit 1bb2419

Browse files
committed
Set feature popover cookie in registration page init
1 parent 306cf86 commit 1bb2419

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

pages/registries.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ class BaseSubmittedRegistrationPage(GuidBasePage):
6868
base_url = settings.OSF_HOME
6969
url_addition = ''
7070

71+
def __init__(self, driver, verify=False, guid=''):
72+
# Set the cookie that prevents the New Feature popover from appearing on
73+
# submitted registration pages since this popover can get in the way of other
74+
# actions.
75+
driver.add_cookie({'name': 'metadataFeaturePopover', 'value': '1'})
76+
77+
super().__init__(driver, verify, guid)
78+
7179
@property
7280
def url(self):
7381
return self.base_url + '/' + self.guid + '/' + self.url_addition

tests/test_a11y_registries.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,7 @@ def my_registrations_page(self, driver, log_in_as_user_with_draft_registrations)
170170
"""
171171
my_registrations_page = MyRegistrationsPage(driver)
172172
my_registrations_page.goto()
173-
# Set the cookie that prevents the New Feature popover from appearing on
174-
# submitted registration pages since this popover can get in the way of other
175-
# actions.
176-
driver.add_cookie({'name': 'outputFeaturePopover', 'value': '1'})
173+
177174
# Wait for registration cards to load on page
178175
WebDriverWait(driver, 5).until(
179176
EC.presence_of_element_located((By.CSS_SELECTOR, '[data-test-node-card]'))

0 commit comments

Comments
 (0)