Add Angular demo, test suites (Vitest + Playwright) and CI#1
Merged
Conversation
Implements the demo + tests steps of docs/next-steps-plan.md: - demos/angular: standalone Angular 19 app consuming the built artifacts via file: deps. Mirrors the vanilla demo through the directives and (opened)/(closed) outputs. Needs zone.js polyfill and preserveSymlinks (symlinked file: dep would otherwise load a second @angular/core copy). - packages/core: Vitest (happy-dom) unit tests with GSAP mocked (15 tests). - e2e: Playwright tests of the real animation against the vanilla demo. - packages/angular: Vitest + TestBed tests of the service and directives, exercised via runInInjectionContext (12 tests). - CI: GitHub Actions running build + unit + e2e + Angular demo build. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the demo Angular and tests steps of
docs/next-steps-plan.md(everything exceptnpm publish).What's included
Demo Angular (
demos/angular/)bootstrapApplication) that consumes the built artifacts viafile:deps (pretty-modal→ core,pretty-modal-angular→ itsdist), so it validates the real published surface (APF, peer deps, directives + outputs).[prettyModal]dialogs,[prettyModalClose], and(opened)/(closed)outputs.file:resolves thedistinstead of symlinking the source.polyfills: ["zone.js"]andpreserveSymlinks: true— without the latter the symlinkedfile:dep pulls a second@angular/corecopy (the workspace-hoisted one), causingNG0203.demo:angular,build:demo:angular.Tests
packages/core): GSAP mocked; covers open/close, shareddata-flip-id, reentrancy guard, reduced-motion,destroy(), SSR withoutdocument.e2e/): real animation in Chromium against the vanilla demo — opening/closing classes, mid-flight transform,anchor:'origin'positioning,prefers-reduced-motion.packages/angular): service and directives exercised viarunInInjectionContext(no AnalogJS). CoversrunOutsideAngular, SSR (PLATFORM_ID='server'doesn't instantiate the core), anchor/dialog resolution, and output emission.CI (
.github/workflows/ci.yml)Node 22:
npm ci→ build core + angular →npm test→ Playwright chromium →test:e2e→ install + build the Angular demo.Verification
npm test: 15 (core) + 12 (angular) passing.npm run test:e2e: 4 passing.ng servewith open/close + outputs working, 0 console errors.Out of scope
npm publishof both packages — intentionally not done.