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
This commit is contained in:
parent
89ad88857d
commit
e10899b271
@ -31,8 +31,7 @@ test.describe('table block schema settings', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// 现有固定区块功能会被废弃,现 skip 掉
|
test('fix block', async ({ page, mockPage }) => {
|
||||||
test.skip('fix block', async ({ page, mockPage }) => {
|
|
||||||
await mockPage(oneTableBlockWithAddNewAndViewAndEditAndBasicFields).goto();
|
await mockPage(oneTableBlockWithAddNewAndViewAndEditAndBasicFields).goto();
|
||||||
|
|
||||||
const tableSize = await page.getByLabel('block-item-CardItem-general-table').boundingBox();
|
const tableSize = await page.getByLabel('block-item-CardItem-general-table').boundingBox();
|
||||||
|
@ -40,16 +40,11 @@ export const useFixedBlock = () => {
|
|||||||
export const FixedBlockWrapper: React.FC = (props) => {
|
export const FixedBlockWrapper: React.FC = (props) => {
|
||||||
const fixedBlock = useFixedSchema();
|
const fixedBlock = useFixedSchema();
|
||||||
const { height, fixedBlockUID } = useFixedBlock();
|
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
|
* The fixedBlockUID of false means that the page has no fixed blocks
|
||||||
* isPopup means that the FixedBlock is in the popup mode
|
* isPopup means that the FixedBlock is in the popup mode
|
||||||
*/
|
*/
|
||||||
if (!fixedBlock && fixedBlockUID) return null;
|
if (!fixedBlock && fixedBlockUID) return <>{props.children}</>;
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="nb-fixed-block"
|
className="nb-fixed-block"
|
||||||
|
@ -2,10 +2,10 @@ import { devices, defineConfig as playwrightDefineConfig, type PlaywrightTestCon
|
|||||||
|
|
||||||
export const defineConfig = (config?: PlaywrightTestConfig) => {
|
export const defineConfig = (config?: PlaywrightTestConfig) => {
|
||||||
return playwrightDefineConfig({
|
return playwrightDefineConfig({
|
||||||
timeout: 5 * 60 * 1000,
|
timeout: process.env.CI ? 10 * 60 * 1000 : 5 * 60 * 1000,
|
||||||
|
|
||||||
expect: {
|
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.
|
// Look for test files in the "tests" directory, relative to this configuration file.
|
||||||
|
Loading…
Reference in New Issue
Block a user