9a3e7a2f50
- switch root package manager to pnpm 10.33.4 via packageManager field - add .npmrc with node-linker=hoisted for RN/Expo compatibility - convert yarn resolutions to pnpm.overrides; pin psl@1.9.0 and @types/psl@1.1.1 to keep types resolving under exports-aware resolution - pin react-compiler-runtime and babel-plugin-react-compiler to real rc.3 (the deprecated "Wrong version name was published" tag would otherwise resolve) - add pnpm.onlyBuiltDependencies allowlist for @sentry/cli, core-js-pure, esbuild, unrs-resolver - regenerate pnpm-lock.yaml; delete yarn.lock; drop postinstall-postinstall - update all workflows, Dockerfile, Dockerfile.embedr (root-level), Makefile, conductor.json; bskyembed/bskylink/bskyogcard/dev-env stay on yarn - update docs (CLAUDE.md, docs/build.md, docs/testing.md, docs/localization.md, bskyweb/README.md, scripts/push-notification/README.md, BlueskyClip/README.md) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
38 lines
2.0 KiB
Markdown
38 lines
2.0 KiB
Markdown
# Testing instructions
|
|
|
|
Make sure you've copied `.env.example` to `.env.test` and provided any required
|
|
values.
|
|
|
|
Install dependencies in `/dev-env`
|
|
|
|
```
|
|
cd dev-env && yarn
|
|
```
|
|
|
|
## Using Maestro
|
|
|
|
1. Install Maestro by following [these instructions](https://maestro.mobile.dev/getting-started/installing-maestro). This will help us run the E2E tests.
|
|
2. You can write Maestro tests in `/.maestro/flows/` directory by creating a new `.yml` file or by modifying an existing one.
|
|
3. You can also use [Maestro Studio](https://maestro.mobile.dev/getting-started/maestro-studio) which automatically generates commands by recording your actions on the app. Therefore, you can create realistic tests without having to manually write any code. Use the `maestro studio` command to start recording your actions.
|
|
|
|
### Running on Android
|
|
|
|
You will need to allow your device access to the port that the mock server is running on.
|
|
|
|
```
|
|
adb reverse tcp:3000 tcp:3000
|
|
```
|
|
|
|
### Running Maestro tests
|
|
|
|
- In one tab, run `pnpm e2e:mock-server`
|
|
- In a second tab, run `pnpm e2e:build`
|
|
- In a third tab, run `pnpm e2e:run`
|
|
|
|
## Using Flashlight for Performance Testing
|
|
1. Make sure Maestro is installed (optional: only for automated testing) by following the instructions above
|
|
2. Install Flashlight by following [these instructions](https://docs.flashlight.dev/)
|
|
3. The simplest way to get started is by running `pnpm perf:measure` which will run a live preview of the performance test results. You can [see a demo here](https://github.com/bamlab/flashlight/assets/4534323/4038a342-f145-4c3b-8cde-17949bf52612)
|
|
4. The `pnpm perf:test:measure` will run the `scroll.yaml` test located in `__e2e__/maestro/scroll.yaml` and give the results in `.perf/results.json` which can be viewed by running `pnpm perf:results`
|
|
5. You can also run your own tests by running `pnpm perf:test <path_to_test>` where `<path_to_test>` is the path to your test file. For example, `pnpm perf:test __e2e__/maestro/scroll.yaml` will run the `scroll.yaml` test located in `__e2e__/maestro/scroll.yaml`.
|