diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-09 00:07:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-09 00:07:52 +0300 |
commit | 6cb5b3a92d526e8b675aba2d1455e7e00b8656f5 (patch) | |
tree | 74533f94c28cab59705346299132cd362bbc6a99 /spec/frontend/authentication | |
parent | 9885b7e33ece32ac3bfbf077bb2dc53c459dbc0e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/authentication')
-rw-r--r-- | spec/frontend/authentication/webauthn/components/registration_spec.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/frontend/authentication/webauthn/components/registration_spec.js b/spec/frontend/authentication/webauthn/components/registration_spec.js index 1dcf7de4bc7..1221626db7d 100644 --- a/spec/frontend/authentication/webauthn/components/registration_spec.js +++ b/spec/frontend/authentication/webauthn/components/registration_spec.js @@ -43,8 +43,9 @@ describe('Registration', () => { describe(`when ${STATE_UNSUPPORTED} state`, () => { it('shows an error if using unsecure scheme (HTTP)', () => { + // `supported` function returns false for HTTP because `navigator.credentials` is undefined. + WebAuthnUtils.supported.mockReturnValue(false); WebAuthnUtils.isHTTPS.mockReturnValue(false); - WebAuthnUtils.supported.mockReturnValue(true); createComponent(); const alert = wrapper.findComponent(GlAlert); @@ -53,8 +54,8 @@ describe('Registration', () => { }); it('shows an error if using unsupported browser', () => { - WebAuthnUtils.isHTTPS.mockReturnValue(true); WebAuthnUtils.supported.mockReturnValue(false); + WebAuthnUtils.isHTTPS.mockReturnValue(true); createComponent(); const alert = wrapper.findComponent(GlAlert); |