mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 12:06:47 +00:00
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:
parent
89ad88857d
commit
e10899b271
@ -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();
|
||||
|
@ -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"
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user