import { type PageLayoutTabEntity } from 'src/engine/core-modules/page-layout/entities/page-layout-tab.entity'; export const cleanupPageLayoutTabRecords = async (): Promise => { await global.testDataSource.query(`DELETE from "core"."pageLayoutTab"`); }; export const assertPageLayoutTabStructure = ( pageLayoutTab: PageLayoutTabEntity, expectedFields?: Partial, ) => { 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); } };