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

Tests for not displaying uid(WIP) #3139

Closed

Conversation

SidharthBansal
Copy link
Member

@SidharthBansal SidharthBansal commented Jul 24, 2018

Closes #2676

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with rake test
  • code is in uniquely-named feature branch and has no merge conflicts
  • PR is descriptively titled
  • PR body includes fixes #0000-style reference to original issue #
  • ask @publiclab/reviewers for help, in a comment below

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software

We have a loose schedule of reviewing and pulling in changes every Tuesday and Friday, and publishing changes on Fridays.

Thanks!

@ghost ghost assigned SidharthBansal Jul 24, 2018
@ghost ghost added the in progress label Jul 24, 2018
@SidharthBansal
Copy link
Member Author

This is under progress.
@jywarren I am having fever. So cant focus much. Sorrry for the delay in prs. I will try to send prs as soon as I can.

@SidharthBansal SidharthBansal changed the title Tests for not displaying uid Tests for not displaying uid(WIP) Jul 24, 2018
@plotsbot
Copy link
Collaborator

plotsbot commented Jul 24, 2018

4 Errors
🚫 There was a test failure at: Failure: test_Oauth_tags_are_in_form_of_oauth:provider_for_facebook(Minitest::Result) [/app/test/functional/users_controller_test.rb:310]: Expected at least 1 element matching “div#tag_17”, found 0.. Expected 0 to be >= 1.
🚫 There was a test failure at: Failure: test_Oauth_tags_are_in_form_of_oauth:provider_for_github(Minitest::Result) [/app/test/functional/users_controller_test.rb:271]: Expected at least 1 element matching “span#tag_18”, found 0.. Expected 0 to be >= 1.
🚫 There was a test failure at: Failure: test_Oauth_tags_are_in_form_of_oauth:provider_for_google(Minitest::Result) [/app/test/functional/users_controller_test.rb:297]: Expected at least 1 element matching “span#tag_19”, found 0.. Expected 0 to be >= 1.
🚫 There was a test failure at: Failure: test_Oauth_tags_are_in_form_of_oauth:provider_for_twitter(Minitest::Result) [/app/test/functional/users_controller_test.rb:284]: Expected at least 1 element matching “span#tag_20”, found 0.. Expected 0 to be >= 1.
2 Messages
📖 @SidharthBansal Thank you for your pull request! I’m here to help with some tips and recommendations. Please take a look at the list provided and help us review and accept your contribution! And don’t be discouraged if you see errors – we’re here to help.
📖 It looks like you haven’t marked all the checkboxes. Help us review and accept your suggested changes by going through the steps one by one. If it is still a ‘Work in progresss’, please include ‘[WIP]’ in the title.

Generated by 🚫 Danger

assert_response :redirect
assert_redirected_to '/profile/jeff'
s = "span#tag_"+identity.id.to_s
assert_select s,'omniauth:github'
Copy link
Member Author

Choose a reason for hiding this comment

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

@jywarren can you please tell me the what I am doing wrong here. I checked in the view it is

<li><span id="tag_<%= tag.id %>" class="label <%= label_name %>" style="cursor:pointer" data-toggle="popover" data-trigger="manual" data-count=0 data-placement="top" data-content="<a href='/contributors/<%= tag.name %>'><%= Tag.tagged_node_count(tag.name) || 0 %> notes - <%= Tag.contributors(tag.name).count %> people <br></a>" data-html="true" title="<%= tag.name %>">
<% if tag.name[0..4] != "oauth" %>
<%= tag.name %>
<% else %>
<%= tag.name[0..5] + tag.name.split(':')[1] %>
<% end %>

It says span with id as tag_+tag.id. Is tag.id not same as usertag.id?

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, can you check it locally? Maybe also look for the total count of items like span.label to be sure they're appearing at all?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I am trying to debug this. I am trying my level best to write these test asap. It is giving errors.

On localhost everything is working fine. Also in production things are working fine. Just trying to debug the tests.

@SidharthBansal SidharthBansal added the help wanted requires help by anyone willing to contribute label Jul 26, 2018
@SidharthBansal SidharthBansal added this to the OAuth milestone Jul 31, 2018
@SidharthBansal SidharthBansal requested a review from a team August 3, 2018 14:07
@jywarren
Copy link
Member

jywarren commented Aug 4, 2018 via email

@SidharthBansal
Copy link
Member Author

I am closing this and turning these tests into gci help wanted issues.
Thanks

@ghost ghost removed the in progress label Sep 25, 2018
@SidharthBansal
Copy link
Member Author

The system has changed considerably from the time I pushed these changes. So there is a need to close this one.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted requires help by anyone willing to contribute
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PLANNING ISSUE: Multi party authentication
3 participants