Skip to content

Commit 6e46a0b

Browse files
committed
end2end tests: some fixes after firefox update and iana page
1 parent 0e9ba90 commit 6e46a0b

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

tests/test_end2end.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,13 +758,13 @@ def test_duplicate_background_pages(addon: Addon, driver: Driver, backend: Backe
758758
@browsers()
759759
def test_showvisits_popup(addon: Addon, driver: Driver, backend: Backend, waiter: Waiter) -> None:
760760
url = 'https://www.iana.org/'
761-
indexer = index_urls([('https://www.iana.org/abuse', 'some comment')])
761+
indexer = index_urls([('https://www.iana.org/help/abuse', 'some comment')])
762762
indexer(backend.backend_dir)
763763

764764
addon.configure(notify_contexts=True, show_dots=True)
765765

766766
driver.get(url)
767-
links_with_popup = waiter.until(EC.presence_of_all_elements_located((By.XPATH, '//a[@href = "/abuse"]')))
767+
links_with_popup = waiter.until(EC.presence_of_all_elements_located((By.XPATH, '//a[@href = "/help/abuse"]')))
768768
link_with_popup = links_with_popup[0]
769769

770770
# wait till visited marks appear

tests/webdriver_utils.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,13 @@ def get_webdriver(
184184

185185
ff_options.set_preference('profile', str(profile_dir))
186186

187+
# Firefox 153 made file URL access a separate user opt-in.
188+
# Test profiles are ephemeral, so grant the equivalent access with Firefox's testing preference.
189+
# https://bugzilla.mozilla.org/show_bug.cgi?id=2034168
190+
# TODO test the user opt-in flow separately:
191+
# https://github.com/karlicoss/promnesia/issues/530
192+
ff_options.set_preference("extensions.webextensions.fileSchemeAccess.requireOptIn", value=False)
193+
187194
# selenium manager should download latest dev version of firefox
188195
ff_options.browser_version = 'dev'
189196

0 commit comments

Comments
 (0)