Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@luigi-project/testing-utilities

SAP12.9kApache-2.02.22.1TypeScript support: included

Luigi testing utilities for standalone testing of microfrontends

luigi, UI, extensibility, micro-frontends, microfrontends, testing

readme

Build Status REUSE status

Luigi

Luigi logo

Description

Luigi is a micro frontend JavaScript framework that enables you to create an administrative user interface driven by local and distributed views. Luigi allows a web application to communicate with the micro frontends which the application contains. To make sure the communication runs smoothly, you can easily configure the settings such as routing, navigation, authorization, and user experience elements.

Luigi consists of Luigi Core application and Luigi Client libraries. They establish secure communication between the core application and the micro frontend using postMessage API.

Read the Getting started guide to learn more about micro frontends and the structure of Luigi.

Requirements

Luigi can run on any operating system and there are no specific requirements for installing it.

Download and installation

Follow the instructions in this document to install Luigi Core. Read this document to install the Luigi Client.

Usage

Examples

View the application examples to explore Luigi's features.

Go to the Luigi Fiddle site to see Luigi in action and configure a sample application.

Documentation

For details, see Luigi documentation.

Development

Development guidelines for micro frontend developers

For security reasons, follow these guidelines when developing a micro frontend:

  • Make the micro frontend accessible only through HTTPS.
  • Add Content Security Policies (CSPs).
  • Make the Access-Control-Allow-Origin HTTP header as restrictive as possible.
  • Maintain an allowlist with trusted domains and compare it with the origin of the Luigi Core application. The origin will be passed when you call the init listener in your micro frontend. Stop further processing if the origin does not match.

NOTE: Luigi follows these sandbox rules for iframes.

Code formatting for contributors

All projects in the repository use Prettier to format source code. Run the npm install command in the root folder to install it along with husky, the Git hooks manager. Both tools ensure proper codebase formatting before committing it.

Unit tests

To ensure that existing features still work as expected after your changes, run unit tests using the npm run test command in the core folder.

E2E tests

To ensure that existing features still work as expected after your changes, you need to run UI tests from the Angular example application. Before running the tests, you need to start our two test applications:

Once the applications are ready:

  • Run npm run e2e:open in the test/e2e-test-application folder to start tests in the interactive mode.
  • Run npm run e2e:run in the test/e2e-test-application folder to start tests in the headless browser.

Backward compatibility tests

Use these tests to ensure that applications written for previous versions of Luigi still work after Luigi gets updated with npm. Before running the tests, bundle Luigi by running npm run bundle in the main repository folder.

Install jq using the brew install jq command. It is required for the script to work, however, you can omit it if the command you are using to run your tests is tagged latest.

  • Run npm run test:compatibility in the main repository folder to start regression testing. The system will prompt you to select the previous version.
  • Run npm run test:compatibility -- --tag latest in the main repository folder to start regression testing with the last version preselected.
  • On the CI, run npm run test:compatibility -- --install --tag latest in the main repository folder to install dependencies, bundle Luigi and run the tests with the last version preselected.

How to obtain support

If you have further questions about Luigi, you can check the GitHub Discussions page or contact us on our Slack channel. If you find a specific problem or bug, you can also open a GitHub issue on our repository. Please describe the problem and the steps to reproduce it in your issue.

Contributing

Please refer to the CONTRIBUTING.md file in this repository for instructions on how to contribute to Luigi.

Licensing

Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.

changelog

Changelog

Note: All the versions not mentioned in the changelog file do not contain changes.

v2.22.1 (2025-05-23)

:bug: Fixed

v2.22.0 (2025-05-20)

:rocket: Added

v2.21.3 (2025-04-23)

:bug: Fixed

v2.21.2 (2025-03-21)

:bug: Fixed

v2.21.1 (2025-03-04)

:bug: Fixed

v2.21.0 (2025-02-27)

:rocket: Added

:bug: Fixed

v2.20.0 (2025-02-18)

:rocket: Added

:bug: Fixed

v2.19.2 (2025-01-16)

:bug: Fixed

  • #4114 switch visibility of usersettings entry after prep of all data (@hardl)

v2.19.1 (2025-01-16)

:bug: Fixed

  • #4110 Fix: usersettings profile entry when set in afterInit (@hardl)
  • #4102 Fix: iconClassAttribute for sap-icons (@hardl)

v2.19.0 (2024-12-23)

:rocket: Added

  • #4078 Mitigation of potential backwards compatibility issue (@hardl)
  • #4077 getCurrentRoute in web component client api (@hardl)

v2.18.3 (2024-12-17)

:bug: Fixed

v2.18.2 (2024-12-16)

:bug: Fixed

v2.18.1 (2024-11-29)

:bug: Fixed

v2.18.0 (2024-11-05)

:rocket: Added

v2.17.0 (2024-10-02)

:rocket: Added

:bug: Fixed

v2.16.0 (2024-09-27)

:rocket: Added

:bug: Fixed

v2.15.0 (2024-08-28)

:rocket: Added

v2.14.3 (2024-08-22)

:bug: Fixed

v2.14.2 (2024-08-01)

:bug: Fixed

v2.14.1 (2024-07-11)

:bug: Fixed

v2.14.0 (2024-07-03)

:rocket: Added

:bug: Fixed

v2.13.0 (2024-05-23)

:rocket: Added

:bug: Fixed

  • #3741 Fix left nav cat focus outline in condensed mode (@hardl)
  • #3733 Fix compound double rendering (@hardl)
  • #3722 Add webpack ignore comment to dynamic import in bundle (@hardl)

v2.12.0 (2024-05-03)

:rocket: Added

v2.11.0 (2024-04-19)

:rocket: Added

:bug: Fixed

v2.10.0 (2024-04-09)

:rocket: Added

:bug: Fixed

v2.9.0 (2024-02-13)

:rocket: Added

:bug: Fixed

  • #3623 Refactor testing-utilities and angular v17 support in client-support-angular library (@JohannesDoberer)

v2.8.0 (2024-01-23)

:rocket: Added

:bug: Fixed

v2.7.5 (2023-12-06)

:bug: Fixed

v2.7.4 (2023-12-04)

:bug: Fixed

  • #3554 Update modal settings after openNodeInModal (@JohannesDoberer)
  • #3553 Refresh modal width/height in DOM on modal settings update (@hardl)
  • #3552 Fix potential race condition in init phase of compound mfe (@hardl)

v2.7.3 (2023-11-30)

:bug: Fixed

v2.7.2 (2023-11-14)

:bug: Fixed

v2.7.1 (2023-10-27)

:bug: Fixed

v2.7.0 (2023-10-18)

:rocket: Added

:bug: Fixed

v2.6.3 (2023-10-05)

:rocket: Added

v2.6.2 (2023-09-26)

:bug: Fixed

  • #3450 detect configChangedRequest only on config changed (@hardl)

v2.6.1 (2023-09-22)

:bug: Fixed

v2.6.0 (2023-09-20)

:rocket: Added

:bug: Fixed

  • #3438 Fix wrong context in leftnav after update (@hardl)

v2.5.1 (2023-09-05)

:bug: Fixed

v2.5.0 (2023-08-31)

:rocket: Added

:bug: Fixed

v2.4.0 (2023-08-23)

:rocket: Added

v2.3.0 (2023-07-28)

:rocket: Added

:bug: Fixed

v2.2.1 (2023-05-26)

:bug: Fixed

v2.2.0 (2023-05-02)

:rocket: Added

:bug: Fixed

v2.1.0 (2023-03-30)

:rocket: Added

:bug: Fixed

v2.0.1 (2023-02-14)

:bug: Fixed

v2.0.0 (2023-02-10)

:boom: Breaking Change

:rocket: Added

:bug: Fixed

v1.26.0 (2023-01-16)

:rocket: Added

:bug: Fixed

v1.25.1 (2022-10-04)

:bug: Fixed

v1.25.0 (2022-09-30)

:rocket: Added

:bug: Fixed

v1.24.0 (2022-07-15)

:rocket: Added

:bug: Fixed

v1.23.1 (2022-06-20)

:rocket: Added

:bug: Fixed

  • #2756 Fix getCurrentPath collision with buildPath (@hardl)

v1.23.0 (2022-06-17)

:rocket: Added

:bug: Fixed

v1.22.0 (2022-05-19)

:rocket: Added

  • #2704 Disable keyboard accessibility outside drawer and modal (@ndricimrr)
  • #2672 Disable keyboard accessibility on confirmation modal background elements (@ndricimrr)
  • #2642 Add functionality for allow attribute to be separated by semicolons (@viktorsperling)

:bug: Fixed

v1.21.0 (2022-04-07)

:rocket: Added

:bug: Fixed

v1.20.1 (2022-01-21)

:bug: Fixed

v1.20.0 (2021-12-23)

:rocket: Added

:bug: Fixed

v1.19.0 (2021-11-26)

:rocket: Added

:bug: Fixed

v1.18.1 (2021-11-08)

:bug: Fixed

v1.18.0 (2021-11-02)

:rocket: Added

:bug: Fixed

v1.17.0 (2021-10-12)

:rocket: Added

:bug: Fixed

v1.16.2 (2021-09-22)

:bug: Fixed

v1.16.1 (2021-09-09)

:rocket: Added

:bug: Fixed

v1.16.0 (2021-08-27)

:rocket: Added

:bug: Fixed

:house: Internal

v1.15.0 (2021-08-05)

:rocket: Added

:bug: Fixed

v1.14.3 (2021-07-21)

:bug: Fixed

v1.14.2 (2021-07-15)

:bug: Fixed

v1.14.1 (2021-07-14)

:bug: Fixed

v1.14.0

:rocket: Added

:bug: Fixed

v1.13.0

:boom: Breaking Change

:rocket: Added

:bug: Fixed

v1.12.1

:rocket: Added

:bug: Fixed

v1.12.0

:rocket: Added

:bug: Fixed

v1.11.0

:rocket: Added

v1.10.0

:rocket: Added

:bug: Fixed

v1.9.0

:boom: Breaking Change

:rocket: Added

:bug: Fixed

v1.8.1

:bug: Fixed

v1.8.0

:rocket: Added

:bug: Fixed

v1.7.1 :christmas_tree: :santa: :gift:

:rocket: Added

:bug: Fixed

v1.7.0 (2020-12-04)

:rocket: Added

:bug: Fixed

:house: Internal

  • #1734 Documentation website using Luigi.globalSearch() API (#1690) (@legteodav)

v1.6.0

:rocket: Added

:bug: Fixed

v1.5.0

:rocket: Added

:bug: Fixed

v1.4.0

:rocket: Added

:bug: Fixed

v1.3.1

:bug: Fixed

  • #1514 Fix a border-radius bug in nested list for 'Select Environment' popover (@UlianaMunich)

v1.3.0

:rocket: Added

:bug: Fixed

With Luigi version v1.3.0, the new v0.10.0 of Fundamental Library Styles were included. As a result, there were breaking changes to the Luigi side navigation. You can see the updated layout here.

v1.2.4

:bug: Fixed

v1.2.3

:rocket: Added

:bug: Fixed

v1.2.2

  • Reverted release.

v1.2.1

:rocket: Added

:bug: Fixed

:memo: Documentation

v1.1.1

:rocket: Added

:bug: Fixed

:memo: Documentation

v1.1.0

:boom: Breaking Change

  • #1267 Following an upgrade to Fundamental Library Styles version 0.8.1, there were changes in the HTML structure. Some classes were renamed or removed completely. You can find the full list of Fundamental Library Styles changes here. (@marynaKhromova)

:rocket: Added

  • #1283 Translate tooltip text in semi collapsed mode and add title attributes to entries in left nav (@zarkosimic)
  • #1269 Oidc provider uses storage type also for oidc client configuration (@maxmarkus)
  • #1241 Update fundamental styles to 0.8.1 (@UlianaMunich)

:bug: Fixed

v1.0.1

:rocket: Added

:bug: Fixed

v1.0.0

:rocket: Added

:bug: Fixed

:memo: Documentation

v0.7.7

:bug: Fixed

:memo: Documentation

v0.7.6

:rocket: Added

:bug: Fixed

:memo: Documentation

v0.7.5

:rocket: Added

:bug: Fixed

v0.7.4

:rocket: Added

:bug: Fixed

:memo: Documentation

v0.7.3

:rocket: Added

:bug: Fixed

:memo: Documentation

v0.7.2

:rocket: Added

:bug: Fixed

:memo: Documentation

v0.7.1

:rocket: Added

:bug: Fixed

  • #931 The goBack context is not delivered to preserved view (@pekura)
  • #916 Backdrop not covering split-view micro frontend (@pekura)

v0.7.0

:rocket: Added

:rocket: Fixed

:memo: Documentation

v0.6.6

:rocket: Fixed

  • #876 nodeAccessibilityResolver sometimes not re-applied on context switch (@pekura)

v0.6.5

:rocket: Added

:bug: Fixed

:memo: Documentation

v0.6.4

:rocket: Added

:bug: Fixed

v0.6.3

:rocket: Added

:memo: Documentation

v0.6.2

:rocket: Added

:bug: Fixed

:memo: Documentation

v0.6.1

:rocket: Added

:bug: Fixed

  • #741 Dynamic node and link/external link nodes as siblings (@pekura)

:memo: Documentation

  • #697 Callback documentation for LuigiClient.addInitListener (@maxmarkus)
  • #703 Product Switcher documentation and configurable label and icon (@maxmarkus)

v0.6.0

:rocket: Added

:bug: Fixed

:memo: Documentation

v0.5.4

:bug: Fixed

  • #708 Fix error on click on navigation node when node is active (@jesusreal)

v0.5.3

:rocket: Added

:memo: Documentation

v0.5.2

:rocket: Added

:bug: Fixed

v0.5.1

:bug: Fixed

  • #632 Remove side navigation footer when no footer text and no semi-collapsible navigation (@marynaKhromova)

:memo: Documentation

v0.5.0

:rocket: Added

:bug: Fixed

:memo: Documentation

v0.4.12

:rocket: Added

:bug: Fixed

:memo: Documentation

v0.4.11

:rocket: Added

:bug: Fixed

:memo: Documentation

v0.4.10

:bug: Fixed

v0.4.9

:bug: Fixed

v0.4.8 (2019-02-20)

:bug: Fixed

v0.4.7 (2019-02-08)

:rocket: Added

:bug: Fixed

v0.4.6 (2019-02-07)

:rocket: Added

:bug: Fixed

v0.4.5

:rocket: Added

:bug: Fixed

:memo: Documentation

v0.4.4

:rocket: Added

:bug: Fixed

:memo: Documentation

v0.4.3 - 2019-01-07

:bug: Fixed

v0.4.1 - 2018-12-27

:rocket: Added

:bug: Fixed

  • #307 Fix error with parsed data (@dariadomagala)
  • #301 Fix dropdowns behavior on click events (@dariadomagala)
  • #305 When adding a listener via Luigi Client API, call only the listener being added (@jesusreal)
  • #299 It is not possible to have a root node with empty path segment and a view (@pekura)
  • #283 Default child node mechanism breaks if path ends with a slash (@pekura)

:memo: Documentation

v0.4.0 - 2018-12-06

:rocket: Added

:bug: Fixed

:memo: Documentation

v0.3.8 - 2018-11-23

:rocket: Added

:bug: Fixed

:memo: Documentation

v0.3.7 - 2018-10-31

:rocket: Added

  • #169 Enable Luigi Client (micro frontend) to check whether a path exists in the main app (@jesusreal)

:bug: Fixed

  • #168 Fix bug for closest parent navigation on Luigi Client (@jesusreal)

:memo: Documentation

  • #138 Add details about navigation nodes and reading node parameters (@bszwarc)
  • #176 Update and improve the content of the installation guide (@bszwarc)
  • #161 Fix small docu bugs (@jesusreal)

v0.3.6 - 2018-10-23

:rocket: Added

:bug: Fixed

:memo: Documentation

v0.3.5 - 2018-09-26

:rocket: Added

:bug: Fixed

:memo: Documentation

core-0.3.3 - 2018-09-14

:rocket: Added

  • #67 Navigation node visibility with custom nodeAccessibilityResolver (@maxmarkus)

:bug: Fixed

:memo: Documentation

client-0.3.2 - 2018-09-10

:rocket: Added

core-0.3.1 - 2018-09-07

:bug: Fixed

  • #31 Redirect from root node to first child (@y-kkamil)
  • #50 #49 [fix] OAuth2 implicit grant flow should use GET as default reques… (@aartek)

core-0.3.0 - 2018-09-05

:rocket: Added

  • Preserve view and go back feature.
  • Default child nodes feature.
  • Support for url parameters.
  • Add vue.js example app by @DamianLion
  • On angular example app, update angular version from version 5 to 6.
  • On angular example app, introduce fundamental-ui css framework.
  • Backdrop functionality can now be disabled via Luigi Config object.
  • Add error message for missing Luigi Config.
  • Improvements on authorization, remove login button, trigger auth flow on page load.
  • Add documentation.

Changed

  • 'hideNav' flag to disable top and left navigations is called now "hideNavigation" and is under "settings".
  • 'isHashRoute' flag to activate hash routing is moved to Luigi Config object under 'settings' and is called now 'useHashRouting'.
  • Luigi Config is now under "window.Luigi.config" instead of "window.LuigiConfig" and "setConfig" and "getConfig" helper methods are available.

:bug: Fixed

  • On angular example app, fix path routing issues by simplifying app chunks split.
  • On backdrop functionality, fix some small visual errors.

client-0.3.0 - 2018-09-05

:rocket: Added

  • Support for url parameters.
  • Add documentation.

:bug: Fixed

  • Prevent reloading of whole browser window when navigating with hash routing and only hash changes.

0.2.1 - 2018-07-24

:rocket: Added

  • Core: Angular example application.
  • Core: Hash-based and path-based routing.
  • Core: Navigation setup.
  • Core: Support authorization via Open ID Connect (OIDC) or OAuth2 Implicit Grant.
  • Core: Navigation on top and left (can be disabled via Luigi Config object).
  • Core: Backdrop functionality.
  • Core: Authorization.
  • Client: Lifecycle functions.
  • Client: Link manager for navigation.
  • Client: UX manager for backdrop.