Closed Bug 1081413 Opened 8 years ago Closed 8 years ago
move url validation code into fjord
We have url validation code that should get moved to fjord_utils.js and then we can add tests for it. The url validation code is one big regexp here: https://github.com/mozilla/fjord/blob/master/fjord/feedback/static/js/generic_feedback.js#L114 After it's rewritten, it'll probably look a bit like the validateEmail function: https://github.com/mozilla/fjord/blob/master/fjord/base/static/js/fjord_utils.js#L9 which has a test here: https://github.com/mozilla/fjord/blob/master/fjord/base/static/tests/test_fjord_utils.js#L1 See bug #1081412 for more details on writing a unit test.
We can re-use these urls to test this url validation code: https://github.com/mozilla/fjord/blob/master/smoketests/tests/generic/test_generic_feedback.py#L215 Any other shapes of urls you want to test would be great, too.
Assigning this to Adam.
Assignee: nobody → aokoye
Made a pull request https://github.com/mozilla/fjord/pull/367/commits
Landed in master: https://github.com/mozilla/fjord/commit/c2b2c2bcda6b23a8dc9cefa1bf0af6fe15d6f38d https://github.com/mozilla/fjord/commit/4181b5ea06d0604213cc6d4880d3760e2bf87915 https://github.com/mozilla/fjord/commit/2cd62ad18c108dd33b97d2341bded5f785a721a6 https://github.com/mozilla/fjord/commit/f72652a8475002c827349857a6adf11191cc3dfc We'll push this out on Monday.
Status: NEW → ASSIGNED
Whiteboard: u=dev c=codequality p= s=input.2014q4
Pushed this to prod just now. Thank you!
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Retro-actively marking myself as a mentor.
You need to log in before you can comment on or make changes to this bug.