Closed
Bug 1081413
Opened 10 years ago
Closed 10 years ago
move url validation code into fjord_utils.js
Categories
(Input Graveyard :: Code Quality, defect)
Input Graveyard
Code Quality
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: willkg, Assigned: aokoye, Mentored)
References
Details
(Whiteboard: u=dev c=codequality p= s=input.2014q4)
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.
Reporter | ||
Comment 1•10 years ago
|
||
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.
Made a pull request https://github.com/mozilla/fjord/pull/367/commits
Reporter | ||
Comment 4•10 years ago
|
||
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
Reporter | ||
Comment 5•10 years ago
|
||
Pushed this to prod just now.
Thank you!
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•8 years ago
|
Product: Input → Input Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•