mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 14:26:36 +00:00
refactor: gridCard:configureActions
This commit is contained in:
parent
5fa51da5ec
commit
80746f0bfa
@ -85,7 +85,7 @@ export const gridCardActionInitializers_deprecated = new CompatibleSchemaInitial
|
||||
|
||||
export const gridCardActionInitializers = new CompatibleSchemaInitializer(
|
||||
{
|
||||
name: 'actionInitializers:gridCard',
|
||||
name: 'gridCard:configureActions',
|
||||
title: "{{t('Configure actions')}}",
|
||||
icon: 'SettingOutlined',
|
||||
style: {
|
||||
|
@ -16,7 +16,7 @@ test.describe('configure global actions', () => {
|
||||
test('filter & add new & refresh', async ({ page, mockPage }) => {
|
||||
await mockPage(oneEmptyGridCardBlock).goto();
|
||||
|
||||
await page.getByLabel('schema-initializer-ActionBar-actionInitializers:gridCard-general').hover();
|
||||
await page.getByLabel('schema-initializer-ActionBar-gridCard:configureActions-general').hover();
|
||||
await page.getByRole('menuitem', { name: 'Filter' }).click();
|
||||
await page.getByRole('menuitem', { name: 'Add new' }).click();
|
||||
await page.getByRole('menuitem', { name: 'Refresh' }).click();
|
||||
@ -31,7 +31,7 @@ test.describe('configure global actions', () => {
|
||||
await expect(page.getByRole('button', { name: 'Refresh' })).toBeVisible();
|
||||
|
||||
// delete buttons
|
||||
await page.getByLabel('schema-initializer-ActionBar-actionInitializers:gridCard-general').hover();
|
||||
await page.getByLabel('schema-initializer-ActionBar-gridCard:configureActions-general').hover();
|
||||
await page.getByRole('menuitem', { name: 'Filter' }).click();
|
||||
await page.getByRole('menuitem', { name: 'Add new' }).click();
|
||||
await page.getByRole('menuitem', { name: 'Refresh' }).click();
|
||||
@ -53,7 +53,7 @@ test.describe('configure item actions', () => {
|
||||
await mockRecord('general');
|
||||
await nocoPage.goto();
|
||||
|
||||
await page.getByLabel('schema-initializer-ActionBar-actionInitializers:gridCardItem-general').first().hover();
|
||||
await page.getByLabel('schema-initializer-ActionBar-gridCard:configureActionsItem-general').first().hover();
|
||||
await page.getByRole('menuitem', { name: 'View' }).click();
|
||||
await page.getByRole('menuitem', { name: 'Edit' }).click();
|
||||
await page.getByRole('menuitem', { name: 'Delete' }).click();
|
||||
@ -68,7 +68,7 @@ test.describe('configure item actions', () => {
|
||||
await expect(page.getByLabel('action-Action.Link-Delete-destroy-general-grid-card').first()).toBeVisible();
|
||||
|
||||
// delete buttons
|
||||
await page.getByLabel('schema-initializer-ActionBar-actionInitializers:gridCardItem-general').first().hover();
|
||||
await page.getByLabel('schema-initializer-ActionBar-gridCard:configureActionsItem-general').first().hover();
|
||||
await page.getByRole('menuitem', { name: 'View' }).click();
|
||||
await page.getByRole('menuitem', { name: 'Edit' }).click();
|
||||
await page.getByRole('menuitem', { name: 'Delete' }).click();
|
||||
@ -88,7 +88,7 @@ test.describe('configure item actions', () => {
|
||||
await mockRecord('general');
|
||||
await nocoPage.goto();
|
||||
|
||||
await page.getByLabel('schema-initializer-ActionBar-actionInitializers:gridCardItem-general').first().hover();
|
||||
await page.getByLabel('schema-initializer-ActionBar-gridCard:configureActionsItem-general').first().hover();
|
||||
await page.getByRole('menuitem', { name: 'Customize' }).hover();
|
||||
await page.getByRole('menuitem', { name: 'Popup' }).click();
|
||||
await page.getByRole('menuitem', { name: 'Update record' }).click();
|
||||
|
@ -1022,7 +1022,7 @@ export const createListBlockSchema = (options) => {
|
||||
export const createGridCardBlockSchema = (options) => {
|
||||
const {
|
||||
formItemInitializers = 'details:configureFields',
|
||||
actionInitializers = 'actionInitializers:gridCard',
|
||||
actionInitializers = 'gridCard:configureActions',
|
||||
itemActionInitializers = 'actionInitializers:gridCardItem',
|
||||
collection,
|
||||
association,
|
||||
|
@ -890,7 +890,7 @@ export const oneEmptyGridCardBlock: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'void',
|
||||
'x-initializer': 'actionInitializers:gridCard',
|
||||
'x-initializer': 'gridCard:configureActions',
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
|
Loading…
Reference in New Issue
Block a user