From 6cb5b3a92d526e8b675aba2d1455e7e00b8656f5 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 8 Mar 2023 21:07:52 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../frontend/authentication/webauthn/components/registration_spec.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'spec/frontend/authentication') 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); -- cgit v1.2.3