diff --git a/src/frontend/src/pages/Auth/ChangePassword.tsx b/src/frontend/src/pages/Auth/ChangePassword.tsx index 555a20a839..d603eef55d 100644 --- a/src/frontend/src/pages/Auth/ChangePassword.tsx +++ b/src/frontend/src/pages/Auth/ChangePassword.tsx @@ -37,6 +37,7 @@ export default function Set_Password() { function passwordError(values: any) { let message: any = + values?.new_password || values?.new_password2 || values?.new_password1 || values?.current_password || diff --git a/src/frontend/tests/pui_login.spec.ts b/src/frontend/tests/pui_login.spec.ts index 55c7b43a21..833c234e0c 100644 --- a/src/frontend/tests/pui_login.spec.ts +++ b/src/frontend/tests/pui_login.spec.ts @@ -103,6 +103,7 @@ test('Login - Change Password', async ({ page }) => { await page.getByLabel('action-menu-user-actions-change-password').click(); // First attempt with some errors + await page.getByLabel('password', { exact: true }).fill('youshallnotpass'); await page.getByLabel('input-password-1').fill('12345'); await page.getByLabel('input-password-2').fill('54321'); await page.getByRole('button', { name: 'Confirm' }).click(); @@ -121,9 +122,5 @@ test('Login - Change Password', async ({ page }) => { await page.getByText('Password Changed').waitFor(); await page.getByText('The password was set successfully').waitFor(); - // Should have redirected to the index page - await page.waitForURL('**/platform/home**'); - await page.getByText('InvenTree Demo Server - Norman Nothington'); - await page.waitForTimeout(1000); });