Skip to content

Commit

Permalink
reset tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DominickBattistini committed Jul 11, 2023
1 parent 79291c5 commit f2740a4
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion dist/auth0.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* auth0-js v9.21.0
* Author: Auth0
* Date: 2023-07-10
* Date: 2023-07-11
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion dist/auth0.min.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/auth0.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cordova-auth0-plugin.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* auth0-js v9.21.0
* Author: Auth0
* Date: 2023-07-10
* Date: 2023-07-11
* License: MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion dist/cordova-auth0-plugin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 20 additions & 18 deletions test/web-auth/captcha.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ describe('captcha rendering', function () {
renderOptions = options;
renderElement = element;
}
reset() { resetted = true; }
}
setMockGlobal({
render(element, options) {
Expand Down Expand Up @@ -329,16 +330,16 @@ describe('captcha rendering', function () {
input.value = 'expired token';
renderOptions['expired-callback']()
expect(input.value).to.equal('');
});

it('should clean the value and reset when reloading', function () {
const input = element.querySelector('input[name="captcha"]');
input.value = 'old token';
c.reload();
expect(input.value).to.equal('');
expect(resetted).to.be.ok();
});
});
}

it('should clean the value and reset when reloading', function () {
const input = element.querySelector('input[name="captcha"]');
input.value = 'old token';
c.reload();
expect(input.value).to.equal('');
expect(resetted).to.be.ok();
});

it('should clean the value when there is an error', function () {
const input = element.querySelector('input[name="captcha"]');
Expand Down Expand Up @@ -644,6 +645,7 @@ describe('passwordless captcha rendering', function () {
renderOptions = options;
renderElement = element;
}
reset() { resetted = true; }
}
setMockGlobal({
render(element, options) {
Expand Down Expand Up @@ -688,16 +690,16 @@ describe('passwordless captcha rendering', function () {
input.value = 'expired token';
renderOptions['expired-callback']()
expect(input.value).to.equal('');
});

it('should clean the value and reset when reloading', function () {
const input = element.querySelector('input[name="captcha"]');
input.value = 'old token';
c.reload();
expect(input.value).to.equal('');
expect(resetted).to.be.ok();
});
});
}

it('should clean the value and reset when reloading', function () {
const input = element.querySelector('input[name="captcha"]');
input.value = 'old token';
c.reload();
expect(input.value).to.equal('');
expect(resetted).to.be.ok();
});

it('should clean the value when there is an error', function () {
const input = element.querySelector('input[name="captcha"]');
Expand Down

0 comments on commit f2740a4

Please sign in to comment.