npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@anviltech/fui-po

v1.65.0

Published

A collection of protractor page objects

Downloads

65

Readme

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.