Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/train-110'
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane Tomlinson committed Apr 26, 2018
2 parents 8caf2c1 + 0d4691c commit e870891
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,13 @@
<a name="1.110.3"></a>
## 1.110.3 (2018-04-25)


### Bug Fixes

* **test:** fix totp test failures (#6117) r=@vladikoff,@jrgm ([e38e282](https://github.com/mozilla/fxa-content-server/commit/e38e282)), closes [(#6117](https://github.com/(/issues/6117)



<a name="1.110.2"></a>
## 1.110.2 (2018-04-25)

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "fxa-content-server",
"version": "1.110.2",
"version": "1.110.3",
"description": "Firefox Accounts Content Server",
"scripts": {
"build-production": "NODE_ENV=production grunt build",
Expand Down
15 changes: 15 additions & 0 deletions tests/functional/lib/helpers.js
Expand Up @@ -187,6 +187,21 @@ const click = thenify(function (selector, readySelector) {
// Sometimes clicks do not register if the element is in the middle of an animation.
.then(visibleByQSA(selector))
.click()
.then(null, (err) => {
// If element is obsure (possibly by a verification message covering it), attempt
// to scroll to the top of page where it might be visible.
if (/obscures it/.test(err.message)) {
return this.parent
.execute(() => {
window.scrollTo(0, 0);
})
.findByCssSelector(selector)
.click()
.end();
}
// re-throw other errors
throw err;
})
.end()
.then(function () {
if (readySelector) {
Expand Down
12 changes: 3 additions & 9 deletions tests/functional/oauth_sign_in.js
Expand Up @@ -29,6 +29,7 @@ const {
clearBrowserState,
click,
closeCurrentWindow,
confirmTotpCode,
createUser,
fillOutSignIn,
fillOutSignInUnblock,
Expand Down Expand Up @@ -319,11 +320,7 @@ registerSuite('oauth - TOTP', {
tests: {
'can add TOTP to account and confirm oauth signin': function () {
return this.remote
// Shows success for confirming token
.then(type(selectors.TOTP.CONFIRM_CODE_INPUT, generateCode(secret)))
.then(click(selectors.TOTP.CONFIRM_CODE_BUTTON))
.then(testSuccessWasShown)
.then(testElementExists(selectors.TOTP.STATUS_ENABLED))
.then(confirmTotpCode(secret))

.then(clearBrowserState({
'123done': true,
Expand All @@ -343,10 +340,7 @@ registerSuite('oauth - TOTP', {

'can remove TOTP from account and skip confirmation': function () {
return this.remote
.then(type(selectors.TOTP.CONFIRM_CODE_INPUT, generateCode(secret)))
.then(click(selectors.TOTP.CONFIRM_CODE_BUTTON))
.then(testSuccessWasShown)
.then(testElementExists(selectors.TOTP.STATUS_ENABLED))
.then(confirmTotpCode(secret))

// Remove token
.then(click(selectors.TOTP.DELETE_BUTTON))
Expand Down

0 comments on commit e870891

Please sign in to comment.