import { CogniteWellsClient } from "src"; import { setupLoggedInClient } from "../testUtils"; import { expectContainAll } from "./utils/expectContainAll"; let client: CogniteWellsClient; beforeAll(async () => { client = await setupLoggedInClient(); }); test("get list of well tops", async () => { expect(client).not.toBe(undefined); const wellTops = await client.wellTops.list({}); const actual = wellTops.items.find( (wellTop) => wellTop.source.sequenceExternalId == "EDM:welltops_sequence" ); expect(actual).not.toBe(undefined); expectContainAll( actual!.tops.map((top) => top.name), ["Seabed", "NORDLAND GP.", "VIKING GP."] ); }); test("filter by wellbore asset external id", async () => { expect(client).not.toBe(undefined); const wellTops = await client.wellTops.list({ filter: { wellboreIds: [{ assetExternalId: "VOLVE:15/9-F-15 A" }] }, }); const actual = wellTops.items.map( (wellTop) => wellTop.source.sequenceExternalId ); expectContainAll(actual, ["EDM:welltops_sequence"]); });