From 1ce5d76b7e21cfb631bf8fd3c9bb2301d70246c8 Mon Sep 17 00:00:00 2001 From: Zeke Zhang <958414905@qq.com> Date: Tue, 7 May 2024 21:47:57 +0800 Subject: [PATCH] chore: fix failed e2e --- .../data-blocks/table/__e2e__/schemaSettings.test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/schemaSettings.test.ts b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/schemaSettings.test.ts index 4f1998cf0..9209864f4 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/schemaSettings.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/schemaSettings.test.ts @@ -371,9 +371,11 @@ test.describe('table block schema settings', () => { // 初次点击,变为选中状态 await page.getByRole('button', { name: 'Admin' }).click(); await expect(page.getByLabel('block-item-CollectionField-').getByText('Admin')).toBeVisible(); + // 因为只有一条数据,所以不显示分页器 + await expect(page.getByLabel('block-item-CardItem-roles-details').locator('.ant-pagination')).toBeHidden(); // 再次点击,取消选中状态 await page.getByRole('button', { name: 'Admin' }).click(); - await expect(page.getByLabel('block-item-CollectionField-').getByText('Admin')).toBeHidden(); + await expect(page.getByLabel('block-item-CardItem-roles-details').locator('.ant-pagination')).toBeVisible(); // 4. 删除详情区块,Connect data blocks 的下拉菜单应该立即消失 await page.getByLabel('block-item-CardItem-roles-details').hover(); @@ -415,9 +417,11 @@ test.describe('table block schema settings', () => { // 初次点击,变为选中状态 await page.getByRole('button', { name: 'Admin' }).click(); await expect(page.getByLabel('block-item-CollectionField-').getByText('Admin')).toBeVisible(); + // 因为只有一条数据,所以不显示分页器 + await expect(page.getByLabel('block-item-CardItem-roles-details').locator('.ant-pagination')).toBeHidden(); // 再次点击,取消选中状态 await page.getByRole('button', { name: 'Admin' }).click(); - await expect(page.getByLabel('block-item-CollectionField-').getByText('Admin')).toBeHidden(); + await expect(page.getByLabel('block-item-CardItem-roles-details').locator('.ant-pagination')).toBeVisible(); // 5. 删除详情区块,Connect data blocks 的下拉菜单应该立即消失 await page.getByLabel('block-item-CardItem-roles-details').hover();