-
Notifications
You must be signed in to change notification settings - Fork 554
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -157,10 +157,12 @@ describe('captcha on signup', function () { | |
|
||
describe('when the challenge api returns required: false', function () { | ||
let notRequiredStub; | ||
let loginGetChallengeStub; | ||
beforeEach(function (done) { | ||
notRequiredStub = h.stubGetSignupChallenge({ | ||
required: false | ||
}); | ||
loginGetChallengeStub = h.stubGetChallenge([recaptchav2Response]); | ||
this.lock = h.displayLock('', lockOpts, done); | ||
}); | ||
|
||
|
@@ -169,6 +171,7 @@ describe('captcha on signup', function () { | |
}); | ||
|
||
it('should not show the captcha input', function () { | ||
expect(loginGetChallengeStub.calledOnce).to.be.false; | ||
expect(h.q(this.lock, '.auth0-lock-recaptchav2')).to.not.be.ok(); | ||
}); | ||
|
||
|
@@ -181,7 +184,7 @@ describe('captcha on signup', function () { | |
setTimeout(done, 260); | ||
}); | ||
|
||
challengeStub = h.stubGetSignupChallenge(recaptchav2Response); | ||
challengeStub = h.stubGetSignupChallenge([recaptchav2Response]); | ||
h.fillEmailInput(this.lock, '[email protected]'); | ||
h.fillComplexPassword(this.lock); | ||
h.submitForm(this.lock); | ||
|
@@ -190,6 +193,7 @@ describe('captcha on signup', function () { | |
it('should call the challenge api again and show the input', function () { | ||
expect(notRequiredStub.calledOnce).to.be.true; | ||
expect(challengeStub.calledOnce).to.be.true; | ||
expect(loginGetChallengeStub.calledOnce).to.be.false; | ||
expect(h.q(this.lock, '.auth0-lock-recaptchav2')).to.be.ok(); | ||
}); | ||
}); | ||
|