mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 13:57:19 +00:00
fix: useDesigner Designer should has default toolbar (#3365)
* fix: useDesigner Designer should has default toolbar * test: e2e schemaSeting for linkage rule * test: e2e schemaSeting for linkage rule * test: e2e schemaSeting for linkage rule
This commit is contained in:
parent
2f8b0e75f8
commit
4d44c6e24e
@ -85,7 +85,7 @@ export const useFormBlockType = () => {
|
|||||||
|
|
||||||
export const useIsDetailBlock = () => {
|
export const useIsDetailBlock = () => {
|
||||||
const ctx = useFormBlockContext();
|
const ctx = useFormBlockContext();
|
||||||
return ctx.type === 'update';
|
return ctx.type !== 'create';
|
||||||
};
|
};
|
||||||
|
|
||||||
export const FormBlockProvider = (props) => {
|
export const FormBlockProvider = (props) => {
|
||||||
|
@ -1164,7 +1164,7 @@ test.describe('actions schema settings', () => {
|
|||||||
await page.getByRole('button', { name: 'Submit' }).hover();
|
await page.getByRole('button', { name: 'Submit' }).hover();
|
||||||
await page.getByRole('button', { name: 'designer-schema-settings-Action-Action.Designer-users' }).hover();
|
await page.getByRole('button', { name: 'designer-schema-settings-Action-Action.Designer-users' }).hover();
|
||||||
},
|
},
|
||||||
supportedOptions: ['Edit button', 'Linkage rules', 'Bind workflows', 'Delete'],
|
supportedOptions: ['Edit button', 'Bind workflows', 'Delete'],
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1179,7 +1179,6 @@ test.describe('actions schema settings', () => {
|
|||||||
},
|
},
|
||||||
supportedOptions: [
|
supportedOptions: [
|
||||||
'Edit button',
|
'Edit button',
|
||||||
'Linkage rules',
|
|
||||||
'Assign field values',
|
'Assign field values',
|
||||||
'Skip required validation',
|
'Skip required validation',
|
||||||
'After successful submission',
|
'After successful submission',
|
||||||
|
@ -148,7 +148,7 @@ test.describe('actions schema settings', () => {
|
|||||||
await page.getByRole('button', { name: 'Submit' }).hover();
|
await page.getByRole('button', { name: 'Submit' }).hover();
|
||||||
await page.getByRole('button', { name: 'designer-schema-settings-Action-Action.Designer-users' }).hover();
|
await page.getByRole('button', { name: 'designer-schema-settings-Action-Action.Designer-users' }).hover();
|
||||||
},
|
},
|
||||||
supportedOptions: ['Edit button', 'Linkage rules', 'Bind workflows', 'Delete'],
|
supportedOptions: ['Edit button', 'Bind workflows', 'Delete'],
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -163,7 +163,6 @@ test.describe('actions schema settings', () => {
|
|||||||
},
|
},
|
||||||
supportedOptions: [
|
supportedOptions: [
|
||||||
'Edit button',
|
'Edit button',
|
||||||
'Linkage rules',
|
|
||||||
'Assign field values',
|
'Assign field values',
|
||||||
'Skip required validation',
|
'Skip required validation',
|
||||||
'After successful submission',
|
'After successful submission',
|
||||||
|
@ -92,7 +92,7 @@ test.describe('actions schema settings', () => {
|
|||||||
await page.getByLabel('action-Action-Filter-submit-general-filter-form').hover();
|
await page.getByLabel('action-Action-Filter-submit-general-filter-form').hover();
|
||||||
await page.getByRole('button', { name: 'designer-schema-settings-Action' }).hover();
|
await page.getByRole('button', { name: 'designer-schema-settings-Action' }).hover();
|
||||||
},
|
},
|
||||||
supportedOptions: ['Edit button', 'Linkage rules', 'Delete'],
|
supportedOptions: ['Edit button', 'Delete'],
|
||||||
});
|
});
|
||||||
|
|
||||||
// Reset settings --------------------------------------------------------------------
|
// Reset settings --------------------------------------------------------------------
|
||||||
@ -102,7 +102,7 @@ test.describe('actions schema settings', () => {
|
|||||||
await page.getByLabel('action-Action-Reset-general-filter-form').hover();
|
await page.getByLabel('action-Action-Reset-general-filter-form').hover();
|
||||||
await page.getByRole('button', { name: 'designer-schema-settings-Action' }).hover();
|
await page.getByRole('button', { name: 'designer-schema-settings-Action' }).hover();
|
||||||
},
|
},
|
||||||
supportedOptions: ['Edit button', 'Linkage rules', 'Delete'],
|
supportedOptions: ['Edit button', 'Delete'],
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -20,5 +20,5 @@ export const useDesigner = () => {
|
|||||||
}, [fieldSchema]);
|
}, [fieldSchema]);
|
||||||
|
|
||||||
const component = useComponent(toolbar);
|
const component = useComponent(toolbar);
|
||||||
return designable ? component : Def;
|
return designable ? component || Def : Def;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user