1.65.0 • Published 4 years ago

@anviltech/fui-po v1.65.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Fleet Manager UI Page Objects

The fui-po page objects are used by fleetmanagement-ui e2e tests and shared with other projects what require them for their e2e tests via the @anviltech/fui-po NPM package.

Building and publishing the @anviltech/fui-po npm package

The @anviltech/fui-po npm package is a NPM package aggregating a number of Typescript Modules, one per page object; it is a heavily modified version of the How to Create and Publish an NPM module in TypeScript recipe.

The NPM package source is hosted in the fleetmanagement-ui repository's fui-po folder. The page objects are hosted in the fui-po/page-objecs folder and exposed by the index.ts module.

The the fleetmanagement-ui package.json file includes yarn scripts to build and publish the package; po:build builds and po:pub publishes it.

Adding a page object to @anviltech/fui-po npm package

We use the fui-po/index.ts file to expose page objects; assuming we are adding the my-new-page-view page object:

// index.ts
...
export { MyNewPageView } from "./page-objects/my-new-page-view.po";
...

Next, we add the new file, fui-po/page-objecs, to the fui-po/page-objecs folder

// my-new-page-view.po.ts
import {by, element, browser} from 'protractor';

export class MyNewPageView {
  ...
}

Next we build the package:

$ yarn po:build

Publishing the @anviltech/fui-po npm package

Update the fleetmanagement-ui package.json version, and CHANGELOG; update the @anviltech/fui-po package CHANGELOG and README; notice that the new @anviltech/fui-po package will be derived from the fleetmanagement-ui version.

Next we publish the package:

$ yarn po:pub

Note that you must have credentials to publish to the NPM @anviltech organization.

Using @anviltech/fui-po page objects

This implementation offers two usage alternatives. The first supports writing E2E tests within the fleetmanagement-ui repository and the other writing E2E tests within other repositories sharing the fleetmanagement-ui page objects.

In Fleet Manager UI

The e2e test scripts refer to page objects in the fui-po/page-objecs folder:

// a fleetmanager-ui e2e spec file
import { browser } from 'protractor';

import { LayoutComponentView } from '../../fui-po/page-objects/layout.component.view.po';
import { NavigationComponentView } from '../../fui-po/page-objects/navigation.component.view.po';

Everything else remains the same.

In other applications

The fleetmanagement-ui page objects are found in the @anviltech/fui-po npm package, installed as follows:

$ yarn -D add @anviltech/fui-po

We import fleetmanagement-ui page objects slightly differently:

// a fleetmanager-ui e2e spec file
import { browser } from 'protractor';

import { LayoutComponentView } from '@anviltech/fui-po';
import { NavigationComponentView } from '@anviltech/fui-po';

Everything else remains the same.

1.65.0

4 years ago

1.64.0

4 years ago

1.63.0

4 years ago

1.62.1

4 years ago

1.62.0

4 years ago

1.61.0

4 years ago

1.60.1

4 years ago

1.59.0-beta2

4 years ago

1.60.0

4 years ago

1.59.0-beta

4 years ago

1.59.0

4 years ago

1.57.4-alpha.2

4 years ago

1.57.4-alpha.1

4 years ago

1.58.0

4 years ago

1.57.3

4 years ago

1.57.2

4 years ago

1.57.1

4 years ago

1.57.0

4 years ago

1.56.0

4 years ago

1.55.0

4 years ago

1.54.0

4 years ago

1.53.0

4 years ago

1.52.0

4 years ago

1.51.0

5 years ago

1.50.1

5 years ago

1.50.0

5 years ago

1.49.2

5 years ago

1.50.0-alpha.1

5 years ago

1.49.1

5 years ago

1.49.0

5 years ago

1.48.3

5 years ago

1.48.3-alpha.3

5 years ago

1.48.3-alpha.2

5 years ago

1.48.3-alpha.1

5 years ago

1.46.1-alpha.2

5 years ago

1.46.1-alpha.1

5 years ago

1.46.0-alpha.15

5 years ago

1.46.0-alpha.14

5 years ago

1.46.0-alpha.13

5 years ago

1.46.0-alpha.12

5 years ago

1.46.0-alpha.11

5 years ago

1.46.0-alpha.10

5 years ago

1.46.0-alpha.9

5 years ago

1.46.0-alpha.8

5 years ago

1.46.0-alpha.7

5 years ago

1.46.0-alpha.6

5 years ago

1.46.0-alpha.5

5 years ago

1.46.0-alpha.4

5 years ago

1.46.0-alpha.3

5 years ago

1.46.0-alpha.2

5 years ago

1.46.0-alpha.1

5 years ago

1.44.0-alpha.12

5 years ago

1.44.0-alpha.11

5 years ago

1.44.0-alpha.10

5 years ago

1.44.0-alpha.9

5 years ago

1.44.0-alpha.8

5 years ago

1.44.0-alpha.7

5 years ago

1.44.0-alpha.6

5 years ago

1.44.0-alpha.5

5 years ago

1.44.0-alpha.4

5 years ago

1.44.0-alpha.3

5 years ago

1.44.0-alpha.2

5 years ago

1.44.0-alpha.1

5 years ago

1.43.0-alpha.5

5 years ago

1.43.0-alpha.4

5 years ago

1.43.0-alpha.3

5 years ago

1.43.0-alpha.2

5 years ago

1.43.0-alpha.1

5 years ago

0.0.2

5 years ago