Skip to content

fix(demo): make demo tests pass and run them in CI#106

Merged
rdlabo merged 7 commits into
mainfrom
fix/demo-tests-ci
Jun 18, 2026
Merged

fix(demo): make demo tests pass and run them in CI#106
rdlabo merged 7 commits into
mainfrom
fix/demo-tests-ci

Conversation

@rdlabo

@rdlabo rdlabo commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

概要

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.tsHealthPageDocsPage に修正
  • .github/workflows/lint.ymllint ジョブに npm test -- --watch=false --browsers=ChromeHeadless を追加

確認

  • ローカルで Executed 31 of 31 SUCCESS

🤖 Generated with Claude Code


Open in Devin Review

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
@netlify

netlify Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploy Preview for ionic-theme-ios26 ready!

Name Link
🔨 Latest commit 9910f81
🔍 Latest deploy log https://app.netlify.com/projects/ionic-theme-ios26/deploys/6a3417af4bcd9e0008df50cd
😎 Deploy Preview https://deploy-preview-106--ionic-theme-ios26.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

Comment thread .github/workflows/lint.yml Outdated
Comment on lines +42 to +43
- run: npm test -- --watch=false --browsers=ChromeHeadless
working-directory: './demo'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 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.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Playwright test results

passed  86 passed

Details

stats  86 tests across 1 suite
duration  1 minute, 47 seconds
commit  9910f81
info  Please check the workflow run for details. And if you want to update the screenshots, please comment with /update-screenshots.

@github-actions

Copy link
Copy Markdown
Contributor

📊 Playwright Test Report

View the detailed test report: https://rdlabo-team.github.io/ionic-theme-ios26/pr-106/

github-actions Bot added a commit that referenced this pull request Jun 18, 2026
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
@github-actions

Copy link
Copy Markdown
Contributor

📊 Playwright Test Report

View the detailed test report: https://rdlabo-team.github.io/ionic-theme-ios26/pr-106/

github-actions Bot added a commit that referenced this pull request Jun 18, 2026
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
@github-actions

Copy link
Copy Markdown
Contributor

📊 Playwright Test Report

View the detailed test report: https://rdlabo-team.github.io/ionic-theme-ios26/pr-106/

github-actions Bot added a commit that referenced this pull request Jun 18, 2026
- 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>
@github-actions

Copy link
Copy Markdown
Contributor

📊 Playwright Test Report

View the detailed test report: https://rdlabo-team.github.io/ionic-theme-ios26/pr-106/

github-actions Bot added a commit that referenced this pull request Jun 18, 2026
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
@github-actions

Copy link
Copy Markdown
Contributor

📊 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
@github-actions

Copy link
Copy Markdown
Contributor

📊 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
@github-actions

Copy link
Copy Markdown
Contributor

📊 Playwright Test Report

View the detailed test report: https://rdlabo-team.github.io/ionic-theme-ios26/pr-106/

github-actions Bot added a commit that referenced this pull request Jun 18, 2026
@rdlabo rdlabo merged commit abfb157 into main Jun 18, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant