mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 21:15:41 +00:00
fix asserts
This commit is contained in:
@ -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 ||
|
||||
|
@ -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);
|
||||
});
|
||||
|
Reference in New Issue
Block a user