Skip to content

Latest commit

 

History

History
72 lines (50 loc) · 2.64 KB

File metadata and controls

72 lines (50 loc) · 2.64 KB

Simple Viewer App

Copyright © Bentley Systems, Incorporated. All rights reserved.

An iModel.js sample application that demonstrates opening an iModel and viewing its data. The data is presented using the following components:

  • Viewport: Renders geometric data onto an HTMLCanvasElement.
  • Tree: Displays a hierarchical view of iModel contents.
  • Property Grid: Displays properties of selected element(s).
  • Table: Displays element properties in a tabular format.

This app serves as a guide on how you can embed one or more of these components into your own application. See http://imodeljs.org for comprehensive documentation on the iModel.js API and the various constructs used in this sample.

Screenshot of the application

Development Setup

Follow the App Development Setup section under Sample Interactive Apps to configure, install dependencies, build, and run the app.

Testing

Run both e2e and unit tests with npm test

End-to-end tests

You can run just end-to-end tests with npm run test:e2e. But it takes a while to build and start the tests, so if want to actively change something within them, first launch the app with npm run test:e2e:start-app and when it's done npm run test:e2e:test-app

If you want to see what tests do behind the scenes, you can launch them in non headless mode. Edit the file in ./test/end-to-end/setupTests.ts and add

{ headless: false }

to puppeteer launch options. Like this

before(async () => {
  browser = await Puppeteer.launch({ headless: false });
});

Unit tests

Run with npm run test:unit

Purpose

The purpose of this application is to demonstrate the following:

Contributing

Contributing to iModel.js