feat(mailcheck): enabling mailcheck for all. #4703
Conversation
314a593
to
6a98c04
| 'intern!object', | ||
| 'tests/functional/lib/helpers' | ||
| ], function (intern, registerSuite, FunctionalHelpers) { | ||
| var EXP_MAILCHECK_URL = intern.config.fxaContentRoot + 'signup?forceExperiment=mailcheck&automatedBrowser=true'; |
vladikoff
Feb 7, 2017
Contributor
@divyabiyani for this file, we should keep it, but rename it to mailcheck (make sure to rename it in the list of functional tests as well).
We can remove the 'signup?forceExperiment=mailcheck&automatedBrowser=true' query part and only leave the 'treatment works': function () { test. Delete the 'control works': function () { test though
@divyabiyani for this file, we should keep it, but rename it to mailcheck (make sure to rename it in the list of functional tests as well).
We can remove the 'signup?forceExperiment=mailcheck&automatedBrowser=true' query part and only leave the 'treatment works': function () { test. Delete the 'control works': function () { test though
| if (e.type === 'click' || e.which === KeyCodes.ENTER) { | ||
| element.val(suggestion.full); | ||
| // the user has used the suggestion | ||
| view.notifier.trigger('mailcheck.clicked'); |
vladikoff
Feb 7, 2017
Contributor
@divyabiyani this used to log that the tooltip was clicked into the experiment file. Could you change this to logEvent, this way we still get metrics that users click on the tooltip.
We might have a unit test for the mailcheck click action, we need to update it to make sure that the correct event is logged
@divyabiyani this used to log that the tooltip was clicked into the experiment file. Could you change this to logEvent, this way we still get metrics that users click on the tooltip.
We might have a unit test for the mailcheck click action, we need to update it to make sure that the correct event is logged
| @@ -55,37 +55,34 @@ define(function (require, exports, module) { | |||
|
|
|||
| // user got a suggestion to check their email input | |||
| view.notifier.trigger('mailcheck.suggested'); | |||
vladikoff
Feb 7, 2017
Contributor
same as https://github.com/mozilla/fxa-content-server/pull/4703/files#r99847017 , except this should logEvent that mailcheck was suggested
same as https://github.com/mozilla/fxa-content-server/pull/4703/files#r99847017 , except this should logEvent that mailcheck was suggested
| if (e.type === 'click' || e.which === KeyCodes.ENTER) { | ||
| element.val(suggestion.full); | ||
| // the user has used the suggestion | ||
| view.notifier.trigger('mailcheck.clicked'); |
d664fff
to
cf001d3
|
unit tests need updating, see this mockView: https://github.com/mozilla/fxa-content-server/blob/master/app/tests/spec/lib/mailcheck.js#L36 |
|
Need to change the tests: |
|
To fix issue with lib/experiment: either use the |
|
See if we can fix |
|
Corrected event functionality: https://github.com/mozilla/fxa-content-server/blob/master/app/scripts/lib/experiments/mailcheck.js#L21 |
115ab9d
to
3afa544
tests/spec/views/sign_upcheck for The fail in |
|
|
| @@ -34,22 +31,12 @@ define([ | |||
| var CORRECTED_EMAIL = 'something@gmail.com'; | |||
vladikoff
Feb 15, 2017
•
Contributor
rename this from 'treatment works' - tooltip works
rename this from 'treatment works' - tooltip works
|
|
functional testsseeing issues with the password click, try using the following: .then(type('.email', BAD_EMAIL))
.then(click('#fxa-signup-header'))
.then(click('.tooltip-suggest > span:nth-child(1)')) |
a543feb
to
3c4db31
|
|
||
| if (emailValue.length > 0 && mailcheckValue === emailValue) { | ||
| this.logEvent('mailcheck.corrected'); | ||
| } |
vladikoff
Feb 21, 2017
Contributor
call it _checkMailcheckResult maybe ?
call it _checkMailcheckResult maybe ?
| } | ||
| }; | ||
| notifier.trigger('signup.submit', {}, mockView); | ||
| assert.isTrue(TestHelpers.isEventLogged(metrics, 'experiment.treatment.mailcheck.corrected')); |
vladikoff
Feb 21, 2017
Contributor
@divyabiyani related to https://github.com/mozilla/fxa-content-server/pull/4703/files#r102228528 let's make sure we have a unit test that checks that corrected has been logged. You can add this by unit testing the new "corrected" function (see linked comment).
@divyabiyani related to https://github.com/mozilla/fxa-content-server/pull/4703/files#r102228528 let's make sure we have a unit test that checks that corrected has been logged. You can add this by unit testing the new "corrected" function (see linked comment).
divyabiyani
Feb 21, 2017
Author
Member
@vladikoff : I think this function is checking it. https://github.com/divyabiyani/fxa-content-server/blob/mailcheck/app/tests/spec/views/sign_up.js#L1158
@vladikoff : I think this function is checking it. https://github.com/divyabiyani/fxa-content-server/blob/mailcheck/app/tests/spec/views/sign_up.js#L1158
vladikoff
Feb 21, 2017
Contributor
@divyabiyani ok perfect, then we can just clean up the code in (so it lives in its own function ) #4703 (comment) and it will already be tested 👍
@divyabiyani ok perfect, then we can just clean up the code in (so it lives in its own function ) #4703 (comment) and it will already be tested
| .then(type('.email', BAD_EMAIL)) | ||
| .then(click('.password')) | ||
| .then(click('#age')) |
vladikoff
Feb 21, 2017
Contributor
@divyabiyani can you check if adding a .sleep(1000) helps this, maybe there is an issue with tooltip fade on CI, example:
.then(openPage(EXP_MAILCHECK_URL, '#fxa-signup-header'))
.then(type('.email', BAD_EMAIL))
.then(click('#age'))
// give time for the tooltip to fade in
.sleep(1000)
.then(click('.tooltip-suggest > span:nth-child(1)'))
@divyabiyani can you check if adding a .sleep(1000) helps this, maybe there is an issue with tooltip fade on CI, example:
.then(openPage(EXP_MAILCHECK_URL, '#fxa-signup-header'))
.then(type('.email', BAD_EMAIL))
.then(click('#age'))
// give time for the tooltip to fade in
.sleep(1000)
.then(click('.tooltip-suggest > span:nth-child(1)'))
98fbf4d
to
556da64
|
Continued in #4751 |

No description provided.