diff --git a/frontend/src/tests/Landing.spec.ts b/frontend/src/tests/Landing.spec.ts index 5a106767a..b62ac7583 100644 --- a/frontend/src/tests/Landing.spec.ts +++ b/frontend/src/tests/Landing.spec.ts @@ -61,13 +61,19 @@ describe('Landing', () => { await button.trigger('click'); expect(loginSpy).toHaveBeenCalled(); }); - it('should render BCeID button and be disabled', async () => { + it('should render BCeID button and be enabled', async () => { const button = wrapper.get('#login-bceid-button'); expect(button.classes()).toEqual( expect.arrayContaining(['landing-button']) ); expect(button.html().includes('Login with BCeID')).toBe(true); - expect(button.attributes()).toHaveProperty('disabled'); + expect(button.attributes()).not.toHaveProperty('disabled'); + }); + it('should button Login with BCEID be clicked', async () => { + const button = wrapper.get('#login-bceid-button'); + const loginSpy = vi.spyOn(AuthService, 'loginBceid'); + await button.trigger('click'); + expect(loginSpy).toHaveBeenCalled(); }); it('should render image', () => { const img = wrapper.findAll('.landing-img');