Plots2: Change depreciated assert_tag to assert_select .

Created on 11 Apr 2018  ยท  4Comments  ยท  Source: publiclab/plots2

Hi, this is a first-timers-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.

If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!

We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you ๐Ÿ’

If you have contributed before, consider leaving this one for someone new, and looking through our general help wanted issues. Thanks!

๐Ÿค” What you will need to know.

The method assert_tag is depreciated or removed . You can read more about this here .

The replacement for the above is assert_select "css_selector" and is more easy to use . Read more about this here .

Let's replace this line :
https://github.com/publiclab/plots2/blob/af92c49b37517af926530c933c03e33baaa2d74c/test/functional/tag_controller_test.rb#L42

with :

assert_select 'p', text: "No contributors for that tag; try searching for 'question:*':"

Thank you!!

๐Ÿ“‹ Step by Step

  • [ ] ๐Ÿ™‹ Claim this issue: Comment below. If someone else has claimed it, ask if they've opened a pull request already and if they're stuck -- maybe you can help them solve a problem or move it along!

  • [ ] ๐Ÿ“ Update the above stated files in the PublicLabEditor repository so as to do the required changes.

See this page for some help in taking your first steps!

  • [ ] ๐Ÿ’พ Commit your changes

  • [ ] ๐Ÿ”€ Start a Pull Request. There are two ways how you can start a pull request:

  1. If you are familiar with the terminal or would like to learn it, here is a great tutorial on how to send a pull request using the terminal.

  2. You can also edit files directly in your browser and open a pull request from there.

  • [ ] ๐Ÿ Done Ask in comments for a review :)

๐Ÿค”โ“ Questions?

Leave a comment below!

Is someone else already working on this?

We encourage you to link to this issue by mentioning the issue # in your pull request, so we can see if someone's already started on it. If someone seems stuck, offer them some help! Otherwise, take a look at some other issues you can help with. Thanks!

first-timers-only testing

Most helpful comment

I can take this one!

All 4 comments

I can take this one!

That's great @waqargithub! You can ask us if you need any help. Thanks.

I have made the change but have not yet submitted a PR.

I thought it would be good to run tests locally and make sure nothing has broken. I have found the documentation in the readme files for how to set up an environment locally. I will set up the environment and run tests before submitting the PR.

Awesome @waqargithub !!! Also, in case tests don't pass locally, please feel free to raise PR so we can help you in debugging. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RuthNjeri picture RuthNjeri  ยท  3Comments

ebarry picture ebarry  ยท  3Comments

keshavsethi picture keshavsethi  ยท  3Comments

milaaraujo picture milaaraujo  ยท  3Comments

noi5e picture noi5e  ยท  3Comments