test: acl test (#3609)

This commit is contained in:
katherinehhh 2024-03-05 15:13:28 +08:00 committed by GitHub
parent 44f1ef1416
commit 3acc574877
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -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.*'],

View File

@ -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 });