"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
const chai = require("chai");
const core_frontend_1 = require("@itwin/core-frontend");
const TestContext_1 = require("./setup/TestContext");
const expect = chai.expect;
describe("IModel Views", () => {
    let iModel;
    let views;
    before(async function () {
        // Ensure the singleton is setup
        const testContext = await TestContext_1.TestContext.instance();
        if (!testContext.settings.runiModelReadRpcTests) {
            this.skip();
        }
        iModel = await testContext.iModelWithChangesets.getConnection();
        views = iModel.views;
    });
    it("should query ids", async () => {
        const props = await views.queryProps({ from: core_frontend_1.SpatialViewState.classFullName });
        expect(props).to.exist.and.be.not.empty;
    });
    it("should load", async () => {
        const props = await views.queryProps({ from: core_frontend_1.SpatialViewState.classFullName });
        const viewState = await views.load(props[0].id);
        expect(viewState).to.exist.and.be.not.empty;
    });
    it("should create viewstate3d using viewcreator3d", async () => {
        const viewcreator3d = new core_frontend_1.ViewCreator3d(iModel);
        const viewState = await viewcreator3d.createDefaultView();
        expect(viewState).to.exist.and.be.not.empty;
    });
});
//# sourceMappingURL=Views.test.js.map