Skip to content

test(frontend): add spec for FlarumComponent#5584

Open
EmilySun621 wants to merge 1 commit into
apache:mainfrom
EmilySun621:test/flarum-component
Open

test(frontend): add spec for FlarumComponent#5584
EmilySun621 wants to merge 1 commit into
apache:mainfrom
EmilySun621:test/flarum-component

Conversation

@EmilySun621

Copy link
Copy Markdown

What changes were proposed in this PR?

Adds a behavior-focused unit test spec for FlarumComponent. Tests cover:

  • DomSanitizer call with "forum" URL at construction
  • SafeResourceUrl exposed as flarumUrl
  • iframe [src] binding

Any related issues, documentation, discussions?

Related to #5167

How was this PR tested?

Spec verified with npx ng test --watch=false --include='**/flarum.component.spec.ts'. 3 tests passing.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Anthropic)

Verifies that the component asks DomSanitizer to trust the "forum" resource URL
at construction time, exposes the sanitizer's SafeResourceUrl as flarumUrl, and
binds it to the iframe [src] in the template. Spies on the real DomSanitizer
rather than stubbing it so Angular's runtime accepts the SafeResourceUrl during
template rendering.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the frontend Changes related to the frontend GUI label Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant