While working on e2e tests in the angular directory, I encountered a few documentation issues in the ionic-framework repo (not docs) that made the local development workflow more difficult to follow.
-
The "See Ionic's E2E testing guide" link in CONTRIBUTING.md resolves to a 404 when viewed from GitHub's Contributing tab because the relative path is not resolved correctly.
-
The Angular testing guide (docs/angular/testing.md) seems to omits some steps that are necessary to successfully test local framework changes, including:
- Removing existing
npm link relationships before starting a new sync cycle.
- Building
packages/angular-server each time.
- Installing Playwright browser dependencies before running Playwright tests for the first time.
This is the workflow that I used to sync my changes consistently to while working on a test in form.spec.ts:
`0. Make sure there are no lingering npm links
npm unlink *
-
Build @ionic/core
cd core && npm install && npm run build && cd ..
-
Build @ionic/angular
cd packages/angular && npm install && npm run build && cd ../..
-
Build @ionic/angular-server
cd packages/angular-server && npm install && npm run build && cd ../..
-
Merge base + ng20 into the build directory
cd packages/angular/test && ./build.sh ng20
-
Install test app dependencies
cd build/ng20 && npm install
-
Install local builds via pack
npm run sync
-
Install Playwright browsers (first time only)
npx playwright install chromium
-
Run the specific test
npx playwright test e2e/src/lazy/form.spec.ts
`
While working on e2e tests in the angular directory, I encountered a few documentation issues in the ionic-framework repo (not docs) that made the local development workflow more difficult to follow.
The "See Ionic's E2E testing guide" link in
CONTRIBUTING.mdresolves to a 404 when viewed from GitHub's Contributing tab because the relative path is not resolved correctly.The Angular testing guide (
docs/angular/testing.md) seems to omits some steps that are necessary to successfully test local framework changes, including:npm linkrelationships before starting a new sync cycle.packages/angular-servereach time.This is the workflow that I used to sync my changes consistently to while working on a test in
form.spec.ts:`0. Make sure there are no lingering npm links
npm unlink *
Build @ionic/core
cd core && npm install && npm run build && cd ..
Build @ionic/angular
cd packages/angular && npm install && npm run build && cd ../..
Build @ionic/angular-server
cd packages/angular-server && npm install && npm run build && cd ../..
Merge base + ng20 into the build directory
cd packages/angular/test && ./build.sh ng20
Install test app dependencies
cd build/ng20 && npm install
Install local builds via pack
npm run sync
Install Playwright browsers (first time only)
npx playwright install chromium
Run the specific test
npx playwright test e2e/src/lazy/form.spec.ts
`