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

Improve test on jQuery disable challenge #10412

Conversation

dhcodes
Copy link
Contributor

@dhcodes dhcodes commented Aug 31, 2016

Pre-Submission Checklist

  • Your pull request targets the staging branch of FreeCodeCamp.
  • Branch starts with either fix/, feature/, or translate/ (e.g. fix/signin-issue)
  • You have only one commit (if not, squash them into one commit).
  • All new and existing tests pass the command npm run test-challenges. Use git commit --amend to amend any fixes.

Type of Change

  • Small bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Add new translation (feature adding new translations)

Checklist:

Description

Updated the third test to look for disabled\s?= whereas before it looked for disabled>

@BerkeleyTrue BerkeleyTrue added the status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. label Aug 31, 2016
@dhcodes dhcodes force-pushed the fix/improved-test-disabling-element-jQuery branch from 763309f to 40d5d27 Compare August 31, 2016 13:50
@camperbot
Copy link
Contributor

@dhcodes updated the pull request.

@ltegman
Copy link
Member

ltegman commented Sep 7, 2016

Thanks for the PR @dhcodes. One thing about this approach is that it will now no longer catch cases where someone simply uses disabled without an = (which is valid syntax for boolean properties in HTML). I can also say after seeing a lot of test related bugs that you should always account for more than 1 character of whitespace. Perhaps the following regex might be more flexible?

disabled[^<]*>

There might be some edge cases I missed, but basically this will look for any instance of disabled inside the open and close bracket of an HTML tag.

@ltegman ltegman added status: blocked Is waiting on followup from either the Opening Poster of the issue or PR, or a maintainer. and removed status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. labels Sep 7, 2016
@dhcodes
Copy link
Contributor Author

dhcodes commented Sep 7, 2016

@ltegman good idea, I hadn't considered that. I'll update this today (hopefully).

@dhcodes dhcodes force-pushed the fix/improved-test-disabling-element-jQuery branch from 40d5d27 to c569fe8 Compare September 13, 2016 13:42
@camperbot
Copy link
Contributor

@dhcodes updated the pull request.

@dhcodes dhcodes force-pushed the fix/improved-test-disabling-element-jQuery branch from c569fe8 to 4da43ae Compare September 13, 2016 13:50
@camperbot
Copy link
Contributor

@dhcodes updated the pull request.

@dhcodes dhcodes force-pushed the fix/improved-test-disabling-element-jQuery branch from 4da43ae to 80b2d69 Compare September 13, 2016 13:55
@camperbot
Copy link
Contributor

@dhcodes updated the pull request.

@dhcodes
Copy link
Contributor Author

dhcodes commented Sep 13, 2016

Okay. Sorry if you got notifications for all that @ltegman. Should be good to go now. Sorry it took so long. I need even more git practice apparently.

@ltegman ltegman added status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. and removed status: blocked Is waiting on followup from either the Opening Poster of the issue or PR, or a maintainer. labels Sep 13, 2016
@ltegman
Copy link
Member

ltegman commented Sep 13, 2016

Not a problem -- only way you get good at git is by making mistakes with git! 😆 Looks good! 👍

@ltegman ltegman merged commit 56b1cf2 into freeCodeCamp:staging Sep 13, 2016
@ltegman ltegman removed the status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. label Sep 13, 2016
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.

4 participants