cloudify-ui-common-cypress

Common Cloudify UI Cypress library


License
Apache-2.0
Install
npm install cloudify-ui-common-cypress@2.1.0

Documentation

Cloudify UI Common

Cloudify UI Common library is a monorepo containing multiple packages published in NPM registry.

Packages

Packages are stored in packages directory:

  1. backend
  2. configs
  3. cypress
  4. frontend
  5. scripts

Package content description is provided in README.md files in each package directory.

Development

This monorepo uses NPM workspaces to manage multiple packages within a singular top-level, root package.

To install dependencies for all packages from root package, run:

npm ci

To run any NPM script for specific package from root package, run:

npm run <script-name> --workspace packages/<package-name>

To run any NPM script for all packages only if the script exists, run:

npm run <script-name> --workspaces --if-present

Debugging

If you want to develop/debug cloudify-ui-common-<package-name> from the package user side (eg. from [cloudify-stage] (https://github.com/cloudify-cosmo/cloudify-stage)), then instead of using cloudify-ui-common-<package-name> package from NPM registry, you can:

  1. Use npm link cloudify-ui-common-<package-name> <local-path-to-cloudify-ui-common-<package-name>> command in your package user project,
  2. Build cloudify-ui-common-<package-name> package (see: Development section),
  3. Run package user project and see changes applied locally in cloudify-ui-common-<package-name> package.

Publishing

The way of work with publishing the package is described below. This section is divided into 3 parts:

  1. When? - describes when we can publish the package,
  2. Who? - describes who can publish the package and under which conditions,
  3. How? - describes technical details to follow to publish the package.

When?

We can release when:

  • code on master branch is necessary for one of the dependant projects (stage, composer, topology, ...),
  • fix/feature on master branch is finished.

Who?

Developers from cloudify-rnd-ui e-mail group can publish new version after agreement with maintainer (see author or maintainers field in package.json file).

How?

This section is divided into two parts:

  1. Checklist - describes prerquisities to be met before publishing the package,
  2. Steps - describes technical steps to be executed to publish the package.
Checklist
  • all your changes are merged to master branch, so that your local master branch is up-to-date,
  • you know and follow Semantic Versioning rules when creating new version,
  • you know and follow Keep a Changelog guiding principles when adding release notes,
  • you have agreement with developers from cloudify-rnd-ui group on publishing new version.
Steps

If you met all points from the checklist above, follow these steps:

  1. Provide version type and package name to npm run publish-version. For example:

    • npm run publish-version minor cypress - to publish new minor version of cloudify-ui-common-cypress package
    • npm run publish-version prepatch scripts - to publish new prerelease patch version of cloudify-ui-common-scripts package

    It will create special branch, add commit to it containing version bump in package*.json files according to your choice, tag the commit and push branch to remote. That should trigger Jenkins jobs finalizing publish.

  2. Check if Jenkins jobs were successful.

  3. Verify that NPM package at https://www.npmjs.com/package/cloudify-ui-common-<package-name> was updated properly.

  4. Go to Create Release page @ GitHub to create release and add release notes according to Keep a Changelog guiding principles (in addition to the types of changes described there, you can use Internal type for all non-user-facing changes).