1.0.0 β€’ Published 5 months ago

@smapiot/piral-cli-integration-tests v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Piral Logo

Piral CLI Acceptance Tests

Integration tests for the piral-cli tool and its default bundler. Can be used as a test bench when implementing a new bundler, too.

Status

Overall

OSNodeStatus
Linux16.xBuild Status
Linux20.xBuild Status
Linux21.xBuild Status
Windows16.xBuild Status
Windows20.xBuild Status
MacOS16.xBuild Status
MacOS20.xBuild Status

Important Links

  • πŸ“’ We are hiring! - work with us on Piral, its ecosystem and our users
  • 🌍 Website - learn more about Piral
  • πŸ“– Documentation - everything to get started and master micro frontends
  • πŸ‰ Help translating Piral! - making PRs in the documentation branch
  • 🐞 Issue Tracker - report bugs or suggest new features
  • πŸ—¨ Forums - use the community support on StackOverflow
  • πŸ‘ͺ Community Chat - ask questions and provide answers in our Gitter room

Running the Tests

After you cloned the repository run:

npm i

or an alternative command using your favorite package manager.

Now you can try running all tests:

npm start

You can also run the tests from a specific file only:

npm start -- src/pilet-build.test.ts

If you are only interested in a single test (e.g., 'can build a standard templated v2 pilet from sample-piral') then run it via:

npm start -- src/pilet-build.test.ts -t 'can build a standard templated v2 pilet from sample-piral'

Caution: Tests that leverage the integrated browser (using the page variable) can only be run if the whole test suite (i.e., no -t is specified) is run.

For Ubuntu 18.04 and higher the system dependencies can get installed automatically. Many other systems may just work without any special dependencies:

npx playwright install-deps chromium

To ensure everything is working with the test browser we recommend also installing the browsers from Playwright via the command line:

npx playwright install chromium

Testing Package

npm version

The tests are also available as a drop-in package to test bundler plugins. You can install it with:

npm i @smapiot/piral-cli-integration-tests

Then run the tests using

npx piral-cli-tests <your-bundler-name>

If you don't specify the bundler name then the current working directory's package.json will be used to infer it.

Tests

Piral

  • βœ… Scaffold Piral instance
  • βœ… Run/debug Piral instance
  • βœ… Build Piral instance release
  • βœ… Build Piral instance emulator
  • βœ… Build Piral instance emulator sources
  • βœ… Generate Piral instance declaration
  • βœ… Validate Piral instance
  • βœ… Use Piral instance emulator for scaffolding locally
  • βœ… Change Piral instance while debugging (HMR)
  • βœ… Upgrade Piral instance from older (0.12.0 -> ENV) to recent version
  • βœ… Check Piral instance with debugging API (e.g., for piral-inspector)

Pilet

  • βœ… Scaffold pilet (using sample-piral)
  • βœ… Run/debug new pilet
  • βœ… Build mf pilet
  • βœ… Build v3 pilet
  • βœ… Build v2 pilet
  • βœ… Build v1 pilet
  • βœ… Build v0 pilet
  • βœ… Build standalone pilet
  • βœ… Build pilet manifest file
  • βœ… Publish pilet (to temp. feed)
  • βœ… Validate pilet
  • βœ… Change pilet while debugging (reinject pilet)
  • ⏸️ Upgrade pilet from older sample-piral to current
  • βœ… Check pilet with debugging API (e.g., for piral-inspector)

The publish pilet command uses:

pilet publish --api-key {key} --url https://feed.piral.cloud/api/v1/pilet/temp --fresh

It also can perform against a feed hosted by the sample-pilet-service.

Enviroment variables

ENVDescriptionDefault
CLI_VERSIONVersion of the piral-cli packagelatest
BUNDLER_PLUGINThe name of the bundler to use
BUNDLER_FEATURESThe features of the bundler pluginall

Available features:

  • codegen, can handle *.codegen files
  • splitting, can handle import() calls with a new JS side-bundle
  • pilet.v0, supports the v0 schema
  • pilet.v1, supports the v1 schema
  • pilet.v2, supports the v2 schema
  • pilet.v3, supports the v3 schema
  • pilet.mf, supports the mf schema
  • importmap.ref, supports usage of an importmap
  • importmap.local, supports local creation of importmap side-bundles
  • build.pilet, supports building a pilet
  • build.piral, supports building a Piral instance
  • debug.pilet, supports debugging a pilet
  • debug.piral, supports debugging a Piral instance
  • hmr, supports hot module reloading (for Piral instances)

License

Piral is released using the MIT license. For more information see the license file.

1.0.0

5 months ago

1.0.0-pre.77

5 months ago

0.15.0-pre.69

5 months ago

0.15.0-pre.68

5 months ago

0.15.0-pre.66

12 months ago

0.15.0-pre.65

12 months ago

0.15.0-pre.64

12 months ago

0.15.0-pre.63

12 months ago

0.15.0-pre.62

12 months ago

0.15.0

12 months ago

0.14.1-pre.56

2 years ago

0.14.1-pre.58

2 years ago

0.14.1-pre.59

2 years ago

0.14.1

2 years ago

0.14.0-pre.51

2 years ago

0.14.1-pre.52

2 years ago

0.14.0-pre.32

2 years ago

0.14.0-pre.12

2 years ago

0.14.0-pre.37

2 years ago

0.14.0-pre.26

2 years ago

0.14.0-pre.36

2 years ago

0.14.0-pre.49

2 years ago

0.14.0-pre.27

2 years ago

0.14.0-pre.18

2 years ago

0.14.0

2 years ago

0.14.0-pre.9

2 years ago

0.14.0-pre.8

2 years ago

0.14.0-pre.7

2 years ago

0.14.0-pre.6

2 years ago

0.14.0-pre.5

2 years ago

0.14.0-pre.4

2 years ago

0.14.0-pre.3

2 years ago