Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions ui/cypress/e2e/admin.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('admin', () => {
cy.get('#email').clear('te');
cy.get('#email').type('test@test.nl');
cy.get('#password').clear();
cy.get('#password').type('Testing1');
cy.get('#password').type('Testing1!');
cy.get('.modal-action > .btn').click();

cy.wait(100);
Expand All @@ -42,7 +42,7 @@ describe('admin', () => {
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(1) > .input').click();
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(1) > .input > #email').type('test@test.nl');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').clear();
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').type('Testing1');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').type('Testing1!');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > .modal-action > .btn').click();

cy.wait(50);
Expand All @@ -64,15 +64,15 @@ describe('admin', () => {
cy.get('#email').clear('ad');
cy.get('#email').type('admin2@test.nl');
cy.get('#password').clear();
cy.get('#password').type('Testing1');
cy.get('#password').type('Testing1@');
cy.get('.checkbox').check();
cy.get('.modal-action > .btn').click();
cy.get('.text').click();
cy.get('.menu > :nth-child(3) > .btn').click();
cy.get('.hidden > :nth-child(1)').click();
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(1) > .input > #email').type('admin2@test.nl');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').clear();
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').type('Testing1');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').type('Testing1@');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > .modal-action > .btn').click();
cy.get('.text').click();
cy.get(':nth-child(2) > .btn > .fa-solid').click();
Expand All @@ -94,15 +94,15 @@ describe('admin', () => {
cy.get('#email').clear('te');
cy.get('#email').type('test@test.nl');
cy.get('#password').clear();
cy.get('#password').type('Testing1');
cy.get('#password').type('Testing1!');
cy.get('.modal-action > .btn').click();
cy.get('.text').click();
cy.get('.menu > :nth-child(3) > .btn').click();
cy.get('.hidden > :nth-child(1)').click();
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(1) > .input > #email').clear('te');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(1) > .input > #email').type('test@test.nl');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').clear();
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').type('Testing1');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').type('Testing1!');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > .modal-action > .btn').click();
cy.get('.text').click();
cy.get('[open=""] > .menu > :nth-child(2) > .btn').click();
Expand All @@ -122,7 +122,7 @@ describe('admin', () => {
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(1) > .input > #email').clear('te');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(1) > .input > #email').type('test@test.nl');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').clear();
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').type('Testing1');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').type('Testing1!');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > .modal-action > .btn').click();

cy.get('.alert span').should('contain.text', 'Could not login with the given email and password');
Expand Down
20 changes: 10 additions & 10 deletions ui/cypress/e2e/authentication.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ describe('authentication', () => {
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(1) > .input > #email').clear('b');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(1) > .input > #email').type('test@test.nl');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').clear();
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').type('Testing1');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').type('Testing1!');
cy.get('#checkPassword').clear();
cy.get('#checkPassword').type('Testing1');
cy.get('#checkPassword').type('Testing1!');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > .modal-action > .btn').click();

cy.url().should('include', '/home')
Expand Down Expand Up @@ -76,9 +76,9 @@ describe('authentication', () => {
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(1) > .input > #email').clear('ad');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(1) > .input > #email').type('admin@test.nl');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').clear();
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').type('Testing1');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').type('Testing1!');
cy.get('#checkPassword').clear();
cy.get('#checkPassword').type('Testing1{enter}');
cy.get('#checkPassword').type('Testing1!{enter}');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > .modal-action > .btn').click();

cy.get('.alert span').should('contain.text', 'An account with this email already exists');
Expand All @@ -102,9 +102,9 @@ describe('authentication', () => {
cy.get('#currentPassword').clear('ad');
cy.get('#currentPassword').type('admin');
cy.get('#newPassword').clear();
cy.get('#newPassword').type('Testing1');
cy.get('#newPassword').type('Testing1@');
cy.get('#confirmNewPassword').clear();
cy.get('#confirmNewPassword').type('Testing1{enter}');
cy.get('#confirmNewPassword').type('Testing1@{enter}');

cy.get('.text').click();
cy.get('.menu > :nth-child(3) > .btn').click();
Expand All @@ -113,7 +113,7 @@ describe('authentication', () => {
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(1) > .input > #email').clear('ad');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(1) > .input > #email').type('admin@test.nl');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').clear();
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').type('Testing1');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').type('Testing1@');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > .modal-action > .btn').click();

cy.url().should('include', '/home')
Expand All @@ -125,9 +125,9 @@ describe('authentication', () => {
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(1) > .input > #email').clear('te');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(1) > .input > #email').type('test@test.nl');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').clear();
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').type('Testing1');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').type('Testing1!');
cy.get('#checkPassword').clear();
cy.get('#checkPassword').type('Testing1');
cy.get('#checkPassword').type('Testing1!');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > .modal-action > .btn').click();

cy.url().should('include', '/home')
Expand All @@ -140,7 +140,7 @@ describe('authentication', () => {
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(1) > .input > #email').clear('te');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(1) > .input > #email').type('test@test.nl');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').clear();
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').type('Testing1{enter}');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > :nth-child(2) > .input > #password').type('Testing1!{enter}');
cy.get('.modal-open > .modal-box > form.w-full > .space-y-4 > .modal-action > .btn').click();

cy.get('.alert span').should('contain.text', 'Could not login with the given email and password');
Expand Down
1 change: 1 addition & 0 deletions ui/src/components/RegisterModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export function RegisterModal(props: ModalBaseProps): JSXElement {
pattern(/[A-Z]/, t('your_password_must_have_1_uppercase_letter')),
pattern(/[a-z]/, t('your_password_must_have_1_lowercase_letter')),
pattern(/[0-9]/, t('your_password_must_have_1_digit')),
pattern(/[\W]/, t('your_password_must_have_1_special_character')),
]}
>
{(field, props) => (
Expand Down
1 change: 1 addition & 0 deletions ui/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export const dict = {
your_email_is_not_verified_yet: 'Your email is not verified yet',
your_password_must_have_1_digit: 'Your password must have 1 digit',
your_password_must_have_1_lowercase_letter: 'Your password must have 1 lowercase letter',
your_password_must_have_1_special_character: 'Your password must have 1 special character',
your_password_must_have_1_uppercase_letter: 'Your password must have 1 uppercase letter',
your_password_must_have_8_characters_or_more: 'Your password must have 8 characters or more',
};
1 change: 1 addition & 0 deletions ui/src/locales/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export const dict: Translations = {
your_email_is_not_verified_yet: 'Je e-mail is nog niet geverifieerd',
your_password_must_have_1_digit: 'Je wachtwoord moet 1 cijfer bevatten',
your_password_must_have_1_lowercase_letter: 'Je wachtwoord moet 1 kleine letter bevatten',
your_password_must_have_1_special_character: 'Je wachtwoord moet 1 speciaal teken bevatten',
your_password_must_have_1_uppercase_letter: 'Je wachtwoord moet 1 hoofdletter bevatten',
your_password_must_have_8_characters_or_more: 'Je wachtwoord moet 8 tekens of meer bevatten',
};
1 change: 1 addition & 0 deletions ui/src/pages/admin_page/UsersAdmin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ function CreateUserModal(props: CreateUserModalProps): JSXElement {
pattern(/[A-Z]/, t('your_password_must_have_1_uppercase_letter')),
pattern(/[a-z]/, t('your_password_must_have_1_lowercase_letter')),
pattern(/[0-9]/, t('your_password_must_have_1_digit')),
pattern(/[\W]/, t('your_password_must_have_1_special_character')),
]}
>
{(field, props) => (
Expand Down
1 change: 1 addition & 0 deletions ui/src/pages/user_account_page/modals/ChangePassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export function ChangePasswordModal(props: ModalBaseProps): JSXElement {
pattern(/[A-Z]/, t('your_password_must_have_1_uppercase_letter')),
pattern(/[a-z]/, t('your_password_must_have_1_lowercase_letter')),
pattern(/[0-9]/, t('your_password_must_have_1_digit')),
pattern(/[\W]/, t('your_password_must_have_1_special_character')),
]}
>
{(field, props) => (
Expand Down