-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Conversation
This is under progress. |
Generated by 🚫 Danger |
02e1dbf
to
5977975
Compare
5977975
to
0ee3510
Compare
assert_response :redirect | ||
assert_redirected_to '/profile/jeff' | ||
s = "span#tag_"+identity.id.to_s | ||
assert_select s,'omniauth:github' |
There was a problem hiding this comment.
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
plots2/app/views/tag/_tags.html.erb
Lines 20 to 25 in de4d09f
<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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
ok, no worries, and thanks for your hard work!
Maybe @publiclab/reviewers could help if you can't figure it out?
…On Sat, Aug 4, 2018 at 12:32 PM Sidharth Bansal ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In test/functional/users_controller_test.rb
<#3139 (comment)>:
> @@ -257,4 +257,57 @@ def setup
post :test_digest_email
assert_redirected_to '/'
end
+
+ test 'Oauth tags are in form of oauth:provider for github' do
+ UserSession.create(users(:jeff))
+ user = users(:jeff)
+ auth = { "provider" => "github", "uid" => "123456789"}
+ uid = user.id
+ identity = UserTag.create_with_omniauth(auth, uid)
+ get :profile
+ assert_response :redirect
+ assert_redirected_to '/profile/jeff'
+ s = "span#tag_"+identity.id.to_s
+ assert_select s,'omniauth:github'
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.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#3139 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ-ZZ0vTz69W4Blo-hsaJ7dCFlLmeks5uNcx9gaJpZM4VdEe1>
.
|
I am closing this and turning these tests into gci help wanted issues. |
The system has changed considerably from the time I pushed these changes. So there is a need to close this one. |
Closes #2676
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
rake test
fixes #0000
-style reference to original issue #@publiclab/reviewers
for help, in a comment belowIf 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!