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

Fixes #2912 - Implement login functionality #2942

Merged
merged 3 commits into from
Oct 8, 2019

Conversation

munteanu210
Copy link
Contributor

This PR fixes issue #2912

Proposed PR background

This pull request contains the redesign for the login with GitHub and report anonymously on the bug form.

@miketaylr miketaylr requested review from ksy36 and miketaylr October 4, 2019 02:32
Copy link
Member

@miketaylr miketaylr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay in review @munteanu210. This PR seems to have more changes than just login functionality -- it would be easier to understand if related changes were committed together.

Can you please investigate why we have a failing test?

firefox on linux 4.15.0-1043-aws - Reporting (non-auth) - Submit buttons are disabled (0.16s)
    AssertionError: expected null to not equal null
      @ tests/functional/reporting-non-auth.js:34:20
      at Array.forEach @ anonymous
      at Command.<anonymous> @ tests/functional/reporting-non-auth.js:33:18
      at Test.Submit buttons are disabled [as test] @ tests/functional/reporting-non-auth.js:32:10
      @ src/lib/Test.ts:263:51

We can't merge this in until it's passing.

@miketaylr
Copy link
Member

Just thinking about the failing test here... we probably need a mechanism to run tests in both "a" and "b" modes. Right now, I believe it's serving "b" 100% of the time, so as markup changes, tests assuming an "a" DOM being tested against a "b" DOM will diverge.

This is where it gets painful... possibly #2944 can help us solve this problem, if we export the right env var before running the test suite.

@miketaylr
Copy link
Member

I filed #2947 to tackle the test thing.

@munteanu210
Copy link
Contributor Author

munteanu210 commented Oct 7, 2019

@miketaylr I will address your initial comment below:

This is a test that checks the submit buttons on the old form. Initially it must be disabled, which is verified by this test. Here is the code of the test. I don't know why this test failed, so as both buttons are disabled.

In addition, I did not reach this part of the form. I don't know if it was a test execution error or something was broken there, but it's something that I did not touch for sure.

@@ -13,7 +13,9 @@
{% block extracss %}{% endblock %}

</head>
<body id="body-webcompat" data-username="{{ session.username }}">
<body id="body-webcompat"
class="{%- if request.url_rule.endpoint == 'create_issue' and ab_active('exp') == 'form-v2' %}no-top-padding{% endif %}"
Copy link
Contributor

@johngian johngian Oct 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep in mind that this doesn't only change the new form. I would prefer if this wasn't fixed here but be contained in the codebase of the experiment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I filed #2955 to address this.

@@ -35,8 +37,9 @@
<script src="{{ url_for('static', filename='js/lib/navbar.js') }}"></script>
<script src="{{ url_for('static', filename='js/lib/autogrow-textfield.js') }}"></script>
<script src="{{ url_for('static', filename='js/lib/bugform-validation.js') }}"></script>
{%- if ab_active('exp') == 'form-v1' %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was omitted here on purpose. I would rather override only things for form-v2 version

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also by reverting this the current website tests are not broken.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also keep in mind that not all the population would end up in an experiment branch (eg. private browsing etc)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also people that work on the project are exempt from the experiments.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might work better: johngian@975be04

Also keeps the tests happy

Copy link
Contributor Author

@munteanu210 munteanu210 Oct 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johngian thank you for the proposed commit. I committed your update and all tests passed successfully.

Copy link
Member

@miketaylr miketaylr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think everything has been addressed except for #2955, which will be taken care of shortly. Let's merge, thanks @munteanu210.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants