fix(demo): make demo tests pass and run them in CI#106
Conversation
The docs-page.component.spec.ts imported a non-existent `HealthPage` class (renamed to `DocsPage`), which broke TypeScript compilation and aborted the whole karma run. Fix the spec and add a demo test step to the Lint workflow so this stays green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SC7MC8G2HgnXqR4rXr2ESN
✅ Deploy Preview for ionic-theme-ios26 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| - run: npm test -- --watch=false --browsers=ChromeHeadless | ||
| working-directory: './demo' |
There was a problem hiding this comment.
🚩 karma.conf.js references @angular-devkit/build-angular but it's not a dependency
The demo/karma.conf.js:7 declares frameworks: ['jasmine', '@angular-devkit/build-angular'], but @angular-devkit/build-angular is not listed in demo/package.json — only @angular/build is present as a devDependency. The angular.json test builder is @angular/build:karma. In Angular 21, @angular/build typically provides the karma framework plugin and may handle this transparently, but if the new CI test step fails, this mismatch would be the likely cause. This is a pre-existing issue, not introduced by this PR.
Was this helpful? React with 👍 or 👎 to provide feedback.
Playwright test resultsDetails
|
|
📊 Playwright Test Report View the detailed test report: https://rdlabo-team.github.io/ionic-theme-ios26/pr-106/ |
The demo resolves @rdlabo/ionic-theme-ios26 via `file:..` (a symlink to the repo root), whose built dist/ and peer deps (@ionic/core, @stencil/core) live in the root node_modules. dist/ is gitignored, so CI must run root `npm ci` + `npm run build` before the demo can compile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SC7MC8G2HgnXqR4rXr2ESN
|
📊 Playwright Test Report View the detailed test report: https://rdlabo-team.github.io/ionic-theme-ios26/pr-106/ |
Switch the demo to Angular 21's @angular/build:unit-test builder (Vitest runner, jsdom) so tests run in Node without a real browser. Replace the Jasmine spy APIs in the mocks with Vitest equivalents, add a vitest config that inlines the Ionic ESM packages, and drop the browser flag from CI. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SC7MC8G2HgnXqR4rXr2ESN
|
📊 Playwright Test Report View the detailed test report: https://rdlabo-team.github.io/ionic-theme-ios26/pr-106/ |
- Pin @playwright/test from ^1.57.0 to exact 1.58.2 - Update docker script references from v1.56.0-noble to v1.58.2-noble - Update package-lock.json (was resolving to 1.61.0) Co-Authored-By: rdlabo <sakakibara@rdlabo.jp>
|
📊 Playwright Test Report View the detailed test report: https://rdlabo-team.github.io/ionic-theme-ios26/pr-106/ |
Align the demo's non-@rdlabo ESLint setup to the fleet standard and unify dependency versions. Selector rules stay off (demo), no class-suffix / prefer-on-push added. - remove deprecated @rdlabo/rules/deny-constructor-di - complete the winecode off-rule set (no-empty-object-type, no-async-promise-executor, no-prototype-builtins, no-irregular-whitespace, no-unexpected-multiline) - versions: eslint ^9.39.4, @eslint/js ^9.39.4, typescript-eslint ^8.61.1, angular-eslint 21.4.0, @rdlabo/eslint-plugin-rules ^21.0.0 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ch5Dua6sbthgLJSbPAAENF
|
📊 Playwright Test Report View the detailed test report: https://rdlabo-team.github.io/ionic-theme-ios26/pr-106/ |
Regenerate the lockfile so `npm ci` matches package.json (CI was failing on missing chokidar@4/readdirp@4 entries). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ch5Dua6sbthgLJSbPAAENF
|
📊 Playwright Test Report View the detailed test report: https://rdlabo-team.github.io/ionic-theme-ios26/pr-106/ |
The lockfile is generated with npm 11.7 (node 24 latest); pinning CI to node 24.11.1 (npm 11.6.x) made `npm ci` reject it (Missing readdirp@4.1.2). Use node 24 (latest 24.x) so CI npm matches the committed lock. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ch5Dua6sbthgLJSbPAAENF
|
📊 Playwright Test Report View the detailed test report: https://rdlabo-team.github.io/ionic-theme-ios26/pr-106/ |
概要
demoの Angular ユニットテスト(31 spec)が実行できない状態だったため修正し、CI(Lint workflow)でも実行するようにしました。原因
demo/src/app/docs/docs-page.component.spec.tsが存在しないクラスHealthPageを import していた(実体はDocsPageにリネーム済み)。このため TypeScript コンパイルが失敗し(TS2305)、karma ビルダーがビルドごと中断して 31 spec が1件も実行できませんでした。変更
docs-page.component.spec.tsのHealthPageをDocsPageに修正.github/workflows/lint.ymlのlintジョブにnpm test -- --watch=false --browsers=ChromeHeadlessを追加確認
Executed 31 of 31 SUCCESS🤖 Generated with Claude Code