diff options
Diffstat (limited to 'spec/frontend/authentication/webauthn/components/registration_spec.js')
-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); |