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

CI flake in app-tests TestJournalistLayout #5271

Closed
eloquence opened this issue May 18, 2020 · 3 comments · Fixed by #5272
Closed

CI flake in app-tests TestJournalistLayout #5271

eloquence opened this issue May 18, 2020 · 3 comments · Fixed by #5272

Comments

@eloquence
Copy link
Member

Seeing this occur repeatedly today; re-running does not appear to resolve consistently.

Example test failure: https://circleci.com/gh/freedomofpress/securedrop/40492#tests/containers/1

Example output:

Click to expand
=================================== FAILURES ===================================
__________ TestJournalistLayout.test_account_edit_hotp_secret[en_US] ___________

self = <tests.pageslayout.test_journalist.TestJournalistLayout object at 0x7fbd161422b0>

    def test_account_edit_hotp_secret(self):
        self._journalist_logs_in()
        self._visit_edit_account()
>       self._visit_edit_hotp_secret()

/home/circleci/project/securedrop/tests/pageslayout/test_journalist.py:36: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/circleci/project/securedrop/tests/functional/journalist_navigation_steps.py:744: in _visit_edit_hotp_secret
    "Reset two-factor authentication for security keys like Yubikey")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.pageslayout.test_journalist.TestJournalistLayout object at 0x7fbd161422b0>
otp_type = 'hotp'
tooltip_text = 'Reset two-factor authentication for security keys like Yubikey'

    def _visit_edit_secret(self, otp_type, tooltip_text=''):
        reset_form = self.wait_for(
            lambda: self.driver.find_element_by_id("reset-two-factor-" + otp_type)
        )
        assert "/account/reset-2fa-" + otp_type in reset_form.get_attribute("action")
        reset_button = self.driver.find_elements_by_css_selector(
            "#button-reset-two-factor-" + otp_type)[0]
    
        # 2FA reset buttons show a tooltip with explanatory text on hover.
        # Also, confirm the text on the tooltip is the correct one.
        reset_button.location_once_scrolled_into_view
        ActionChains(self.driver).move_to_element(reset_button).perform()
        time.sleep(1)
        explanatory_tooltip_opacity = self.driver.find_elements_by_css_selector(
            "#button-reset-two-factor-" + otp_type + " span")[0].value_of_css_property("opacity")
        explanatory_tooltip_content = self.driver.find_elements_by_css_selector(
            "#button-reset-two-factor-" + otp_type + " span")[0].text
    
>       assert explanatory_tooltip_opacity == "1"
E       AssertionError
@eloquence
Copy link
Member Author

(FWIW, from skimming the output it looks like the failing tests may already be marked flaky but hitting their current retry count.)

@eloquence
Copy link
Member Author

Three failed runs so far on #5268.

@eloquence
Copy link
Member Author

5 failed runs and finally 1 successful run on #5268.

@eloquence eloquence added this to Sprint #50 - 5/6-5/20 in SecureDrop Team Board May 19, 2020
SecureDrop Team Board automation moved this from Sprint #50 - 5/6-5/20 to Done May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant