mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 12:16:12 +00:00
test: acl test (#3609)
This commit is contained in:
parent
44f1ef1416
commit
3acc574877
@ -70,7 +70,7 @@ test('allows to confgiure plugins ', async ({ page, mockPage, mockRole, updateRo
|
|||||||
.locator('span')
|
.locator('span')
|
||||||
.nth(1)
|
.nth(1)
|
||||||
.click();
|
.click();
|
||||||
await expect(page.getByRole('tab').getByText('Plugin settings permissions')).toBeVisible();
|
await expect(page.getByRole('tab').getByText('Plugin settings')).toBeVisible();
|
||||||
await updateRole({
|
await updateRole({
|
||||||
name: roleData.name,
|
name: roleData.name,
|
||||||
snippets: ['!pm.*'],
|
snippets: ['!pm.*'],
|
||||||
|
@ -28,7 +28,7 @@ test('menu permission ', async ({ page, mockPage, mockRole, updateRole }) => {
|
|||||||
.locator('span')
|
.locator('span')
|
||||||
.nth(1)
|
.nth(1)
|
||||||
.click();
|
.click();
|
||||||
await page.getByRole('tab').getByText('Menu permissions').click();
|
await page.getByRole('tab').getByText('Menu').click();
|
||||||
await page.waitForSelector('.ant-table');
|
await page.waitForSelector('.ant-table');
|
||||||
await expect(page.getByRole('row', { name: 'page1' }).locator('.ant-checkbox-input')).toBeChecked({ checked: true });
|
await expect(page.getByRole('row', { name: 'page1' }).locator('.ant-checkbox-input')).toBeChecked({ checked: true });
|
||||||
await expect(page.getByRole('row', { name: 'page2' }).locator('.ant-checkbox-input')).toBeChecked({ checked: false });
|
await expect(page.getByRole('row', { name: 'page2' }).locator('.ant-checkbox-input')).toBeChecked({ checked: false });
|
||||||
@ -46,7 +46,7 @@ test('menu permission ', async ({ page, mockPage, mockRole, updateRole }) => {
|
|||||||
.locator('span')
|
.locator('span')
|
||||||
.nth(1)
|
.nth(1)
|
||||||
.click();
|
.click();
|
||||||
await page.getByRole('tab').getByText('Menu permissions').click();
|
await page.getByRole('tab').getByText('Menu').click();
|
||||||
await page.waitForSelector('.ant-table');
|
await page.waitForSelector('.ant-table');
|
||||||
await expect(page.getByRole('row', { name: 'page1' }).locator('.ant-checkbox-input')).toBeChecked({ checked: false });
|
await expect(page.getByRole('row', { name: 'page1' }).locator('.ant-checkbox-input')).toBeChecked({ checked: false });
|
||||||
await expect(page.getByRole('row', { name: 'page2' }).locator('.ant-checkbox-input')).toBeChecked({ checked: true });
|
await expect(page.getByRole('row', { name: 'page2' }).locator('.ant-checkbox-input')).toBeChecked({ checked: true });
|
||||||
|
Loading…
Reference in New Issue
Block a user