mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 17:20:57 +00:00
refactor: kanban:configureActions
This commit is contained in:
parent
3526f5bc2e
commit
f201fa3d4c
@ -47,7 +47,7 @@ export const kanbanActionInitializers_deprecated = new CompatibleSchemaInitializ
|
||||
|
||||
export const kanbanActionInitializers = new CompatibleSchemaInitializer(
|
||||
{
|
||||
name: 'actionInitializers:kanban',
|
||||
name: 'kanban:configureActions',
|
||||
title: "{{t('Configure actions')}}",
|
||||
icon: 'SettingOutlined',
|
||||
style: {
|
||||
|
@ -62,7 +62,7 @@ test.describe('configure fields', () => {
|
||||
expect(appends).toContain('manyToOne');
|
||||
await expect(page.getByLabel('block-item-CollectionField-general-kanban-general.manyToOne')).toBeVisible();
|
||||
//修改标题字段
|
||||
await page.getByLabel('schema-initializer-ActionBar-actionInitializers:kanban-general').click();
|
||||
await page.getByLabel('schema-initializer-ActionBar-kanban:configureActions-general').click();
|
||||
await page.getByLabel('block-item-CollectionField-general-kanban-general.manyToOne').hover();
|
||||
await page.getByTestId('card-1').getByLabel('designer-schema-settings-').hover();
|
||||
await page.getByText('Title field').click();
|
||||
@ -78,8 +78,8 @@ test.describe('configure actions', () => {
|
||||
const nocoPage = await mockPage(oneEmptyKanbanBlock).waitForInit();
|
||||
await nocoPage.goto();
|
||||
await expect(page.getByLabel('block-item-CardItem-general-kanban')).toBeVisible();
|
||||
await expect(page.getByLabel('schema-initializer-ActionBar-actionInitializers:kanban-general')).toBeVisible();
|
||||
await page.getByLabel('schema-initializer-ActionBar-actionInitializers:kanban-general').click();
|
||||
await expect(page.getByLabel('schema-initializer-ActionBar-kanban:configureActions-general')).toBeVisible();
|
||||
await page.getByLabel('schema-initializer-ActionBar-kanban:configureActions-general').click();
|
||||
await page.getByRole('menuitem', { name: 'Filter' }).getByRole('switch').click();
|
||||
//按钮正常显示
|
||||
await expect(page.getByLabel('action-Filter.Action-Filter-filter-general-kanban')).toBeVisible();
|
||||
@ -87,7 +87,7 @@ test.describe('configure actions', () => {
|
||||
test('add new action in kanban', async ({ page, mockPage }) => {
|
||||
const nocoPage = await mockPage(oneEmptyKanbanBlock).waitForInit();
|
||||
await nocoPage.goto();
|
||||
await page.getByLabel('schema-initializer-ActionBar-actionInitializers:kanban-general').click();
|
||||
await page.getByLabel('schema-initializer-ActionBar-kanban:configureActions-general').click();
|
||||
await page.getByRole('menuitem', { name: 'Add new' }).getByRole('switch').click();
|
||||
//按钮正常显示
|
||||
await expect(page.getByLabel('action-Action-Add ')).toBeVisible();
|
||||
|
@ -133,7 +133,7 @@ export const oneEmptyKanbanBlock: PageConfig = {
|
||||
_isJSONSchemaObject: true,
|
||||
version: '2.0',
|
||||
type: 'void',
|
||||
'x-initializer': 'actionInitializers:kanban',
|
||||
'x-initializer': 'kanban:configureActions',
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
|
@ -23,7 +23,7 @@ export const createKanbanBlockSchema = (options) => {
|
||||
properties: {
|
||||
actions: {
|
||||
type: 'void',
|
||||
'x-initializer': 'actionInitializers:kanban',
|
||||
'x-initializer': 'kanban:configureActions',
|
||||
'x-component': 'ActionBar',
|
||||
'x-component-props': {
|
||||
style: {
|
||||
|
Loading…
Reference in New Issue
Block a user