Files
teleport/pnpm-workspace.yaml
T
Ryan ClarkandMaja Cieślak 6266cd9eba Auto detect fixture usage in E2E tests, supporting changes for running enterprise e2e tests (#65141)
* Auto detect fixture usage in tests

* Changes to runner for enabling e e2e tests

* Only detect fixtures in test/UI/debug modes

* Make scanning more resilient - require test.use, allow for multiple lines

* Fix e2e/runner CI generate check

* Make scanning context aware to match with running individual tests

* Log enabled fixtures on one line

* Rename gen-fixtures, move go gen to main.go

* Return an error if no tests are matched

* gen-ts-fixtures: Use text/template instead of manually writing to buf

* Ignore generated fixtures.ts instead of formatting it

* Fix pnpm lockfile patching for when e/e2e is missing

* Simplify test running mode detection for scanning fixtures

* go generate

* Remove codegen from test run logic

* Handle run.sh receiving e/e2e directly

* Allow for fixtures to be enabled manually through flags

* Fix logging of enabled fixtures to include the ones set by flags

* Handle inline comments

* Update cmd in generated file

* Only pnpm install if teleport/connect needs building

* Error if UI mode is invoked with connect tests

* Handle errors better when checking if a binary exists

* Add info to the README about manually enabling fixtures

* Debug -> Warn

* Add test files to --ui

* Handle comments in strings properly

* Remove connect TSH from pnpm install logic

* Ignore flags in run.sh

* Handle double quotes just in case

* Add line number back

* Handle commented out imports

* Always include host.docker.internal in the certs

* Only scan fixtures in test mode/when test files are specified

* Make e2e/run.sh work with absolute paths to e/ tests

* Scan fixtures when running tests but not in UI mode

---------

Co-authored-by: Maja Cieślak <maja.cieslak@goteleport.com>
2026-04-03 12:57:18 +00:00

52 lines
2.4 KiB
YAML

packages:
- web/packages/*
- e/web/*
- e2e
- e/e2e
onlyBuiltDependencies:
- '@swc/core'
- cbor-extract
- electron
- esbuild
- msw
- node-pty
- protobufjs
- unrs-resolver
ignoredBuiltDependencies:
# Imported by jsdom-testing-mocks but not needed by us.
- puppeteer
# Without this, electron-builder will pull in electron-builder-squirrel-windows (which we don't need)
# and that dep will in turn pull electron-winstaller (which we also don't need). pnpm will then
# start complaining that electron-winstaller is not in onlyBuiltDependencies.
#
# We could instead solve this by adding electron-winstaller to ignoredBuiltDependencies, but why
# pull in deps that we don't use? Ultimately, the problem is that electron-builder-squirrel-windows
# is defined as a peer dep of one of electron-builder deps, while in reality it's more like an
# optional dep.
autoInstallPeers: false
# strictPeerDependencies cannot be set to true. Dependabot updates deps one-by-one and runs `pnpm
# install` after each update. With this option set to true, that command is likely to fail when
# updating a dep without updating its peer deps at the same time.
strictPeerDependencies: false
peerDependencyRules:
ignoreMissing:
# This dep is needed only when using Squirrel.Windows as an installer in electron-build which we
# don't use. https://www.electron.build/squirrel-windows.html
- electron-builder-squirrel-windows
# shellEmulator enables cross-platform scripting, allowing POSIX-style shell variables to work on Windows.
shellEmulator: true
# packageImportMethod avoids an issue building the web UI in docker on mac. It does not seem to
# affect performance outside of docker.
# https://github.com/gravitational/teleport/issues/46019
packageImportMethod: clone-or-copy
patchedDependencies:
# Needed for roundRect support which was merged to jest-canvas-mock but not released.
jest-canvas-mock@2.5.2: web/patches/jest-canvas-mock@2.5.2.patch
# Do not install packages released less than 2 days (2880 minutes) ago
minimumReleaseAge: 2880
overrides:
# styled-components hardcodes specific version of csstype. Our design package also pulls in
# csstype. Unfortunately, it looks like types from 3.1.3 are incompatible with 3.2.3. Since this
# is a types-only package, we override it to 3.2.3 so that it matches the version from design.
"styled-components@6.1.19>csstype@3.1.3": "^3.2.3"