fix(coppa): move to age input coppa #3138
Conversation
aa14293
to
62fc051
| @@ -151,10 +151,6 @@ function (_, Errors) { | |||
| errno: 1011, | |||
| message: t('Valid email required') | |||
| }, | |||
| YEAR_OF_BIRTH_REQUIRED: { | |||
shane-tomlinson
Oct 19, 2015
Member
We spoke at one point about how we were going to handle deprecated client-side errors. The resolution was to comment out the errors and leave them in the code. This is usually considered bad practice with version control, but is reasonable from a documentation perspective and ensuring somebody doesn't come along and try to fill in one of the newly empty numbers.
We spoke at one point about how we were going to handle deprecated client-side errors. The resolution was to comment out the errors and leave them in the code. This is usually considered bad practice with version control, but is reasonable from a documentation perspective and ensuring somebody doesn't come along and try to fill in one of the newly empty numbers.
vladikoff
Oct 19, 2015
Author
Contributor
sounds good!
sounds good!
| var email; | ||
|
|
||
| registerSuite({ | ||
| name: 'about:accounts signup', |
shane-tomlinson
Oct 19, 2015
Member
This suite is no longer needed?
This suite is no longer needed?
vladikoff
Oct 19, 2015
Author
Contributor
Yeah we don't use it
Yeah we don't use it
| @@ -438,11 +438,12 @@ define([ | |||
| .type(password) | |||
| .end() | |||
|
|
|||
| .findByCssSelector('#fxa-age-year') | |||
| .findByCssSelector('#age') | |||
| .type('4') | |||
shane-tomlinson
Oct 19, 2015
Member
nit: indentation.
nit: indentation.
| .findById('fxa-' + (TOO_YOUNG_YEAR - 1)) | ||
| .click() | ||
| .findByCssSelector('#age') | ||
| // XXX: Bug in Selenium 2.47.1, if Firefox is out of focus it will just type 1 number, |
shane-tomlinson
Oct 19, 2015
Member
ugh.
nit: indentation.
ugh.
nit: indentation.
| @@ -39,7 +36,7 @@ define([ | |||
| return self.remote.get(require.toUrl(url + '&verification_redirect=always')); | |||
| }) | |||
| .then(function () { | |||
| return FunctionalHelpers.fillOutSignUp(self, email, PASSWORD, OLD_ENOUGH_YEAR); | |||
| return FunctionalHelpers.fillOutSignUp(self, email, PASSWORD); | |||
shane-tomlinson
Oct 19, 2015
Member
I haven't mentioned, but I am really glad you simplified the function signature.
I haven't mentioned, but I am really glad you simplified the function signature.
|
@vladikoff I need to UI review. What's the flag to get this to appear? |
| .findByCssSelector('#age') | ||
| // XXX: Bug in Selenium 2.47.1, if Firefox is out of focus it will just type 1 number, | ||
| // split the type commands for each character to avoid issues with the test runner | ||
| .type('1') |
shane-tomlinson
Oct 19, 2015
Member
nit: indentation.
nit: indentation.
shane-tomlinson
Oct 19, 2015
Member
When you do the .type, do you have to do a .click first so the element receives the focus? I could swear that's why we do stuff like https://github.com/mozilla/fxa-content-server/pull/3138/files#diff-addb444c51a96421c45bfd482b36edd8R224
When you do the .type, do you have to do a .click first so the element receives the focus? I could swear that's why we do stuff like https://github.com/mozilla/fxa-content-server/pull/3138/files#diff-addb444c51a96421c45bfd482b36edd8R224
vladikoff
Oct 19, 2015
Author
Contributor
Tried that trick, Sadly that does not help
Tried that trick, Sadly that does not help
| var monthToSelect = now.getMonth(); | ||
| var dateToSelect = now.getDate(); | ||
|
|
||
| 'coppa does not allow sign up if younger than 13 years old': function () { | ||
| return this.remote | ||
| .get(require.toUrl(PAGE_URL)) | ||
| .findByCssSelector('form input.email') |
shane-tomlinson
Oct 19, 2015
Member
Would FunctionalHelpers.fillOutSignUp with an optional age work here?
Would FunctionalHelpers.fillOutSignUp with an optional age work here?
| @@ -416,7 +341,6 @@ define([ | |||
|
|
|||
| function testRepopulateFields(dest, header) { | |||
| var self = this; | |||
| var year = OLD_ENOUGH_YEAR; | |||
|
|
|||
| return self.remote | |||
shane-tomlinson
Oct 19, 2015
Member
Could fillOutSignUp with an optional age be used here as well?
Could fillOutSignUp with an optional age be used here as well?
|
|
|
Testing now. |

Fixes #3137