From 3acc574877ef1170e8d00926d6f5c5dd0b273d91 Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Tue, 5 Mar 2024 15:13:28 +0800 Subject: [PATCH] test: acl test (#3609) --- .../@nocobase/plugin-acl/src/client/__e2e__/configure.test.ts | 2 +- .../@nocobase/plugin-acl/src/client/__e2e__/menu.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/configure.test.ts b/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/configure.test.ts index 9d12140110..718dc650c0 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/configure.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/configure.test.ts @@ -70,7 +70,7 @@ test('allows to confgiure plugins ', async ({ page, mockPage, mockRole, updateRo .locator('span') .nth(1) .click(); - await expect(page.getByRole('tab').getByText('Plugin settings permissions')).toBeVisible(); + await expect(page.getByRole('tab').getByText('Plugin settings')).toBeVisible(); await updateRole({ name: roleData.name, snippets: ['!pm.*'], diff --git a/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/menu.test.ts b/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/menu.test.ts index 589e85fbad..192ab4d78c 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/menu.test.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/client/__e2e__/menu.test.ts @@ -28,7 +28,7 @@ test('menu permission ', async ({ page, mockPage, mockRole, updateRole }) => { .locator('span') .nth(1) .click(); - await page.getByRole('tab').getByText('Menu permissions').click(); + await page.getByRole('tab').getByText('Menu').click(); 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: 'page2' }).locator('.ant-checkbox-input')).toBeChecked({ checked: false }); @@ -46,7 +46,7 @@ test('menu permission ', async ({ page, mockPage, mockRole, updateRole }) => { .locator('span') .nth(1) .click(); - await page.getByRole('tab').getByText('Menu permissions').click(); + await page.getByRole('tab').getByText('Menu').click(); 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: 'page2' }).locator('.ant-checkbox-input')).toBeChecked({ checked: true });