I've been getting it a lot of times see for example https://travis-ci.org/EFForg/https-everywhere/jobs/370686501
test/selenium/test_navigation.py::TestNavigation::test_http_site_not_blocked PASSED
test/selenium/test_navigation.py::TestNavigation::test_httpnowhere_blocks PASSED
test/selenium/test_navigation.py::TestNavigation::test_no_redirect_when_disabled PASSED
test/selenium/test_navigation.py::TestNavigation::test_redirect FAILED
test/selenium/test_options.py::OptionsTest::test_options PASSED
test/selenium/test_options.py::OptionsTest::test_show_counter PASSED
test/selenium/test_popup.py::TestPopup::test_disable_enable PASSED
test/selenium/test_popup.py::TestPopup::test_http_nowhere PASSED
test/selenium/test_popup.py::TestPopup::test_rule_shown PASSED
=================================== FAILURES ===================================
_________________________ TestNavigation.test_redirect _________________________
self = <test_navigation.TestNavigation testMethod=test_redirect>
def test_redirect(self):
self.driver.get(kittens_url)
> self.assertTrue(self.driver.current_url.startswith('https'))
E AssertionError: False is not true
test/selenium/test_navigation.py:13: AssertionError
===================== 1 failed, 8 passed in 48.46 seconds ======================
Could that be a side-effect of #15157 ?
@numismatika no i was getting it before it was merged
see for possible solution https://github.com/EFForg/https-everywhere/pull/15396
Adding "high prio" due https://github.com/EFForg/https-everywhere/pull/15396#issuecomment-389214954
It still seems to occur. I still have branches that fail in either or both of the chrome and firefox tests after rebasing to the lastest eff master branch today.
@numismatika metoo
@Hainish @bcyphers are you already aware of this issue here?
Thanks @J0WI - I'll take a look tomorrow.
I wasn't able to consistently get failures for test/selenium/test_navigation.py::TestNavigation::test_redirect yesterday. I kind of assume the failure is due to the test URL loading before the extension has the chance to load. If we add an additional time.sleep statement before the URL load, this should do the trick. I'll test some more today.
Is this something covered by #15624?
It's similar but would have to apply to test/selenium/test_navigation.py instead. It strikes me as a band-aid approach - ideally the extension should actually load before any URLs in the browser load, but I'm not sure if that's possible to ensure.
I was able to consistently reproduce this error - adding the sleep in 06870de fixes it.
@Hainish A similar error still occurs with test_show_counter in test_options.py.
I don't have the means to test this right now, but adding a sleep() in a similar fashion should resolve this remaining issue.
=================================== FAILURES ===================================
________________________ OptionsTest.test_show_counter _________________________
self = <test_options.OptionsTest testMethod=test_show_counter>
def test_show_counter(self):
selector = '#showCounter'
self.load_options()
el = self.query_selector(selector)
> self.assertTrue(el.is_selected())
E AssertionError: False is not true
test/selenium/test_options.py:15: AssertionError
=============== 1 failed, 7 passed, 1 skipped in 118.21 seconds ================
Most helpful comment
Thanks @J0WI - I'll take a look tomorrow.