Quick proof of concept for twenty-apps + twenty-cli, with local development / hot reload Let's discuss it! https://github.com/user-attachments/assets/c6789936-cd5f-4110-a265-863a6ac1af2d
23 lines
901 B
TypeScript
23 lines
901 B
TypeScript
import { type PageLayoutTabEntity } from 'src/engine/core-modules/page-layout/entities/page-layout-tab.entity';
|
|
|
|
export const cleanupPageLayoutTabRecords = async (): Promise<void> => {
|
|
await global.testDataSource.query(`DELETE from "core"."pageLayoutTab"`);
|
|
};
|
|
|
|
export const assertPageLayoutTabStructure = (
|
|
pageLayoutTab: PageLayoutTabEntity,
|
|
expectedFields?: Partial<PageLayoutTabEntity>,
|
|
) => {
|
|
expect(pageLayoutTab).toBeDefined();
|
|
expect(pageLayoutTab.id).toEqual(expect.any(String));
|
|
expect(pageLayoutTab.title).toEqual(expect.any(String));
|
|
expect(pageLayoutTab.position).toEqual(expect.any(Number));
|
|
expect(pageLayoutTab.pageLayoutId).toEqual(expect.any(String));
|
|
expect(pageLayoutTab.createdAt).toEqual(expect.any(String));
|
|
expect(pageLayoutTab.updatedAt).toEqual(expect.any(String));
|
|
|
|
if (expectedFields) {
|
|
expect(pageLayoutTab).toMatchObject(expectedFields);
|
|
}
|
|
};
|