auth0-lock 13.0.0 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/test.yml +3 -2
- package/.version +1 -1
- package/CHANGELOG.md +10 -0
- package/README.md +2 -2
- package/karma.conf.js +5 -1
- package/lib/__tests__/auth_button.js +5 -5
- package/lib/__tests__/connection/database/actions.js +2 -3
- package/lib/__tests__/connection/database/index.js +1 -2
- package/lib/__tests__/connection/database/login_pane.js +9 -9
- package/lib/__tests__/connection/database/password_reset_confirmation.js +6 -6
- package/lib/__tests__/connection/database/reset_password.js +3 -3
- package/lib/__tests__/connection/database/signed_up_confirmation.js +6 -6
- package/lib/__tests__/connection/enterprise/actions.js +2 -3
- package/lib/__tests__/connection/enterprise/hrd_pane.js +4 -5
- package/lib/__tests__/connection/enterprise/hrd_screen.js +4 -5
- package/lib/__tests__/connection/enterprise/quick_auth_screen.js +10 -10
- package/lib/__tests__/connection/passwordless/ask_vcode.js +4 -5
- package/lib/__tests__/connection/passwordless/email_sent_confirmation.js +6 -6
- package/lib/__tests__/connection/passwordless/passwordless.js +7 -7
- package/lib/__tests__/core/actions.js +3 -4
- package/lib/__tests__/core/client/index.js +1 -1
- package/lib/__tests__/core/index.js +5 -5
- package/lib/__tests__/core/remote_data.js +5 -6
- package/lib/__tests__/core/signed_in_confirmation.js +6 -6
- package/lib/__tests__/core/sso/last_login_screen.js +11 -11
- package/lib/__tests__/core/tenant.js +1 -1
- package/lib/__tests__/core/web_api.js +2 -2
- package/lib/__tests__/engine/classic/login.js +9 -9
- package/lib/__tests__/engine/classic/mfa_login_screen.js +2 -2
- package/lib/__tests__/engine/classic/sign_up_pane.js +11 -11
- package/lib/__tests__/engine/classic/sign_up_screen.js +8 -8
- package/lib/__tests__/engine/classic.js +1 -1
- package/lib/__tests__/engine/passwordless/social_or_email_login_screen.js +3 -3
- package/lib/__tests__/engine/passwordless/social_or_phone_number_login_screen.js +3 -3
- package/lib/__tests__/field/captcha/arkose.js +6 -6
- package/lib/__tests__/field/captcha/auth0_v2.js +6 -6
- package/lib/__tests__/field/captcha/friendlyCaptcha.js +6 -6
- package/lib/__tests__/field/captcha/hcaptcha.js +6 -6
- package/lib/__tests__/field/captcha/recaptcha_enterprise.js +6 -6
- package/lib/__tests__/field/captcha/recaptchav2.js +6 -6
- package/lib/__tests__/field/captcha/third_party_captcha.js +12 -13
- package/lib/__tests__/field/captcha.js +8 -8
- package/lib/__tests__/field/custom_input.js +13 -13
- package/lib/__tests__/field/email_pane.js +8 -8
- package/lib/__tests__/field/field.js +2 -2
- package/lib/__tests__/field/login_pane.js +12 -12
- package/lib/__tests__/field/mfa_code_pane.js +4 -4
- package/lib/__tests__/field/option_selection_pane.js +4 -4
- package/lib/__tests__/field/password.js +1 -1
- package/lib/__tests__/field/password_pane.js +12 -12
- package/lib/__tests__/field/phone_number_pane.js +8 -8
- package/lib/__tests__/field/social_buttons_pane.js +8 -8
- package/lib/__tests__/field/username.js +1 -1
- package/lib/__tests__/field/username_pane.js +10 -10
- package/lib/__tests__/field/vcode.js +1 -1
- package/lib/__tests__/field/vcode_pane.js +9 -9
- package/lib/__tests__/i18n.js +2 -3
- package/lib/__tests__/setup-tests.js +1 -1
- package/lib/__tests__/testUtils.js +4 -4
- package/lib/__tests__/ui/box/chrome.js +8 -8
- package/lib/__tests__/ui/box/confirmation_pane.js +6 -6
- package/lib/__tests__/ui/box/container.js +2 -2
- package/lib/__tests__/ui/box/global_message.js +10 -10
- package/lib/__tests__/ui/input/email_input.js +2 -2
- package/lib/__tests__/ui/input/input_wrap.js +2 -2
- package/lib/__tests__/ui/input/password/password_strength.js +2 -2
- package/lib/__tests__/ui/input/password_input.js +5 -5
- package/lib/__tests__/utils/format.js +1 -1
- package/lib/avatar/gravatar_provider.js +1 -1
- package/lib/avatar.js +1 -2
- package/lib/browser.js +1 -2
- package/lib/connection/captcha.js +2 -3
- package/lib/connection/database/actions.js +4 -5
- package/lib/connection/database/index.js +2 -3
- package/lib/connection/database/login_pane.js +11 -12
- package/lib/connection/database/login_sign_up_tabs.js +11 -12
- package/lib/connection/database/mfa_pane.js +9 -9
- package/lib/connection/database/password_reset_confirmation.js +10 -11
- package/lib/connection/database/reset_password.js +10 -11
- package/lib/connection/database/reset_password_pane.js +11 -12
- package/lib/connection/database/sign_up_terms.js +1 -1
- package/lib/connection/database/signed_up_confirmation.js +10 -11
- package/lib/connection/enterprise/actions.js +2 -3
- package/lib/connection/enterprise/hrd_pane.js +10 -11
- package/lib/connection/enterprise/hrd_screen.js +10 -11
- package/lib/connection/enterprise/kerberos_screen.js +10 -11
- package/lib/connection/enterprise/quick_auth_screen.js +10 -11
- package/lib/connection/enterprise/single_sign_on_notice.js +1 -1
- package/lib/connection/enterprise.js +6 -7
- package/lib/connection/passwordless/actions.js +3 -4
- package/lib/connection/passwordless/ask_vcode.js +9 -9
- package/lib/connection/passwordless/email_sent_confirmation.js +11 -12
- package/lib/connection/passwordless/index.js +2 -3
- package/lib/connection/social/index.js +2 -2
- package/lib/core/actions.js +3 -4
- package/lib/core/client/index.js +8 -9
- package/lib/core/client/settings.js +2 -3
- package/lib/core/error_screen.js +10 -11
- package/lib/core/index.js +3 -4
- package/lib/core/loading_screen.js +10 -11
- package/lib/core/pane_separator.js +1 -1
- package/lib/core/remote_data.js +2 -3
- package/lib/core/screen.js +4 -5
- package/lib/core/signed_in_confirmation.js +10 -11
- package/lib/core/sso/data.js +1 -1
- package/lib/core/sso/last_login_screen.js +10 -11
- package/lib/core/tenant/index.js +8 -9
- package/lib/core/tenant/settings.js +1 -2
- package/lib/core/web_api/helper.js +5 -5
- package/lib/core/web_api/p2_api.js +5 -5
- package/lib/core/web_api.js +4 -4
- package/lib/core.js +11 -12
- package/lib/engine/classic/login.js +10 -11
- package/lib/engine/classic/mfa_login_screen.js +10 -11
- package/lib/engine/classic/sign_up_pane.js +10 -11
- package/lib/engine/classic/sign_up_screen.js +10 -11
- package/lib/engine/classic.js +6 -7
- package/lib/engine/passwordless/social_or_email_login_screen.js +10 -11
- package/lib/engine/passwordless/social_or_phone_number_login_screen.js +10 -11
- package/lib/engine/passwordless.js +5 -6
- package/lib/field/captcha/captcha_pane.js +10 -11
- package/lib/field/captcha/third_party_captcha.js +10 -10
- package/lib/field/custom_input.js +3 -4
- package/lib/field/email/email_pane.js +10 -11
- package/lib/field/email.js +2 -3
- package/lib/field/index.js +2 -3
- package/lib/field/mfa-code/mfa_code_pane.js +10 -11
- package/lib/field/mfa_code.js +1 -1
- package/lib/field/option_selection_pane.js +1 -1
- package/lib/field/password/password_pane.js +11 -12
- package/lib/field/password.js +1 -1
- package/lib/field/phone-number/phone_number_pane.js +10 -11
- package/lib/field/phone_number.js +1 -1
- package/lib/field/social/event.js +1 -2
- package/lib/field/social/social_buttons_pane.js +10 -11
- package/lib/field/username/username_pane.js +10 -11
- package/lib/field/username.js +1 -1
- package/lib/field/vcode/vcode_pane.js +11 -12
- package/lib/i18n.js +5 -6
- package/lib/index.js +1 -1
- package/lib/lock.js +11 -12
- package/lib/passwordless.js +11 -12
- package/lib/quick-auth/actions.js +2 -3
- package/lib/sanitizer.js +3 -2
- package/lib/store/index.js +1 -1
- package/lib/sync.js +6 -7
- package/lib/ui/box/button.js +1 -1
- package/lib/ui/box/chrome.js +13 -14
- package/lib/ui/box/confirmation_pane.js +2 -3
- package/lib/ui/box/container.js +10 -11
- package/lib/ui/box/global_message.js +9 -9
- package/lib/ui/box/header.js +10 -10
- package/lib/ui/box/multisize_slide.js +11 -11
- package/lib/ui/box/success_pane.js +2 -2
- package/lib/ui/box.js +6 -6
- package/lib/ui/button/auth_button.js +1 -1
- package/lib/ui/input/captcha_input.js +13 -13
- package/lib/ui/input/checkbox_input.js +9 -9
- package/lib/ui/input/email_input.js +12 -12
- package/lib/ui/input/input_wrap.js +9 -9
- package/lib/ui/input/location_input.js +9 -9
- package/lib/ui/input/mfa_code_input.js +13 -13
- package/lib/ui/input/password/password_strength.js +18 -18
- package/lib/ui/input/password_input.js +14 -15
- package/lib/ui/input/phone_number_input.js +12 -12
- package/lib/ui/input/select_input.js +9 -9
- package/lib/ui/input/text_input.js +12 -12
- package/lib/ui/input/username_input.js +12 -12
- package/lib/ui/input/vcode_input.js +12 -12
- package/lib/ui/list.js +12 -13
- package/lib/ui/pane/quick_auth_pane.js +1 -1
- package/lib/utils/atom.js +3 -3
- package/lib/utils/cache.js +8 -8
- package/lib/utils/cdn_utils.js +1 -1
- package/lib/utils/createRef.js +3 -3
- package/lib/utils/jsonp_utils.js +4 -4
- package/package.json +10 -10
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _web_api = _interopRequireDefault(require("../../core/web_api"));
|
|
4
|
-
function _interopRequireDefault(
|
|
4
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
5
5
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
-
function _defineProperty(
|
|
8
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
9
9
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
10
10
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
11
11
|
describe('Auth0WebApi', function () {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _react = _interopRequireDefault(require("react"));
|
|
4
4
|
var _testUtils = require("testUtils");
|
|
5
|
-
function _interopRequireDefault(
|
|
5
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
6
6
|
jest.mock('core/pane_separator', function () {
|
|
7
7
|
return (0, _testUtils.mockComponent)('pane_separator');
|
|
8
8
|
});
|
|
@@ -127,21 +127,21 @@ describe('LoginScreen', function () {
|
|
|
127
127
|
};
|
|
128
128
|
it('renders empty div by default', function () {
|
|
129
129
|
var Component = getComponent();
|
|
130
|
-
(0, _testUtils.expectComponent)(
|
|
130
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
131
131
|
});
|
|
132
132
|
it('renders SocialButtonsPane when has social connections', function () {
|
|
133
133
|
require('core/index').hasSomeConnections = function (m, connection) {
|
|
134
134
|
return connection === 'social';
|
|
135
135
|
};
|
|
136
136
|
var Component = getComponent();
|
|
137
|
-
(0, _testUtils.expectComponent)(
|
|
137
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
138
138
|
});
|
|
139
139
|
it('renders SingleSignOnNotice when SSO is enabled', function () {
|
|
140
140
|
require('engine/classic').isSSOEnabled = function () {
|
|
141
141
|
return true;
|
|
142
142
|
};
|
|
143
143
|
var Component = getComponent();
|
|
144
|
-
(0, _testUtils.expectComponent)(
|
|
144
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
145
145
|
});
|
|
146
146
|
describe('renders LoginSignUpTabs', function () {
|
|
147
147
|
it('when database connection is enabled and has screen signUp', function () {
|
|
@@ -152,7 +152,7 @@ describe('LoginScreen', function () {
|
|
|
152
152
|
return screenName === 'signUp';
|
|
153
153
|
};
|
|
154
154
|
var Component = getComponent();
|
|
155
|
-
(0, _testUtils.expectComponent)(
|
|
155
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
156
156
|
});
|
|
157
157
|
it('when social connection is enabled and has initial screen signUp and has screen signUp', function () {
|
|
158
158
|
require('core/index').hasSomeConnections = function (m, connection) {
|
|
@@ -162,7 +162,7 @@ describe('LoginScreen', function () {
|
|
|
162
162
|
return screenName === 'signUp';
|
|
163
163
|
};
|
|
164
164
|
var Component = getComponent();
|
|
165
|
-
(0, _testUtils.expectComponent)(
|
|
165
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
166
166
|
});
|
|
167
167
|
});
|
|
168
168
|
describe('renders LoginPane', function () {
|
|
@@ -171,21 +171,21 @@ describe('LoginScreen', function () {
|
|
|
171
171
|
return true;
|
|
172
172
|
};
|
|
173
173
|
var Component = getComponent();
|
|
174
|
-
(0, _testUtils.expectComponent)(
|
|
174
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
175
175
|
});
|
|
176
176
|
it('when has database connection', function () {
|
|
177
177
|
require('core/index').hasSomeConnections = function (m, connection) {
|
|
178
178
|
return connection === 'database';
|
|
179
179
|
};
|
|
180
180
|
var Component = getComponent();
|
|
181
|
-
(0, _testUtils.expectComponent)(
|
|
181
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
182
182
|
});
|
|
183
183
|
it('when has enterprise connection', function () {
|
|
184
184
|
require('core/index').hasSomeConnections = function (m, connection) {
|
|
185
185
|
return connection === 'enterprise';
|
|
186
186
|
};
|
|
187
187
|
var Component = getComponent();
|
|
188
|
-
(0, _testUtils.expectComponent)(
|
|
188
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
189
189
|
});
|
|
190
190
|
});
|
|
191
191
|
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _react = _interopRequireDefault(require("react"));
|
|
4
4
|
var _enzyme = require("enzyme");
|
|
5
5
|
var _testUtils = require("testUtils");
|
|
6
|
-
function _interopRequireDefault(
|
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
7
|
jest.mock('connection/database/mfa_pane', function () {
|
|
8
8
|
return (0, _testUtils.mockComponent)('mfa_pane');
|
|
9
9
|
});
|
|
@@ -50,6 +50,6 @@ describe('MFALoginScreen', function () {
|
|
|
50
50
|
};
|
|
51
51
|
it('renders correctly', function () {
|
|
52
52
|
var Component = getComponent();
|
|
53
|
-
(0, _testUtils.expectComponent)(
|
|
53
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
54
54
|
});
|
|
55
55
|
});
|
|
@@ -4,8 +4,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
4
4
|
var _testUtils = require("testUtils");
|
|
5
5
|
var _testUtils2 = require("../../testUtils");
|
|
6
6
|
var _captcha = require("../../../connection/captcha");
|
|
7
|
-
function _interopRequireDefault(
|
|
8
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
9
9
|
jest.mock('field/email/email_pane', function () {
|
|
10
10
|
return (0, _testUtils.mockComponent)('email_pane');
|
|
11
11
|
});
|
|
@@ -85,11 +85,11 @@ describe('SignUpPane', function () {
|
|
|
85
85
|
};
|
|
86
86
|
it('renders only email by default', function () {
|
|
87
87
|
var Component = getComponent();
|
|
88
|
-
(0, _testUtils.expectComponent)(
|
|
88
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
89
89
|
});
|
|
90
90
|
it('shows header when instructions are available', function () {
|
|
91
91
|
var Component = getComponent();
|
|
92
|
-
(0, _testUtils.expectComponent)(
|
|
92
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, _extends({}, defaultProps, {
|
|
93
93
|
instructions: "instructions"
|
|
94
94
|
}))).toMatchSnapshot();
|
|
95
95
|
});
|
|
@@ -101,7 +101,7 @@ describe('SignUpPane', function () {
|
|
|
101
101
|
});
|
|
102
102
|
require('engine/classic').isSSOEnabled.mockReturnValue(false);
|
|
103
103
|
var Component = getComponent();
|
|
104
|
-
(0, _testUtils2.expectShallowComponent)(
|
|
104
|
+
(0, _testUtils2.expectShallowComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
105
105
|
});
|
|
106
106
|
it('hides the Captcha pane for SSO connections', function () {
|
|
107
107
|
require('core/index').signupCaptcha.mockReturnValue({
|
|
@@ -111,7 +111,7 @@ describe('SignUpPane', function () {
|
|
|
111
111
|
});
|
|
112
112
|
require('engine/classic').isSSOEnabled.mockReturnValue(true);
|
|
113
113
|
var Component = getComponent();
|
|
114
|
-
(0, _testUtils2.expectShallowComponent)(
|
|
114
|
+
(0, _testUtils2.expectShallowComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
115
115
|
});
|
|
116
116
|
it('shows the Captcha pane for SSO (ADFS) connections', function () {
|
|
117
117
|
require('core/index').signupCaptcha.mockReturnValue({
|
|
@@ -122,12 +122,12 @@ describe('SignUpPane', function () {
|
|
|
122
122
|
require('engine/classic').isSSOEnabled.mockReturnValue(true);
|
|
123
123
|
require('connection/enterprise').isHRDDomain.mockReturnValue(true);
|
|
124
124
|
var Component = getComponent();
|
|
125
|
-
(0, _testUtils2.expectShallowComponent)(
|
|
125
|
+
(0, _testUtils2.expectShallowComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
126
126
|
});
|
|
127
127
|
describe('onlyEmail is false', function () {
|
|
128
128
|
it('shows PasswordPane', function () {
|
|
129
129
|
var Component = getComponent();
|
|
130
|
-
(0, _testUtils.expectComponent)(
|
|
130
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, _extends({}, defaultProps, {
|
|
131
131
|
onlyEmail: false
|
|
132
132
|
}))).toMatchSnapshot();
|
|
133
133
|
});
|
|
@@ -144,7 +144,7 @@ describe('SignUpPane', function () {
|
|
|
144
144
|
}];
|
|
145
145
|
};
|
|
146
146
|
var Component = getComponent();
|
|
147
|
-
(0, _testUtils.expectComponent)(
|
|
147
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, _extends({}, defaultProps, {
|
|
148
148
|
onlyEmail: false
|
|
149
149
|
}))).toMatchSnapshot();
|
|
150
150
|
});
|
|
@@ -156,7 +156,7 @@ describe('SignUpPane', function () {
|
|
|
156
156
|
return false;
|
|
157
157
|
};
|
|
158
158
|
var Component = getComponent();
|
|
159
|
-
(0, _testUtils.expectComponent)(
|
|
159
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, _extends({}, defaultProps, {
|
|
160
160
|
onlyEmail: false
|
|
161
161
|
}))).toMatchSnapshot();
|
|
162
162
|
});
|
|
@@ -168,7 +168,7 @@ describe('SignUpPane', function () {
|
|
|
168
168
|
return true;
|
|
169
169
|
};
|
|
170
170
|
var Component = getComponent();
|
|
171
|
-
(0, _testUtils.expectComponent)(
|
|
171
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
172
172
|
});
|
|
173
173
|
});
|
|
174
174
|
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _react = _interopRequireDefault(require("react"));
|
|
4
4
|
var _enzyme = require("enzyme");
|
|
5
5
|
var _testUtils = require("testUtils");
|
|
6
|
-
function _interopRequireDefault(
|
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
7
|
jest.mock('engine/classic/sign_up_pane', function () {
|
|
8
8
|
return (0, _testUtils.mockComponent)('sign_up_pane');
|
|
9
9
|
});
|
|
@@ -141,14 +141,14 @@ describe('SignUpScreen', function () {
|
|
|
141
141
|
};
|
|
142
142
|
it('renders empty div by default', function () {
|
|
143
143
|
var Component = getComponent();
|
|
144
|
-
(0, _testUtils.expectComponent)(
|
|
144
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
145
145
|
});
|
|
146
146
|
it('renders SocialButtonsPane when has social connections', function () {
|
|
147
147
|
require('core/index').hasSomeConnections = function (m, connection) {
|
|
148
148
|
return connection === 'social';
|
|
149
149
|
};
|
|
150
150
|
var Component = getComponent();
|
|
151
|
-
(0, _testUtils.expectComponent)(
|
|
151
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
152
152
|
});
|
|
153
153
|
it('disables SocialButtonsPane when terms were not accepted', function () {
|
|
154
154
|
require('core/index').hasSomeConnections = function (m, connection) {
|
|
@@ -158,7 +158,7 @@ describe('SignUpScreen', function () {
|
|
|
158
158
|
return false;
|
|
159
159
|
};
|
|
160
160
|
var Component = getComponent();
|
|
161
|
-
(0, _testUtils.expectComponent)(
|
|
161
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
162
162
|
});
|
|
163
163
|
it('renders SingleSignOnNotice when SSO is enabled and has screen login', function () {
|
|
164
164
|
require('engine/classic').isSSOEnabled = function () {
|
|
@@ -168,14 +168,14 @@ describe('SignUpScreen', function () {
|
|
|
168
168
|
return screenName === 'login';
|
|
169
169
|
};
|
|
170
170
|
var Component = getComponent();
|
|
171
|
-
(0, _testUtils.expectComponent)(
|
|
171
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
172
172
|
});
|
|
173
173
|
it('renders LoginSignUpTabs SSO is disabled and has screen login', function () {
|
|
174
174
|
require('connection/database/index').hasScreen = function (m, screenName) {
|
|
175
175
|
return screenName === 'login';
|
|
176
176
|
};
|
|
177
177
|
var Component = getComponent();
|
|
178
|
-
(0, _testUtils.expectComponent)(
|
|
178
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
179
179
|
});
|
|
180
180
|
describe('renders SignUpPane', function () {
|
|
181
181
|
it('when has database connection', function () {
|
|
@@ -183,14 +183,14 @@ describe('SignUpScreen', function () {
|
|
|
183
183
|
return connection === 'database';
|
|
184
184
|
};
|
|
185
185
|
var Component = getComponent();
|
|
186
|
-
(0, _testUtils.expectComponent)(
|
|
186
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
187
187
|
});
|
|
188
188
|
it('when has enterprise connection', function () {
|
|
189
189
|
require('core/index').hasSomeConnections = function (m, connection) {
|
|
190
190
|
return connection === 'enterprise';
|
|
191
191
|
};
|
|
192
192
|
var Component = getComponent();
|
|
193
|
-
(0, _testUtils.expectComponent)(
|
|
193
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
194
194
|
});
|
|
195
195
|
});
|
|
196
196
|
describe('on Submit, uses `options.emailFirst=true` and', function () {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
-
function _defineProperty(
|
|
6
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
7
7
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
8
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
9
|
var getClassic = function getClassic() {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _react = _interopRequireDefault(require("react"));
|
|
4
4
|
var _testUtils = require("testUtils");
|
|
5
|
-
function _interopRequireDefault(
|
|
5
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
6
6
|
jest.mock('connection/enterprise');
|
|
7
7
|
jest.mock('core/index');
|
|
8
8
|
jest.mock('field/social/social_buttons_pane', function () {
|
|
@@ -91,7 +91,7 @@ describe('email passwordless', function () {
|
|
|
91
91
|
};
|
|
92
92
|
it('renders correctly', function () {
|
|
93
93
|
var Component = getComponent();
|
|
94
|
-
(0, _testUtils.expectComponent)(
|
|
94
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
95
95
|
});
|
|
96
96
|
it('renders a captcha', function () {
|
|
97
97
|
var Component = getComponent();
|
|
@@ -100,6 +100,6 @@ describe('email passwordless', function () {
|
|
|
100
100
|
return true;
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
|
-
(0, _testUtils.expectComponent)(
|
|
103
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
104
104
|
});
|
|
105
105
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _react = _interopRequireDefault(require("react"));
|
|
4
4
|
var _testUtils = require("testUtils");
|
|
5
|
-
function _interopRequireDefault(
|
|
5
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
6
6
|
jest.mock('connection/enterprise');
|
|
7
7
|
jest.mock('core/index');
|
|
8
8
|
jest.mock('field/social/social_buttons_pane', function () {
|
|
@@ -91,7 +91,7 @@ describe('sms passwordless', function () {
|
|
|
91
91
|
};
|
|
92
92
|
it('renders correctly', function () {
|
|
93
93
|
var Component = getComponent();
|
|
94
|
-
(0, _testUtils.expectComponent)(
|
|
94
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
95
95
|
});
|
|
96
96
|
it('renders a captcha', function () {
|
|
97
97
|
var Component = getComponent();
|
|
@@ -100,6 +100,6 @@ describe('sms passwordless', function () {
|
|
|
100
100
|
return true;
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
|
-
(0, _testUtils.expectComponent)(
|
|
103
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, defaultProps)).toMatchSnapshot();
|
|
104
104
|
});
|
|
105
105
|
});
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
var _react = _interopRequireDefault(require("react"));
|
|
4
4
|
var _testUtils = require("testUtils");
|
|
5
5
|
var _third_party_captcha = require("../../../field/captcha/third_party_captcha");
|
|
6
|
-
function _interopRequireDefault(
|
|
7
|
-
function _toConsumableArray(
|
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
8
8
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _unsupportedIterableToArray(
|
|
10
|
-
function _iterableToArray(
|
|
11
|
-
function _arrayWithoutHoles(
|
|
12
|
-
function _arrayLikeToArray(
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
11
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
13
|
describe('Arkose', function () {
|
|
14
14
|
var component = /*#__PURE__*/_react.default.createElement(_third_party_captcha.ThirdPartyCaptcha, {
|
|
15
15
|
provider: 'arkose',
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
var _react = _interopRequireDefault(require("react"));
|
|
4
4
|
var _testUtils = require("testUtils");
|
|
5
5
|
var _third_party_captcha = require("../../../field/captcha/third_party_captcha");
|
|
6
|
-
function _interopRequireDefault(
|
|
7
|
-
function _toConsumableArray(
|
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
8
8
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _unsupportedIterableToArray(
|
|
10
|
-
function _iterableToArray(
|
|
11
|
-
function _arrayWithoutHoles(
|
|
12
|
-
function _arrayLikeToArray(
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
11
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
13
|
describe('Auth0 V2', function () {
|
|
14
14
|
var component = /*#__PURE__*/_react.default.createElement(_third_party_captcha.ThirdPartyCaptcha, {
|
|
15
15
|
provider: 'auth0_v2',
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
var _react = _interopRequireDefault(require("react"));
|
|
4
4
|
var _testUtils = require("testUtils");
|
|
5
5
|
var _third_party_captcha = require("../../../field/captcha/third_party_captcha");
|
|
6
|
-
function _interopRequireDefault(
|
|
7
|
-
function _toConsumableArray(
|
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
8
8
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _unsupportedIterableToArray(
|
|
10
|
-
function _iterableToArray(
|
|
11
|
-
function _arrayWithoutHoles(
|
|
12
|
-
function _arrayLikeToArray(
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
11
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
13
|
describe('friendly captcha', function () {
|
|
14
14
|
var wrapper = /*#__PURE__*/_react.default.createElement(_third_party_captcha.ThirdPartyCaptcha, {
|
|
15
15
|
provider: 'friendly_captcha',
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
var _react = _interopRequireDefault(require("react"));
|
|
4
4
|
var _testUtils = require("testUtils");
|
|
5
5
|
var _third_party_captcha = require("../../../field/captcha/third_party_captcha");
|
|
6
|
-
function _interopRequireDefault(
|
|
7
|
-
function _toConsumableArray(
|
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
8
8
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _unsupportedIterableToArray(
|
|
10
|
-
function _iterableToArray(
|
|
11
|
-
function _arrayWithoutHoles(
|
|
12
|
-
function _arrayLikeToArray(
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
11
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
13
|
describe('hCaptcha', function () {
|
|
14
14
|
var component = /*#__PURE__*/_react.default.createElement(_third_party_captcha.ThirdPartyCaptcha, {
|
|
15
15
|
provider: 'hcaptcha',
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
var _react = _interopRequireDefault(require("react"));
|
|
4
4
|
var _testUtils = require("testUtils");
|
|
5
5
|
var _third_party_captcha = require("../../../field/captcha/third_party_captcha");
|
|
6
|
-
function _interopRequireDefault(
|
|
7
|
-
function _toConsumableArray(
|
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
8
8
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _unsupportedIterableToArray(
|
|
10
|
-
function _iterableToArray(
|
|
11
|
-
function _arrayWithoutHoles(
|
|
12
|
-
function _arrayLikeToArray(
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
11
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
13
|
describe('Recaptcha Enterprise', function () {
|
|
14
14
|
var component = /*#__PURE__*/_react.default.createElement(_third_party_captcha.ThirdPartyCaptcha, {
|
|
15
15
|
provider: 'recaptcha_enterprise',
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
var _react = _interopRequireDefault(require("react"));
|
|
4
4
|
var _testUtils = require("testUtils");
|
|
5
5
|
var _third_party_captcha = require("../../../field/captcha/third_party_captcha");
|
|
6
|
-
function _interopRequireDefault(
|
|
7
|
-
function _toConsumableArray(
|
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
8
8
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _unsupportedIterableToArray(
|
|
10
|
-
function _iterableToArray(
|
|
11
|
-
function _arrayWithoutHoles(
|
|
12
|
-
function _arrayLikeToArray(
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
11
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
13
|
describe('Recaptcha v2', function () {
|
|
14
14
|
var component = /*#__PURE__*/_react.default.createElement(_third_party_captcha.ThirdPartyCaptcha, {
|
|
15
15
|
provider: 'recaptcha_v2',
|
|
@@ -7,15 +7,14 @@ var _testUtils = require("react-dom/test-utils");
|
|
|
7
7
|
var _immutable = _interopRequireDefault(require("immutable"));
|
|
8
8
|
var l = _interopRequireWildcard(require("../../../core/index"));
|
|
9
9
|
var _third_party_captcha = require("../../../field/captcha/third_party_captcha");
|
|
10
|
-
function
|
|
11
|
-
function
|
|
12
|
-
function
|
|
13
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
10
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
14
13
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
-
function _unsupportedIterableToArray(
|
|
16
|
-
function _iterableToArray(
|
|
17
|
-
function _arrayWithoutHoles(
|
|
18
|
-
function _arrayLikeToArray(
|
|
14
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
15
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
16
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
17
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
19
18
|
var createLockMock = function createLockMock() {
|
|
20
19
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
21
20
|
_ref$provider = _ref.provider,
|
|
@@ -78,7 +77,7 @@ describe('ThirdPartyCaptcha', function () {
|
|
|
78
77
|
siteKey: 'mySiteKey'
|
|
79
78
|
});
|
|
80
79
|
var captcha = l.captcha(lockMock);
|
|
81
|
-
wrapper = (0, _enzyme.mount)(
|
|
80
|
+
wrapper = (0, _enzyme.mount)(/*#__PURE__*/_react.default.createElement(_third_party_captcha.ThirdPartyCaptcha, {
|
|
82
81
|
provider: captcha.get('provider'),
|
|
83
82
|
sitekey: captcha.get('siteKey'),
|
|
84
83
|
clientSubdomain: captcha.get('clientSubdomain'),
|
|
@@ -110,7 +109,7 @@ describe('ThirdPartyCaptcha', function () {
|
|
|
110
109
|
siteKey: 'mySiteKey'
|
|
111
110
|
});
|
|
112
111
|
var captcha = l.captcha(lockMock);
|
|
113
|
-
wrapper = (0, _enzyme.mount)(
|
|
112
|
+
wrapper = (0, _enzyme.mount)(/*#__PURE__*/_react.default.createElement(_third_party_captcha.ThirdPartyCaptcha, {
|
|
114
113
|
provider: captcha.get('provider'),
|
|
115
114
|
sitekey: captcha.get('siteKey'),
|
|
116
115
|
clientSubdomain: captcha.get('clientSubdomain'),
|
|
@@ -143,7 +142,7 @@ describe('ThirdPartyCaptcha', function () {
|
|
|
143
142
|
siteKey: 'mySiteKey'
|
|
144
143
|
});
|
|
145
144
|
var captcha = l.captcha(lockMock);
|
|
146
|
-
wrapper = (0, _enzyme.mount)(
|
|
145
|
+
wrapper = (0, _enzyme.mount)(/*#__PURE__*/_react.default.createElement(_third_party_captcha.ThirdPartyCaptcha, {
|
|
147
146
|
provider: captcha.get('provider'),
|
|
148
147
|
sitekey: captcha.get('siteKey'),
|
|
149
148
|
clientSubdomain: captcha.get('clientSubdomain'),
|
|
@@ -184,7 +183,7 @@ describe('ThirdPartyCaptcha', function () {
|
|
|
184
183
|
siteKey: 'mySiteKey'
|
|
185
184
|
});
|
|
186
185
|
var captcha = l.captcha(lockMock);
|
|
187
|
-
wrapper = (0, _enzyme.mount)(
|
|
186
|
+
wrapper = (0, _enzyme.mount)(/*#__PURE__*/_react.default.createElement(_third_party_captcha.ThirdPartyCaptcha, {
|
|
188
187
|
provider: captcha.get('provider'),
|
|
189
188
|
sitekey: captcha.get('siteKey'),
|
|
190
189
|
clientSubdomain: captcha.get('clientSubdomain'),
|
|
@@ -243,7 +242,7 @@ describe('ThirdPartyCaptcha', function () {
|
|
|
243
242
|
siteKey: 'mySiteKey'
|
|
244
243
|
});
|
|
245
244
|
var captcha = l.captcha(lockMock);
|
|
246
|
-
wrapper = (0, _enzyme.mount)(
|
|
245
|
+
wrapper = (0, _enzyme.mount)(/*#__PURE__*/_react.default.createElement(_third_party_captcha.ThirdPartyCaptcha, {
|
|
247
246
|
provider: captcha.get('provider'),
|
|
248
247
|
sitekey: captcha.get('siteKey'),
|
|
249
248
|
clientSubdomain: captcha.get('clientSubdomain'),
|