2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-09-13 22:21:37 +00:00

feat: improve user/group management actions (#9602)

* feat: improve user management actions
add "open profile" actions

* add lock / unlock action

* add actions for password reset

* submit coverage info to codecov
no idea why this was turned off

* bump api version

* add frontend test

* add backend test

* fix test state

* move test

* fix style

* fix name

* hide password change if not superuser

* bump playwright
see https://github.com/microsoft/playwright/issues/35183

* fix test

* fix test order

* simplify test

---------

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
Matthias Mair
2025-06-19 01:14:59 +02:00
committed by GitHub
parent 8346318f7d
commit d5fa609275
13 changed files with 242 additions and 24 deletions

View File

@@ -23,10 +23,34 @@ test('Permissions - Admin', async ({ browser, request }) => {
await loadTab(page, 'Plugins');
await loadTab(page, 'Users / Access');
// Let's create a new user
// Let's check creating a new user
await page.getByLabel('action-button-add-user').click();
await page.getByRole('button', { name: 'Submit' }).waitFor();
await page.getByRole('button', { name: 'Cancel' }).click();
// Change password
await page.getByRole('cell', { name: 'Ian', exact: true }).click({
button: 'right'
});
await page.getByRole('button', { name: 'Change Password' }).click();
await page.getByLabel('text-field-password').fill('123');
await page.getByRole('button', { name: 'Submit' }).click();
await page.getByText("['This password is too short").waitFor();
await page
.locator('label')
.filter({ hasText: 'Override warning' })
.locator('div')
.first()
.click();
await page.getByRole('button', { name: 'Submit' }).click();
await page.getByText('Password updated').click();
// Open profile
await page.getByRole('cell', { name: 'Ian', exact: true }).click({
button: 'right'
});
await page.getByRole('button', { name: 'Open Profile' }).click();
await page.getByText('User: ian', { exact: true }).click();
});
/**