import { describe, expect, it } from 'vitest';
|
|
import { defaultBtnsList, getDefaultBtnEvent } from '../config';
|
|
describe('batch print button configuration', () => {
|
it('uses the builtin event modal configuration and preserves the original print action by default', () => {
|
const button = defaultBtnsList.find((item) => item.value === 'batchPrint');
|
const event = getDefaultBtnEvent('batchPrint');
|
|
expect(button?.event).toMatchObject({
|
customBtn: false,
|
enableFunc: expect.any(String),
|
func: expect.stringContaining('batchPrint(data)'),
|
});
|
expect(event).toMatchObject({
|
customBtn: false,
|
enableFunc: expect.any(String),
|
func: expect.stringContaining('batchPrint(data)'),
|
});
|
});
|
});
|