Skip to content

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

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#7
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-md3 ready!

Name Link
🔨 Latest commit 888684f
🔍 Latest deploy log https://app.netlify.com/projects/ionic-theme-md3/deploys/6a3417ab74d8c50008407ec9
😎 Deploy Preview https://deploy-preview-7--ionic-theme-md3.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: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Playwright test results

passed  78 passed

Details

stats  78 tests across 1 suite
duration  1 minute, 34 seconds
commit  888684f
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-md3/pr-7/

github-actions Bot added a commit that referenced this pull request Jun 18, 2026
The demo resolves @rdlabo/ionic-theme-md3 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-md3/pr-7/

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-md3/pr-7/

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-md3/pr-7/

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-md3/pr-7/

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-md3/pr-7/

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-md3/pr-7/

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