diff --git a/src/components/Login/LoginForm.vue b/src/components/Login/LoginForm.vue index ce0cf557f2b922e37296d56ba5038dd08efd8a77..e1d90af081c46dd7cd354d62a8e67387426471e9 100644 --- a/src/components/Login/LoginForm.vue +++ b/src/components/Login/LoginForm.vue @@ -89,9 +89,9 @@ const handleSubmit = async () => { id="emailInput" input-id="email" type="email" - label="E-postadresse" - placeholder="Skriv inn din e-postadresse" - invalid-message="Ugyldig e-postadresse" + label="E-post" + placeholder="Skriv inn din e-post" + invalid-message="Ugyldig e-post" /> <BaseInput :model-value="passwordRef" diff --git a/src/components/Login/__tests__/LoginForm.spec.ts b/src/components/Login/__tests__/LoginForm.spec.ts index ad99a5c0d2db05cdaf44389040ad1255893271d4..d97fadf173e8a5568b802de05fec6dcc67973a52 100644 --- a/src/components/Login/__tests__/LoginForm.spec.ts +++ b/src/components/Login/__tests__/LoginForm.spec.ts @@ -41,8 +41,8 @@ describe('Menu and Router Tests', () => { }, }); - expect(wrapper.text()).toContain('email'); - expect(wrapper.text()).toContain('password'); + expect(wrapper.text()).toContain('E-post'); + expect(wrapper.text()).toContain('Passord'); }); }); @@ -72,8 +72,8 @@ describe('Menu and Router Tests', () => { it('updates user credetials correctly', async () => { const { getByPlaceholderText } = render(MyComponent); - const emailInput = getByPlaceholderText('Enter your email') as HTMLInputElement; - const passwordInput = getByPlaceholderText('Enter password') as HTMLInputElement; + const emailInput = getByPlaceholderText('Skriv inn din e-post') as HTMLInputElement; + const passwordInput = getByPlaceholderText('Skriv inn ditt passord') as HTMLInputElement; await fireEvent.update(emailInput, 'user@example.com'); await fireEvent.update(passwordInput, 'Password1'); diff --git a/src/components/SignUp/SignUpForm.vue b/src/components/SignUp/SignUpForm.vue index f4958b04e0614d1df667a0e5847a98299942a4e1..660317944e50aa68c7da4050405b8a35570fdaf8 100644 --- a/src/components/SignUp/SignUpForm.vue +++ b/src/components/SignUp/SignUpForm.vue @@ -99,9 +99,9 @@ const handleSubmit = async () => { id="emailInput" input-id="email" type="email" - label="E-postadresse" - placeholder="Skriv inn din e-postadresse" - invalid-message="Ugyldig e-postadresse"/> + label="E-post" + placeholder="Skriv inn din e-post" + invalid-message="Ugyldig e-post"/> </div> <div class="col-sm"> <BaseInput :model-value="passwordRef" @@ -120,7 +120,7 @@ const handleSubmit = async () => { type="password" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{4,16}" label="Bekreft Passord" - placeholder="Skriv inn passord" + placeholder="Bekreft passord" invalid-message="Passordet må være mellom 4 og 16 tegn og inneholde én stor bokstav, liten bokstav og et tall" /> </div> diff --git a/src/components/SignUp/__tests__/SignUpForm.spec.ts b/src/components/SignUp/__tests__/SignUpForm.spec.ts index f2a653c9ea854ba0bbe29de03949ed26c983d3cf..1d66d74cc37f9f922d88123a76052b2bed2337c6 100644 --- a/src/components/SignUp/__tests__/SignUpForm.spec.ts +++ b/src/components/SignUp/__tests__/SignUpForm.spec.ts @@ -39,9 +39,9 @@ describe('Menu and Router Tests', () => { }, }); - expect(wrapper.text()).toContain('First name'); - expect(wrapper.text()).toContain('Surname'); - expect(wrapper.text()).toContain('Email'); + expect(wrapper.text()).toContain('Fornavn'); + expect(wrapper.text()).toContain('Etternavn'); + expect(wrapper.text()).toContain('E-post'); }); }); @@ -71,10 +71,10 @@ describe('Menu and Router Tests', () => { it('updates user credentials correctly', async () => { const { getByPlaceholderText } = render(MyComponent); - const firstInput = getByPlaceholderText('Enter your first name') as HTMLInputElement; - const lastInput = getByPlaceholderText('Enter your surname') as HTMLInputElement; - const emailInput = getByPlaceholderText('Enter your email') as HTMLInputElement; - const passwordInput = getByPlaceholderText('Enter password') as HTMLInputElement; + const firstInput = getByPlaceholderText('Skriv inn ditt fornavn') as HTMLInputElement; + const lastInput = getByPlaceholderText('Skriv inn ditt etternavn') as HTMLInputElement; + const emailInput = getByPlaceholderText('Skriv inn din e-post') as HTMLInputElement; + const passwordInput = getByPlaceholderText('Skriv inn passord') as HTMLInputElement; await fireEvent.update(firstInput, 'Alice'); await fireEvent.update(lastInput, 'Alicon'); @@ -96,7 +96,7 @@ describe('Menu and Router Tests', () => { }); const errorMsg = container.querySelector('#invalid'); // Use the actual ID here - expect(errorMsg?.textContent === "Password must be between 4 and 16 characters and contain one capital letter, small letter and a number") + expect(errorMsg?.textContent === "Passordet må være mellom 4 og 16 tegn og inneholde én stor bokstav, liten bokstav og et tall") }); it('logout should have empty store at application start', () => { diff --git a/src/views/Authentication/ForgottenPasswordView.vue b/src/views/Authentication/ForgottenPasswordView.vue index b518986cde212511186307ca6999735ec10600fb..acb9def5fc9bbcc09d7bde4fd0580b573a2c4206 100644 --- a/src/views/Authentication/ForgottenPasswordView.vue +++ b/src/views/Authentication/ForgottenPasswordView.vue @@ -7,7 +7,7 @@ <div class="form-floating inputBox"> <input v-model="email" class="form-control" id="inputEmail" type="email" placeholder="name@example.com" required> - <label for="emailInput">Enter email address</label> + <label for="emailInput">Skriv inn din e-post</label> </div> <div v-if="errorMessage" class="text-danger"> @@ -19,7 +19,7 @@ <button1 id="confirmButton" type="submit" :disabled="isSubmitting" button-text="Send e-post"></button1> <div class="login-link"> - <Router-Link to="/login" class="small">Return to login</Router-Link> + <Router-Link to="/login" class="small">Gå tilbake</Router-Link> </div> </form> </div>