
Security News
PolinRider: North Korea-Linked Supply Chain Campaign Expands Across Open Source Ecosystems
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.
@trackunit/iris-app-e2e
Advanced tools
> [!WARNING] > **Deprecated — Cypress E2E is being replaced by Playwright.** > > `@trackunit/iris-app-e2e` (Cypress) is **deprecated** in favour of > [`@trackunit/iris-app-playwright`](../iris-app-playwright/README.md) (Playwright). > All Trackunit-intern
[!WARNING] Deprecated — Cypress E2E is being replaced by Playwright.
@trackunit/iris-app-e2e(Cypress) is deprecated in favour of@trackunit/iris-app-playwright(Playwright). All Trackunit-internal suites have been migrated. The package remains fully functional during a grace period so external IrisX-app developers can migrate on their own schedule — nothing has been removed.
- New projects: use
@trackunit/iris-app-playwrightand the@trackunit/iris-app-playwright:playwright-configurationgenerator.- Existing Cypress suites: see the migration guide.
- Removal: the shared Cypress plumbing will only be removed in a separate, future issue after the grace period ends. Watch this README and the external developer channels for the grace-period end date.
A comprehensive E2E testing utilities library for Trackunit's Iris platform. This package provides reusable Cypress commands, setup utilities, and configuration helpers to streamline E2E testing for both internal and external developers.
This library is exposed publicly for use in the Trackunit Iris App SDK.
To browse all available components visit the Design System.
For more info and a full guide on Iris App SDK Development, please visit our Developer Hub.
npm install @trackunit/iris-app-e2e --save-dev
This package requires the following peer dependencies:
npm install cypress @testing-library/cypress --save-dev
getByTestId - Enhanced data-testid selector with timeout optionslogin - Automated login with support for multiple user fixturesswitchToLocalDevMode - Switch to local development mode in Iris SDK portalenterIrisApp - Navigate into Iris app iframes for testingenterStorybookPreview - Access Storybook preview iframesgetValidateFeatureFlags - Set up feature flag validation interceptsconfigCat - Retrieve ConfigCat feature flag statessetupE2E - Complete E2E test environment setupsetupHarRecording - HAR file recording for failed testsdefaultCypressConfig - Configurable Cypress configurationsetupPlugins - Plugin setup with logging and HAR generationCreate a cypress/support/e2e.ts file:
// Import browser-only utilities from /support (NOT the base path)
import { setupDefaultCommands, setupE2E } from '@trackunit/iris-app-e2e/support';
// Set up E2E environment
setupE2E();
// Register custom commands
setupDefaultCommands();
Create a cypress.config.ts file:
import { defineConfig } from 'cypress';
import { defaultCypressConfig, setupPlugins } from '@trackunit/iris-app-e2e';
import { install } from '@neuralegion/cypress-har-generator';
import { format, resolveConfig } from 'prettier';
export default defineConfig({
e2e: {
...defaultCypressConfig(__dirname),
setupNodeEvents(on, config) {
setupPlugins(
on,
config,
{ format, resolveConfig }, // Prettier formatter
install // HAR generator installer
);
}
}
});
import { defineConfig } from 'cypress';
import { defaultCypressConfig, setupPlugins } from '@trackunit/iris-app-e2e';
import { install } from '@neuralegion/cypress-har-generator';
import { format, resolveConfig } from 'prettier';
export default defineConfig({
e2e: {
...defaultCypressConfig({
// Optional: Custom configuration
behaviorConfig: {
defaultCommandTimeout: 30000,
retries: { runMode: 2, openMode: 0 }
}
}),
setupNodeEvents(on, config) {
setupPlugins(
on,
config,
{ format, resolveConfig }, // Prettier formatter
install // HAR generator installer
);
}
}
});
describe('Iris App E2E Tests', () => {
it('should login and navigate to app', () => {
// Login with default user
cy.login();
// Or login with specific fixture
cy.login('managere2e-admin');
// Find elements by test ID
cy.getByTestId('navigation-menu').should('be.visible');
// Switch to local development mode
cy.switchToLocalDevMode();
// Enter an Iris app iframe
cy.enterIrisApp().then(app => {
app().getByTestId('app-content').should('exist');
});
});
it('should check feature flags', () => {
cy.getValidateFeatureFlags();
cy.configCat('my-feature-flag').then(isEnabled => {
if (isEnabled) {
cy.getByTestId('feature-content').should('be.visible');
}
});
});
});
interface E2EConfigOptions {
nxRoot?: string; // NX workspace root (auto-detected)
outputDirOverride?: string; // Custom output directory
projectConfig?: E2EProjectConfig; // Project-specific settings
behaviorConfig?: E2EBehaviorConfig; // Timeout and retry settings
pluginConfig?: E2EPluginConfig; // Output path configuration
}
NX_FEATURE_BRANCH_BASE_URL - Override base URL for testingNX_E2E_OUTPUT_DIR - Custom E2E output directoryThe library uses Trackunit's standard authentication flow:
/env endpointSupported user fixture files:
auth (default)Example fixture file (cypress/fixtures/auth.json):
{
"username": "test@example.com",
"password": "your-password"
}
Tests run against the same Trackunit infrastructure:
/env endpointSet the base URL via Cypress configuration or environment variables to target different environments (staging, production, etc.).
Failed tests automatically generate HAR files for debugging:
The package includes comprehensive TypeScript definitions for all Cypress commands and configuration options. Your IDE will provide full autocomplete and type checking.
@trackunit/iris-app-playwright provides the same fixtures and helpers for Playwright-based E2E tests. Both libraries are supported; teams opt in to Playwright on their own schedule and both e2e (Cypress) and e2e-pw (Playwright) targets can coexist in the same project.
At this point this library is only developed by Trackunit Employees. For development related information see the development readme.
This package was developed by Trackunit ApS. Trackunit is the leading SaaS-based IoT solution for the construction industry, offering an ecosystem of hardware, fleet management software & telematics.
FAQs
> [!WARNING] > **Deprecated — Cypress E2E is being replaced by Playwright.** > > `@trackunit/iris-app-e2e` (Cypress) is **deprecated** in favour of > [`@trackunit/iris-app-playwright`](../iris-app-playwright/README.md) (Playwright). > All Trackunit-intern
The npm package @trackunit/iris-app-e2e receives a total of 103 weekly downloads. As such, @trackunit/iris-app-e2e popularity was classified as not popular.
We found that @trackunit/iris-app-e2e demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
PolinRider expands across npm, Packagist, Go modules, and Chrome extensions, using hidden loaders to target developer environments.

Security News
Open source attacks are accelerating as AI coding agents pull in dependencies faster, with less human review.

Research
/Security News
Malicious Chrome and Firefox extensions posed as free VPNs while stealing clipboard data through later extension updates.