-
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
Individual tagpage: Add dropdown to distinct btw info and add test #5925
Conversation
Screenshots 📸 (click to expand)5925-test_viewing_question_post.png5925-test_wiki.png5925-test_tag_page.png5925-test_login.png5925-test_wiki_page_with_inline_grids.png5925-test_questions.png5925-test_viewing_the_dropdown_menu.png5925-test_stats.png5925-test_tags.png5925-test_people.png5925-test_front.png5925-test_signup.png5925-test_questions_shadow.png5925-test_blog.png5925-test_front_page_with_navbar_search_autocomplete.png5925-test_viewing_the_dashboard.pngLearn about automated screenshots Generated by 🚫 Danger |
2489c49
to
d3e6f2e
Compare
Looking great! |
Do you still need help gautami? |
Hi @jywarren just pushed one the parts of individual tagoage issue here. |
Hi @jywarren I wanted to ask that
Here We are doing testing by using |
@CleverFool77 Do you think it's really required? Like, initially(by default) some tab say, wiki will be active and it has nothing to do with the dropdown. In that case, it might fail tests. You then have to add wikis to the tests separately. |
But here it's not getting the drop down item as active at all. Because the drop down menu is closed. I provided toggle for drop down, so it closes as we chose one of the items. So i thought maybe we need to check whether dropdown menu is open, and then only check the active class for item. Or should I remove the |
I am not sure if we need to do this. I am not good with writing tests so lets wait for @jywarren's view on this one. |
Hmm, so isn't the issue perhaps that there is no fixed URL for showing questions, and perhaps there should be? What if the dropdown loads the route Am I understanding your question correctly? |
Hi @jywarren I didn't understand the point clearly though. |
That sounds great! Thank you!
…On Mon, Jun 24, 2019 at 3:26 PM Lekhika Dugtal ***@***.***> wrote:
Here We are doing testing by using question.active in tab. But in new
design we have dropdown. And unless dropdown menu is being shown, despite
of being at questions page, that class won't be active for dropdown-item
leading to failure of test. So should I add condition where unless
dropdown-menu is having show class, then only the test for question
dropdown-item should have active class should be tested ?
Hmm, so isn't the issue perhaps that there is no fixed URL for showing
questions, and perhaps there should be? What if the dropdown loads the
route https://publiclab.org/questions/tag/pi-camera and then we can
ensure that what's being shown is questions? this also most minimally
disrupts the current routing setup and tests, even if it does require a
page refresh still.
Am I understanding your question correctly?
Hi @jywarren <https://github.com/jywarren> I didn't understand the point
clearly though.
But I thought of a method. I'll remove the test written for tab and write
new tests for dropdown directly.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5925?email_source=notifications&email_token=AAAF6JZYO3WD7H5ZTJ5NW23P4ENTJA5CNFSM4HZQK4YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYN6VFY#issuecomment-505146007>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAF6JZNRAJ7VQFQIDT7WT3P4ENTJANCNFSM4HZQK4YA>
.
|
HI Jeff, |
<li class="nav-item"><a class="nav-link <% if @node_type == "contributors" %> active <% end %>" href="/contributors/<%= params[:id] %>"><i class="fa fa-user"></i> <span class="d-none d-lg-inline"><%= raw t('tag.show.contributors') %></span><span class="badge"><%=@length %></span></a></li> | ||
<div class="dropdown-menu dropdown-menu-right mt-1" aria-labelledby="dropdownMenuButton"> | ||
<% if params[:action] == "show" %> | ||
<% unless params[:id].match("question:") %><a class="dropdown-item <% if @node_type == "note" %> active<% end %>" href="/tag/<%= params[:id] %>"><i class="fa fa-file"></i> <span class="d-none d-lg-inline"><%= raw t('tag.show.research_notes') %></span></a><% end %> |
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.
Can u use the dev console elements inspector to see what the code looks like? I mean, here, it seems like we should be able to test against it with css_select
. Maybe css_select
docs say that the element has to be shown?
If you can't get it to work, you could write a system test for it, where you literally send a click event to open the dropdown. I've done that for some system tests, so it's a backup plan!
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.
But Doesn't css_select
work only when the element is being shown not when it's hidden like dropdown menu here ?
I did system test though, to have a screenshot when menu is open and closed.
f652ba7
to
25d8335
Compare
Uhmm !! 🤔 This test seems to failing despite there being no change related to this. The reason for this is that there is no matches for text |
All checks passed 🎉 🎉 |
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.
This looks super. Can we wait a little bit so we can merge more of these changes at one time? Thanks!
class TagTest < ApplicationSystemTestCase | ||
Capybara.default_max_wait_time = 60 | ||
|
||
test 'viewing the dropdown menu' do |
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.
Very awesome!
Sure Jeff !!! |
Cool !! |
Fixes #5890 part
The position of dropdown button looks floated to rightmost.
The position will get fixed with the help of one #5902 where the grid system is being applied.