import { CogniteWellsClient } from "src"; import { HoleSectionGroupIngestion } from "src/model/holeSectionGroupIngestion"; import { setupLoggedInIngestionClient } from "../../testUtils"; import { PhaseEnum } from "../../../model/phaseEnum"; let client: CogniteWellsClient; beforeAll(async () => { client = await setupLoggedInIngestionClient(); }); test("ingest hole sections", async () => { expect(client).not.toBeUndefined(); const ingestion: HoleSectionGroupIngestion = { externalId: "js:sdk:test", sourceName: "Petrel", wellboreAssetExternalId: "Petrel:USA0000650400", measuredDepthUnit: "meter", sizeUnit: "inch", sections: [ { name: "1200-inch-hole", source: { externalId: "big-hole", type: "event", }, bitSize: 1200, holeSize: 1200, topMeasuredDepth: 0, baseMeasuredDepth: 50, startTime: 10000000, endTime: 20000000, }, ], phase: PhaseEnum.Planned, }; const holeSectionGroupItems = await client.holeSections.ingest([ingestion]); expect(holeSectionGroupItems.items.length).toBe(1); const holeSectionGroup = holeSectionGroupItems.items[0]; expect(holeSectionGroup.sections.length).toBe(1); expect(holeSectionGroup.phase).toBe(PhaseEnum.Planned); });