auth0-lock 13.2.0 → 14.1.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 +37 -10
- 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 +1 -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 +10 -11
- 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 +15 -12
- package/.github/workflows/semgrep.yml +0 -40
|
@@ -19,7 +19,6 @@ concurrency:
|
|
|
19
19
|
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
|
20
20
|
|
|
21
21
|
jobs:
|
|
22
|
-
|
|
23
22
|
run:
|
|
24
23
|
name: Build Package
|
|
25
24
|
runs-on: ubuntu-latest
|
|
@@ -52,7 +51,9 @@ jobs:
|
|
|
52
51
|
run: npm run test
|
|
53
52
|
|
|
54
53
|
- name: Run Karma end-to-end tests
|
|
54
|
+
env:
|
|
55
|
+
CI: true
|
|
55
56
|
run: npm run test:e2e
|
|
56
57
|
|
|
57
58
|
- name: Upload coverage
|
|
58
|
-
uses: codecov/codecov-action@
|
|
59
|
+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # pin@5.5.1
|
package/.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
v14.1.0
|
package/CHANGELOG.md
CHANGED
|
@@ -1,20 +1,47 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## [
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
-
|
|
3
|
+
## [v14.1.0](https://github.com/auth0/lock/tree/v14.1.0) (2025-09-12)
|
|
4
|
+
[Full Changelog](https://github.com/auth0/lock/compare/v14.0.0...v14.1.0)
|
|
5
|
+
|
|
6
|
+
**Changed**
|
|
7
|
+
- chore(deps-dev): Bump karma from 6.4.3 to 6.4.4 [\#2668](https://github.com/auth0/lock/pull/2668) ([dependabot[bot]](https://github.com/apps/dependabot))
|
|
8
|
+
- chore(deps): Bump pbkdf2 from 3.1.2 to 3.1.3 [\#2633](https://github.com/auth0/lock/pull/2633) ([dependabot[bot]](https://github.com/apps/dependabot))
|
|
9
|
+
- chore(deps): Bump validator from 13.15.0 to 13.15.15 [\#2620](https://github.com/auth0/lock/pull/2620) ([dependabot[bot]](https://github.com/apps/dependabot))
|
|
10
|
+
- chore(deps): Bump sha.js from 2.4.11 to 2.4.12 [\#2661](https://github.com/auth0/lock/pull/2661) ([dependabot[bot]](https://github.com/apps/dependabot))
|
|
11
|
+
- chore(deps): Bump cipher-base from 1.0.4 to 1.0.6 [\#2662](https://github.com/auth0/lock/pull/2662) ([dependabot[bot]](https://github.com/apps/dependabot))
|
|
12
|
+
- chore(deps): Bump codecov/codecov-action from 5.4.3 to 5.5.1 [\#2666](https://github.com/auth0/lock/pull/2666) ([dependabot[bot]](https://github.com/apps/dependabot))
|
|
13
|
+
- chore(deps-dev): Bump puppeteer from 24.9.0 to 24.19.0 [\#2667](https://github.com/auth0/lock/pull/2667) ([dependabot[bot]](https://github.com/apps/dependabot))
|
|
14
|
+
- chore(deps-dev): Bump tmp from 0.2.3 to 0.2.5 [\#2656](https://github.com/auth0/lock/pull/2656) ([dependabot[bot]](https://github.com/apps/dependabot))
|
|
15
|
+
- security: bump fsevents to latest(SEC- 2161) [\#2643](https://github.com/auth0/lock/pull/2643) ([katesaikishore](https://github.com/katesaikishore))
|
|
16
|
+
- chore(deps-dev): Bump eslint-plugin-react from 7.34.1 to 7.37.5 [\#2617](https://github.com/auth0/lock/pull/2617) ([dependabot[bot]](https://github.com/apps/dependabot))
|
|
17
|
+
- chore(deps): Bump @grpc/grpc-js and @google-cloud/translate [\#2565](https://github.com/auth0/lock/pull/2565) ([dependabot[bot]](https://github.com/apps/dependabot))
|
|
18
|
+
|
|
19
|
+
**Fixed**
|
|
20
|
+
- Fix: social connection names not showing displayName correctly [\#2651](https://github.com/auth0/lock/pull/2651) ([omarquazi-okta](https://github.com/omarquazi-okta))
|
|
21
|
+
- Update old Twitter icon and name to "X" [\#2649](https://github.com/auth0/lock/pull/2649) ([omarquazi-okta](https://github.com/omarquazi-okta))
|
|
22
|
+
- Fix issue 2546 - TypeError: Super expression must either be null or a function [\#2578](https://github.com/auth0/lock/pull/2578) ([Hworden](https://github.com/Hworden))
|
|
23
|
+
- Fix: Accessibility Issues #2624 [\#2642](https://github.com/auth0/lock/pull/2642) ([ankita10119](https://github.com/ankita10119))
|
|
24
|
+
- fix: Rename shop strategy [\#2641](https://github.com/auth0/lock/pull/2641) ([omarquazi-okta](https://github.com/omarquazi-okta))
|
|
25
|
+
- Fix release pipeline cdn [\#2628](https://github.com/auth0/lock/pull/2628) ([developerkunal](https://github.com/developerkunal))
|
|
26
|
+
- Fix Release PIPELINE [\#2627](https://github.com/auth0/lock/pull/2627) ([developerkunal](https://github.com/developerkunal))
|
|
27
|
+
- chore: update .gitignore and Makefile for Puppeteer cache and config directories [\#2626](https://github.com/auth0/lock/pull/2626) ([developerkunal](https://github.com/developerkunal))
|
|
28
|
+
- Fix Makefile for Puppeteer cache support [\#2625](https://github.com/auth0/lock/pull/2625) ([developerkunal](https://github.com/developerkunal))
|
|
29
|
+
|
|
30
|
+
**Removed**
|
|
31
|
+
- chore(ci): Remove Semgrep GHA Workflow [\#2650](https://github.com/auth0/lock/pull/2650) ([eduardoboronat-okta](https://github.com/eduardoboronat-okta))
|
|
32
|
+
|
|
33
|
+
**Security**
|
|
11
34
|
- security: Remove vulnerable node-es-module-loader dependency (SEC-2160) [\#2629](https://github.com/auth0/lock/pull/2629) ([harekrishnarai](https://github.com/harekrishnarai))
|
|
12
35
|
|
|
13
|
-
## [
|
|
36
|
+
## [v14.0.0](https://github.com/auth0/lock/tree/v14.0.0) (2025-06-02)
|
|
37
|
+
[Full Changelog](https://github.com/auth0/lock/compare/v13.0.0...v14.0.0)
|
|
38
|
+
|
|
39
|
+
**⚠️ BREAKING CHANGES**
|
|
40
|
+
- Dropped support for Internet Explorer (IE).
|
|
41
|
+
- Update dependencies and refactor DOMPurify usage to default import [\#2606](https://github.com/auth0/lock/pull/2606) ([developerkunal](https://github.com/developerkunal))
|
|
14
42
|
|
|
15
43
|
**Added**
|
|
16
44
|
- Add support for social connection Sign in with Shop [\#2602](https://github.com/auth0/lock/pull/2602) ([reinisb](https://github.com/reinisb))
|
|
17
|
-
- fix: Rename shop strategy [\#2641](https://github.com/auth0/lock/pull/2641) ([omarquazi-okta](https://github.com/omarquazi-okta))
|
|
18
45
|
|
|
19
46
|
## [v13.0.0](https://github.com/auth0/lock/tree/v13.0.0) (2024-11-11)
|
|
20
47
|
[Full Changelog](https://github.com/auth0/lock/compare/v12.5.1...v13.0.0)
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
### Browser Compatibility
|
|
18
18
|
|
|
19
|
-
We ensure browser compatibility in Chrome, Safari, Firefox
|
|
19
|
+
We ensure browser compatibility in Chrome, Safari, Firefox.
|
|
20
20
|
|
|
21
21
|
### Installation
|
|
22
22
|
|
|
@@ -30,7 +30,7 @@ From CDN
|
|
|
30
30
|
|
|
31
31
|
```html
|
|
32
32
|
<!-- Latest patch release (recommended for production) -->
|
|
33
|
-
<script src="https://cdn.auth0.com/js/lock/
|
|
33
|
+
<script src="https://cdn.auth0.com/js/lock/14.1.0/lock.min.js"></script>
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
### Configure Auth0
|
package/karma.conf.js
CHANGED
|
@@ -115,9 +115,13 @@ module.exports = function (config) {
|
|
|
115
115
|
chrome_headless: {
|
|
116
116
|
base: 'Chrome',
|
|
117
117
|
flags: ['--headless']
|
|
118
|
+
},
|
|
119
|
+
ChromeHeadlessNoSandbox: {
|
|
120
|
+
base: 'ChromeHeadless',
|
|
121
|
+
flags: ['--no-sandbox']
|
|
118
122
|
}
|
|
119
123
|
},
|
|
120
124
|
|
|
121
|
-
browsers: ['
|
|
125
|
+
browsers: [process.env.CI ? 'ChromeHeadlessNoSandbox' : 'ChromeHeadless']
|
|
122
126
|
});
|
|
123
127
|
};
|
|
@@ -4,8 +4,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
4
4
|
var _enzyme = require("enzyme");
|
|
5
5
|
var _testUtils = require("testUtils");
|
|
6
6
|
var _auth_button = _interopRequireDefault(require("ui/button/auth_button"));
|
|
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
|
describe('AuthButton', function () {
|
|
10
10
|
var defaultProps = {
|
|
11
11
|
label: 'label',
|
|
@@ -13,17 +13,17 @@ describe('AuthButton', function () {
|
|
|
13
13
|
strategy: 'strategy'
|
|
14
14
|
};
|
|
15
15
|
it('renders correctly', function () {
|
|
16
|
-
(0, _testUtils.expectComponent)(
|
|
16
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(_auth_button.default, defaultProps)).toMatchSnapshot();
|
|
17
17
|
});
|
|
18
18
|
it('renders with style customizations', function () {
|
|
19
|
-
(0, _testUtils.expectComponent)(
|
|
19
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(_auth_button.default, _extends({}, defaultProps, {
|
|
20
20
|
icon: "test",
|
|
21
21
|
primaryColor: "primaryColor",
|
|
22
22
|
foregroundColor: "foregroundColor"
|
|
23
23
|
}))).toMatchSnapshot();
|
|
24
24
|
});
|
|
25
25
|
it('should trigger onClick when clicked', function () {
|
|
26
|
-
var wrapper = (0, _enzyme.mount)(
|
|
26
|
+
var wrapper = (0, _enzyme.mount)(/*#__PURE__*/_react.default.createElement(_auth_button.default, defaultProps));
|
|
27
27
|
wrapper.find('a').simulate('click');
|
|
28
28
|
expect(defaultProps.onClick.mock.calls.length).toBe(1);
|
|
29
29
|
});
|
|
@@ -4,12 +4,11 @@ var _immutable = _interopRequireWildcard(require("immutable"));
|
|
|
4
4
|
var _actions = require("../../../connection/database/actions");
|
|
5
5
|
var _store = require("../../../store");
|
|
6
6
|
var _captcha = require("../../../connection/captcha");
|
|
7
|
-
function
|
|
8
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
7
|
+
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); }
|
|
9
8
|
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); }
|
|
10
9
|
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; }
|
|
11
10
|
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; }
|
|
12
|
-
function _defineProperty(
|
|
11
|
+
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; }
|
|
13
12
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
13
|
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); }
|
|
15
14
|
var webApiMock = function webApiMock() {
|
|
@@ -3,8 +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
|
var _immutable = _interopRequireWildcard(require("immutable"));
|
|
5
5
|
var _database = require("../../../connection/database");
|
|
6
|
-
function
|
|
7
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
6
|
+
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); }
|
|
8
7
|
describe('database/index.js', function () {
|
|
9
8
|
describe('databaseUsernameValue', function () {
|
|
10
9
|
var getModel = function getModel(email, username, usernameRequired) {
|
|
@@ -5,10 +5,10 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
5
5
|
var _immutable = _interopRequireDefault(require("immutable"));
|
|
6
6
|
var _testUtils = require("testUtils");
|
|
7
7
|
var _login_pane = _interopRequireDefault(require("../../../connection/database/login_pane"));
|
|
8
|
-
function _interopRequireDefault(
|
|
9
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/
|
|
10
|
-
function asyncGeneratorStep(
|
|
11
|
-
function _asyncToGenerator(
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return r; }; var t, r = {}, e = Object.prototype, n = e.hasOwnProperty, o = "function" == typeof Symbol ? Symbol : {}, i = o.iterator || "@@iterator", a = o.asyncIterator || "@@asyncIterator", u = o.toStringTag || "@@toStringTag"; function c(t, r, e, n) { Object.defineProperty(t, r, { value: e, enumerable: !n, configurable: !n, writable: !n }); } try { c({}, ""); } catch (t) { c = function c(t, r, e) { return t[r] = e; }; } function h(r, e, n, o) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype); return c(a, "_invoke", function (r, e, n) { var o = 1; return function (i, a) { if (3 === o) throw Error("Generator is already running"); if (4 === o) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var u = n.delegate; if (u) { var c = d(u, n); if (c) { if (c === f) continue; return c; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (1 === o) throw o = 4, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = 3; var h = s(r, e, n); if ("normal" === h.type) { if (o = n.done ? 4 : 2, h.arg === f) continue; return { value: h.arg, done: n.done }; } "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg); } }; }(r, n, new Context(o || [])), !0), a; } function s(t, r, e) { try { return { type: "normal", arg: t.call(r, e) }; } catch (t) { return { type: "throw", arg: t }; } } r.wrap = h; var f = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var l = {}; c(l, i, function () { return this; }); var p = Object.getPrototypeOf, y = p && p(p(x([]))); y && y !== e && n.call(y, i) && (l = y); var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l); function g(t) { ["next", "throw", "return"].forEach(function (r) { c(t, r, function (t) { return this._invoke(r, t); }); }); } function AsyncIterator(t, r) { function e(o, i, a, u) { var c = s(t[o], t, i); if ("throw" !== c.type) { var h = c.arg, f = h.value; return f && "object" == _typeof(f) && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) { e("next", t, a, u); }, function (t) { e("throw", t, a, u); }) : r.resolve(f).then(function (t) { h.value = t, a(h); }, function (t) { return e("throw", t, a, u); }); } u(c.arg); } var o; c(this, "_invoke", function (t, n) { function i() { return new r(function (r, o) { e(t, n, r, o); }); } return o = o ? o.then(i, i) : i(); }, !0); } function d(r, e) { var n = e.method, o = r.i[n]; if (o === t) return e.delegate = null, "throw" === n && r.i.return && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f; var i = s(o, r.i, e.arg); if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f; var a = i.arg; return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f); } function w(t) { this.tryEntries.push(t); } function m(r) { var e = r[4] || {}; e.type = "normal", e.arg = t, r[4] = e; } function Context(t) { this.tryEntries = [[-1]], t.forEach(w, this), this.reset(!0); } function x(r) { if (null != r) { var e = r[i]; if (e) return e.call(r); if ("function" == typeof r.next) return r; if (!isNaN(r.length)) { var o = -1, a = function e() { for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e; return e.value = t, e.done = !0, e; }; return a.next = a; } } throw new TypeError(_typeof(r) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), c(GeneratorFunctionPrototype, u, GeneratorFunction.displayName = "GeneratorFunction"), r.isGeneratorFunction = function (t) { var r = "function" == typeof t && t.constructor; return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name)); }, r.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t; }, r.awrap = function (t) { return { __await: t }; }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () { return this; }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(h(t, e, n, o), i); return r.isGeneratorFunction(e) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, g(v), c(v, u, "Generator"), c(v, i, function () { return this; }), c(v, "toString", function () { return "[object Generator]"; }), r.keys = function (t) { var r = Object(t), e = []; for (var n in r) e.unshift(n); return function t() { for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t; return t.done = !0, t; }; }, r.values = x, Context.prototype = { constructor: Context, reset: function reset(r) { if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0][4]; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(r) { if (this.done) throw r; var e = this; function n(t) { a.type = "throw", a.arg = r, e.next = t; } for (var o = e.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i[4], u = this.prev, c = i[1], h = i[2]; if (-1 === i[0]) return n("end"), !1; if (!c && !h) throw Error("try statement without catch or finally"); if (null != i[0] && i[0] <= u) { if (u < c) return this.method = "next", this.arg = t, n(c), !0; if (u < h) return n(h), !1; } } }, abrupt: function abrupt(t, r) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var n = this.tryEntries[e]; if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) { var o = n; break; } } o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null); var i = o ? o[4] : {}; return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i); }, complete: function complete(t, r) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f; }, finish: function finish(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[2] === t) return this.complete(e[4], e[3]), m(e), f; } }, catch: function _catch(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[0] === t) { var n = e[4]; if ("throw" === n.type) { var o = n.arg; m(e); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(r, e, n) { return this.delegate = { i: x(r), r: e, n: n }, "next" === this.method && (this.arg = t), f; } }, r; }
|
|
10
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
11
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
12
12
|
var lock = _immutable.default.fromJS({
|
|
13
13
|
id: '__lock-id__'
|
|
14
14
|
});
|
|
@@ -29,11 +29,11 @@ describe('LoginPane', function () {
|
|
|
29
29
|
beforeEach(function () {
|
|
30
30
|
jest.resetAllMocks();
|
|
31
31
|
});
|
|
32
|
-
it('renders correctly', /*#__PURE__*/_asyncToGenerator(
|
|
32
|
+
it('renders correctly', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
33
33
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
34
34
|
while (1) switch (_context.prev = _context.next) {
|
|
35
35
|
case 0:
|
|
36
|
-
(0, _testUtils.expectShallowComponent)(
|
|
36
|
+
(0, _testUtils.expectShallowComponent)(/*#__PURE__*/_react.default.createElement(_login_pane.default, defaultProps)).toMatchSnapshot();
|
|
37
37
|
case 1:
|
|
38
38
|
case "end":
|
|
39
39
|
return _context.stop();
|
|
@@ -46,7 +46,7 @@ describe('LoginPane', function () {
|
|
|
46
46
|
return true;
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
|
-
(0, _testUtils.expectShallowComponent)(
|
|
49
|
+
(0, _testUtils.expectShallowComponent)(/*#__PURE__*/_react.default.createElement(_login_pane.default, defaultProps)).toMatchSnapshot();
|
|
50
50
|
});
|
|
51
51
|
it('hides the captcha for SSO connections', function () {
|
|
52
52
|
require('core/index').captcha.mockReturnValue({
|
|
@@ -55,7 +55,7 @@ describe('LoginPane', function () {
|
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
require('engine/classic').isSSOEnabled.mockReturnValue(true);
|
|
58
|
-
(0, _testUtils.expectShallowComponent)(
|
|
58
|
+
(0, _testUtils.expectShallowComponent)(/*#__PURE__*/_react.default.createElement(_login_pane.default, defaultProps)).toMatchSnapshot();
|
|
59
59
|
});
|
|
60
60
|
it('shows the captcha for SSO (ADFS) connections', function () {
|
|
61
61
|
require('core/index').captcha.mockReturnValue({
|
|
@@ -65,6 +65,6 @@ describe('LoginPane', function () {
|
|
|
65
65
|
});
|
|
66
66
|
require('engine/classic').isSSOEnabled.mockReturnValue(true);
|
|
67
67
|
require('connection/enterprise').isHRDDomain.mockReturnValue(true);
|
|
68
|
-
(0, _testUtils.expectShallowComponent)(
|
|
68
|
+
(0, _testUtils.expectShallowComponent)(/*#__PURE__*/_react.default.createElement(_login_pane.default, defaultProps)).toMatchSnapshot();
|
|
69
69
|
});
|
|
70
70
|
});
|
|
@@ -5,19 +5,19 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
5
5
|
var _immutable = _interopRequireDefault(require("immutable"));
|
|
6
6
|
var _testUtils = require("testUtils");
|
|
7
7
|
var _password_reset_confirmation = _interopRequireDefault(require("../../../connection/database/password_reset_confirmation"));
|
|
8
|
-
function _interopRequireDefault(
|
|
9
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/
|
|
10
|
-
function asyncGeneratorStep(
|
|
11
|
-
function _asyncToGenerator(
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return r; }; var t, r = {}, e = Object.prototype, n = e.hasOwnProperty, o = "function" == typeof Symbol ? Symbol : {}, i = o.iterator || "@@iterator", a = o.asyncIterator || "@@asyncIterator", u = o.toStringTag || "@@toStringTag"; function c(t, r, e, n) { Object.defineProperty(t, r, { value: e, enumerable: !n, configurable: !n, writable: !n }); } try { c({}, ""); } catch (t) { c = function c(t, r, e) { return t[r] = e; }; } function h(r, e, n, o) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype); return c(a, "_invoke", function (r, e, n) { var o = 1; return function (i, a) { if (3 === o) throw Error("Generator is already running"); if (4 === o) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var u = n.delegate; if (u) { var c = d(u, n); if (c) { if (c === f) continue; return c; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (1 === o) throw o = 4, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = 3; var h = s(r, e, n); if ("normal" === h.type) { if (o = n.done ? 4 : 2, h.arg === f) continue; return { value: h.arg, done: n.done }; } "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg); } }; }(r, n, new Context(o || [])), !0), a; } function s(t, r, e) { try { return { type: "normal", arg: t.call(r, e) }; } catch (t) { return { type: "throw", arg: t }; } } r.wrap = h; var f = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var l = {}; c(l, i, function () { return this; }); var p = Object.getPrototypeOf, y = p && p(p(x([]))); y && y !== e && n.call(y, i) && (l = y); var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l); function g(t) { ["next", "throw", "return"].forEach(function (r) { c(t, r, function (t) { return this._invoke(r, t); }); }); } function AsyncIterator(t, r) { function e(o, i, a, u) { var c = s(t[o], t, i); if ("throw" !== c.type) { var h = c.arg, f = h.value; return f && "object" == _typeof(f) && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) { e("next", t, a, u); }, function (t) { e("throw", t, a, u); }) : r.resolve(f).then(function (t) { h.value = t, a(h); }, function (t) { return e("throw", t, a, u); }); } u(c.arg); } var o; c(this, "_invoke", function (t, n) { function i() { return new r(function (r, o) { e(t, n, r, o); }); } return o = o ? o.then(i, i) : i(); }, !0); } function d(r, e) { var n = e.method, o = r.i[n]; if (o === t) return e.delegate = null, "throw" === n && r.i.return && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f; var i = s(o, r.i, e.arg); if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f; var a = i.arg; return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f); } function w(t) { this.tryEntries.push(t); } function m(r) { var e = r[4] || {}; e.type = "normal", e.arg = t, r[4] = e; } function Context(t) { this.tryEntries = [[-1]], t.forEach(w, this), this.reset(!0); } function x(r) { if (null != r) { var e = r[i]; if (e) return e.call(r); if ("function" == typeof r.next) return r; if (!isNaN(r.length)) { var o = -1, a = function e() { for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e; return e.value = t, e.done = !0, e; }; return a.next = a; } } throw new TypeError(_typeof(r) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), c(GeneratorFunctionPrototype, u, GeneratorFunction.displayName = "GeneratorFunction"), r.isGeneratorFunction = function (t) { var r = "function" == typeof t && t.constructor; return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name)); }, r.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t; }, r.awrap = function (t) { return { __await: t }; }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () { return this; }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(h(t, e, n, o), i); return r.isGeneratorFunction(e) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, g(v), c(v, u, "Generator"), c(v, i, function () { return this; }), c(v, "toString", function () { return "[object Generator]"; }), r.keys = function (t) { var r = Object(t), e = []; for (var n in r) e.unshift(n); return function t() { for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t; return t.done = !0, t; }; }, r.values = x, Context.prototype = { constructor: Context, reset: function reset(r) { if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0][4]; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(r) { if (this.done) throw r; var e = this; function n(t) { a.type = "throw", a.arg = r, e.next = t; } for (var o = e.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i[4], u = this.prev, c = i[1], h = i[2]; if (-1 === i[0]) return n("end"), !1; if (!c && !h) throw Error("try statement without catch or finally"); if (null != i[0] && i[0] <= u) { if (u < c) return this.method = "next", this.arg = t, n(c), !0; if (u < h) return n(h), !1; } } }, abrupt: function abrupt(t, r) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var n = this.tryEntries[e]; if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) { var o = n; break; } } o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null); var i = o ? o[4] : {}; return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i); }, complete: function complete(t, r) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f; }, finish: function finish(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[2] === t) return this.complete(e[4], e[3]), m(e), f; } }, catch: function _catch(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[0] === t) { var n = e[4]; if ("throw" === n.type) { var o = n.arg; m(e); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(r, e, n) { return this.delegate = { i: x(r), r: e, n: n }, "next" === this.method && (this.arg = t), f; } }, r; }
|
|
10
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
11
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
12
12
|
var lock = _immutable.default.fromJS({
|
|
13
13
|
id: '__lock-id__'
|
|
14
14
|
});
|
|
15
15
|
describe('PasswordResetConfirmation', function () {
|
|
16
|
-
it('renders correctly', /*#__PURE__*/_asyncToGenerator(
|
|
16
|
+
it('renders correctly', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
17
17
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18
18
|
while (1) switch (_context.prev = _context.next) {
|
|
19
19
|
case 0:
|
|
20
|
-
(0, _testUtils.expectComponent)(
|
|
20
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(_password_reset_confirmation.default, {
|
|
21
21
|
lock: lock
|
|
22
22
|
})).toMatchSnapshot();
|
|
23
23
|
case 1:
|
|
@@ -4,7 +4,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
4
4
|
var _testUtils = require("testUtils");
|
|
5
5
|
var _immutable = _interopRequireDefault(require("immutable"));
|
|
6
6
|
var _field = require("../../../field");
|
|
7
|
-
function _interopRequireDefault(
|
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
8
|
jest.mock('connection/database/reset_password_pane', function () {
|
|
9
9
|
return (0, _testUtils.mockComponent)('reset_password_pane');
|
|
10
10
|
});
|
|
@@ -107,7 +107,7 @@ describe('ResetPasswordScreen', function () {
|
|
|
107
107
|
|
|
108
108
|
// Set a field on Lock to set the username field, then check it was set as the email
|
|
109
109
|
var l = (0, _field.setField)(lock, 'username', 'test@test.com');
|
|
110
|
-
(0, _testUtils.expectComponent)(
|
|
110
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, {
|
|
111
111
|
i18n: i18n,
|
|
112
112
|
model: l
|
|
113
113
|
})).toMatchSnapshot();
|
|
@@ -124,7 +124,7 @@ describe('ResetPasswordScreen', function () {
|
|
|
124
124
|
|
|
125
125
|
// Set a field on Lock to set the username field, then check it was set as the email
|
|
126
126
|
var l = (0, _field.setField)(lock, 'username', 'some-username');
|
|
127
|
-
(0, _testUtils.expectComponent)(
|
|
127
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(Component, {
|
|
128
128
|
i18n: i18n,
|
|
129
129
|
model: l
|
|
130
130
|
})).toMatchSnapshot();
|
|
@@ -5,19 +5,19 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
5
5
|
var _immutable = _interopRequireDefault(require("immutable"));
|
|
6
6
|
var _testUtils = require("testUtils");
|
|
7
7
|
var _signed_up_confirmation = _interopRequireDefault(require("../../../connection/database/signed_up_confirmation"));
|
|
8
|
-
function _interopRequireDefault(
|
|
9
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/
|
|
10
|
-
function asyncGeneratorStep(
|
|
11
|
-
function _asyncToGenerator(
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return r; }; var t, r = {}, e = Object.prototype, n = e.hasOwnProperty, o = "function" == typeof Symbol ? Symbol : {}, i = o.iterator || "@@iterator", a = o.asyncIterator || "@@asyncIterator", u = o.toStringTag || "@@toStringTag"; function c(t, r, e, n) { Object.defineProperty(t, r, { value: e, enumerable: !n, configurable: !n, writable: !n }); } try { c({}, ""); } catch (t) { c = function c(t, r, e) { return t[r] = e; }; } function h(r, e, n, o) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype); return c(a, "_invoke", function (r, e, n) { var o = 1; return function (i, a) { if (3 === o) throw Error("Generator is already running"); if (4 === o) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var u = n.delegate; if (u) { var c = d(u, n); if (c) { if (c === f) continue; return c; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (1 === o) throw o = 4, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = 3; var h = s(r, e, n); if ("normal" === h.type) { if (o = n.done ? 4 : 2, h.arg === f) continue; return { value: h.arg, done: n.done }; } "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg); } }; }(r, n, new Context(o || [])), !0), a; } function s(t, r, e) { try { return { type: "normal", arg: t.call(r, e) }; } catch (t) { return { type: "throw", arg: t }; } } r.wrap = h; var f = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var l = {}; c(l, i, function () { return this; }); var p = Object.getPrototypeOf, y = p && p(p(x([]))); y && y !== e && n.call(y, i) && (l = y); var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l); function g(t) { ["next", "throw", "return"].forEach(function (r) { c(t, r, function (t) { return this._invoke(r, t); }); }); } function AsyncIterator(t, r) { function e(o, i, a, u) { var c = s(t[o], t, i); if ("throw" !== c.type) { var h = c.arg, f = h.value; return f && "object" == _typeof(f) && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) { e("next", t, a, u); }, function (t) { e("throw", t, a, u); }) : r.resolve(f).then(function (t) { h.value = t, a(h); }, function (t) { return e("throw", t, a, u); }); } u(c.arg); } var o; c(this, "_invoke", function (t, n) { function i() { return new r(function (r, o) { e(t, n, r, o); }); } return o = o ? o.then(i, i) : i(); }, !0); } function d(r, e) { var n = e.method, o = r.i[n]; if (o === t) return e.delegate = null, "throw" === n && r.i.return && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f; var i = s(o, r.i, e.arg); if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f; var a = i.arg; return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f); } function w(t) { this.tryEntries.push(t); } function m(r) { var e = r[4] || {}; e.type = "normal", e.arg = t, r[4] = e; } function Context(t) { this.tryEntries = [[-1]], t.forEach(w, this), this.reset(!0); } function x(r) { if (null != r) { var e = r[i]; if (e) return e.call(r); if ("function" == typeof r.next) return r; if (!isNaN(r.length)) { var o = -1, a = function e() { for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e; return e.value = t, e.done = !0, e; }; return a.next = a; } } throw new TypeError(_typeof(r) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), c(GeneratorFunctionPrototype, u, GeneratorFunction.displayName = "GeneratorFunction"), r.isGeneratorFunction = function (t) { var r = "function" == typeof t && t.constructor; return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name)); }, r.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t; }, r.awrap = function (t) { return { __await: t }; }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () { return this; }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(h(t, e, n, o), i); return r.isGeneratorFunction(e) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, g(v), c(v, u, "Generator"), c(v, i, function () { return this; }), c(v, "toString", function () { return "[object Generator]"; }), r.keys = function (t) { var r = Object(t), e = []; for (var n in r) e.unshift(n); return function t() { for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t; return t.done = !0, t; }; }, r.values = x, Context.prototype = { constructor: Context, reset: function reset(r) { if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0][4]; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(r) { if (this.done) throw r; var e = this; function n(t) { a.type = "throw", a.arg = r, e.next = t; } for (var o = e.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i[4], u = this.prev, c = i[1], h = i[2]; if (-1 === i[0]) return n("end"), !1; if (!c && !h) throw Error("try statement without catch or finally"); if (null != i[0] && i[0] <= u) { if (u < c) return this.method = "next", this.arg = t, n(c), !0; if (u < h) return n(h), !1; } } }, abrupt: function abrupt(t, r) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var n = this.tryEntries[e]; if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) { var o = n; break; } } o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null); var i = o ? o[4] : {}; return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i); }, complete: function complete(t, r) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f; }, finish: function finish(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[2] === t) return this.complete(e[4], e[3]), m(e), f; } }, catch: function _catch(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[0] === t) { var n = e[4]; if ("throw" === n.type) { var o = n.arg; m(e); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(r, e, n) { return this.delegate = { i: x(r), r: e, n: n }, "next" === this.method && (this.arg = t), f; } }, r; }
|
|
10
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
11
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
12
12
|
var lock = _immutable.default.fromJS({
|
|
13
13
|
id: '__lock-id__'
|
|
14
14
|
});
|
|
15
15
|
describe('SignedUpConfirmation', function () {
|
|
16
|
-
it('renders correctly', /*#__PURE__*/_asyncToGenerator(
|
|
16
|
+
it('renders correctly', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
17
17
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
18
18
|
while (1) switch (_context.prev = _context.next) {
|
|
19
19
|
case 0:
|
|
20
|
-
(0, _testUtils.expectComponent)(
|
|
20
|
+
(0, _testUtils.expectComponent)(/*#__PURE__*/_react.default.createElement(_signed_up_confirmation.default, {
|
|
21
21
|
lock: lock
|
|
22
22
|
})).toMatchSnapshot();
|
|
23
23
|
case 1:
|
|
@@ -5,9 +5,8 @@ var _immutable = _interopRequireDefault(require("immutable"));
|
|
|
5
5
|
var _actions = require("../../../connection/enterprise/actions");
|
|
6
6
|
var l = _interopRequireWildcard(require("../../../core/index"));
|
|
7
7
|
var _index2 = require("../../../field/index");
|
|
8
|
-
function
|
|
9
|
-
function
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
8
|
+
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); }
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
10
|
jest.mock('connection/database/index', function () {
|
|
12
11
|
return {
|
|
13
12
|
databaseLogInWithEmail: jest.fn(function () {
|
|
@@ -6,9 +6,8 @@ var _testUtils = require("testUtils");
|
|
|
6
6
|
var _immutable = _interopRequireDefault(require("immutable"));
|
|
7
7
|
var i18n = _interopRequireWildcard(require("../../../i18n"));
|
|
8
8
|
var _hrd_pane = _interopRequireDefault(require("../../../connection/enterprise/hrd_pane"));
|
|
9
|
-
function
|
|
10
|
-
function
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
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); }
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
11
|
var lock = _immutable.default.fromJS({
|
|
13
12
|
id: '__lock-id__'
|
|
14
13
|
});
|
|
@@ -25,7 +24,7 @@ describe('HRDPane', function () {
|
|
|
25
24
|
jest.resetAllMocks();
|
|
26
25
|
});
|
|
27
26
|
it('renders correctly', function () {
|
|
28
|
-
(0, _testUtils.expectShallowComponent)(
|
|
27
|
+
(0, _testUtils.expectShallowComponent)(/*#__PURE__*/_react.default.createElement(_hrd_pane.default, defaultProps)).toMatchSnapshot();
|
|
29
28
|
});
|
|
30
29
|
it('renders the captcha if required', function () {
|
|
31
30
|
require('core/index').captcha.mockReturnValue({
|
|
@@ -33,6 +32,6 @@ describe('HRDPane', function () {
|
|
|
33
32
|
return true;
|
|
34
33
|
}
|
|
35
34
|
});
|
|
36
|
-
(0, _testUtils.expectShallowComponent)(
|
|
35
|
+
(0, _testUtils.expectShallowComponent)(/*#__PURE__*/_react.default.createElement(_hrd_pane.default, defaultProps)).toMatchSnapshot();
|
|
37
36
|
});
|
|
38
37
|
});
|