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 7e7e22c6d3.

* fix(Table): fix Fixed Block bug

* refactor: remove useless code

* fix: empty page

* chore: increase timeout
This commit is contained in:
Zeke Zhang 2024-03-05 16:27:17 +08:00 committed by GitHub
parent 89ad88857d
commit e10899b271
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 10 deletions

View File

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

View File

@ -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 (
<div
className="nb-fixed-block"

View File

@ -2,10 +2,10 @@ import { devices, defineConfig as playwrightDefineConfig, type PlaywrightTestCon
export const defineConfig = (config?: PlaywrightTestConfig) => {
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.