From e10899b2710e91dd1a542203560e228ce51e8293 Mon Sep 17 00:00:00 2001 From: Zeke Zhang <958414905@qq.com> Date: Tue, 5 Mar 2024 16:27:17 +0800 Subject: [PATCH] fix(Table): fix Fixed Block bug (#3601) * fix(Table): fix Fixed Block bug * test: unskip e2e * chore: remove comment * Revert "fix(Table): fix Fixed Block bug" This reverts commit 7e7e22c6d32fe3d63f73f54d90dd9d7aee965231. * fix(Table): fix Fixed Block bug * refactor: remove useless code * fix: empty page * chore: increase timeout --- .../data-blocks/table/__e2e__/schemaSettings.test.ts | 3 +-- .../client/src/schema-component/antd/page/FixedBlock.tsx | 7 +------ packages/core/test/src/e2e/defineConfig.ts | 4 ++-- 3 files changed, 4 insertions(+), 10 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 36c36afb3..983295906 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 @@ -31,8 +31,7 @@ test.describe('table block schema settings', () => { }); }); - // 现有固定区块功能会被废弃,现 skip 掉 - test.skip('fix block', async ({ page, mockPage }) => { + test('fix block', async ({ page, mockPage }) => { await mockPage(oneTableBlockWithAddNewAndViewAndEditAndBasicFields).goto(); const tableSize = await page.getByLabel('block-item-CardItem-general-table').boundingBox(); diff --git a/packages/core/client/src/schema-component/antd/page/FixedBlock.tsx b/packages/core/client/src/schema-component/antd/page/FixedBlock.tsx index 1d38dc0ff..bd08cb02f 100644 --- a/packages/core/client/src/schema-component/antd/page/FixedBlock.tsx +++ b/packages/core/client/src/schema-component/antd/page/FixedBlock.tsx @@ -40,16 +40,11 @@ export const useFixedBlock = () => { export const FixedBlockWrapper: React.FC = (props) => { const fixedBlock = useFixedSchema(); const { height, fixedBlockUID } = useFixedBlock(); - const record = useRecord(); - const isPopup = Object.keys(record).length; - if (isPopup) { - return <>{props.children}; - } /** * The fixedBlockUID of false means that the page has no fixed blocks * isPopup means that the FixedBlock is in the popup mode */ - if (!fixedBlock && fixedBlockUID) return null; + if (!fixedBlock && fixedBlockUID) return <>{props.children}; return (
{ return playwrightDefineConfig({ - timeout: 5 * 60 * 1000, + timeout: process.env.CI ? 10 * 60 * 1000 : 5 * 60 * 1000, expect: { - timeout: 10 * 1000, + timeout: process.env.CI ? 60 * 1000 : 10 * 1000, }, // Look for test files in the "tests" directory, relative to this configuration file.