Skip to content

test(elements, extras): adding more tests for additional coverage - #17829

Open
kdinev wants to merge 3 commits into
masterfrom
elements-extras-coverage
Open

kdinev wants to merge 3 commits into
masterfrom
elements-extras-coverage

Conversation

@kdinev

@kdinev kdinev commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Description

Adding test coverage to igniteui-angular-extras and igniteui-angular-elements.

  • igniteui-angular-elements - %95.13
  • igniteui-angular-extras - %99.07

Motivation / Context

Insufficient coverage

Type of Change (check all that apply):

  • Bug fix
  • New functionality
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation
  • Demos
  • CI/CD
  • Tests
  • Changelog
  • Skills/Agents

Component(s) / Area(s) Affected:

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

Test Configuration:

  • Angular version:
  • Browser(s):
  • OS:

Screenshots / Recordings

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them
  • Accessibility (ARIA, keyboard navigation, focus management) has been verified

Copilot AI 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.

🔵 Needs a closer look

Broad, timing-sensitive browser tests still require execution and human validation, and one teardown test needs correction.

1 open issue
What changed in this PR

Expands test coverage for Extras components and Angular Elements integration without changing production code.

Changes:

  • Adds chart, context-menu, and conditional-formatting tests.
  • Covers element registration, exporters, grid state, and icon broadcasting.
  • Extends template, lifecycle, property, and event integration tests.
File Description
projects/​igniteui-angular-extras/​src/​lib/​directives/​conditional-formatting/​conditional-formatting.directive.spec.ts Formatting values and ranges.
projects/​igniteui-angular-extras/​src/​lib/​directives/​chart-integration/​initializers.spec.ts Stacked chart initialization.
projects/​igniteui-angular-extras/​src/​lib/​directives/​chart-integration/​chart-integration.directive.spec.ts Container-based chart creation.
projects/​igniteui-angular-extras/​src/​lib/​context-menu/​igx-context-menu.directive.spec.ts Resize and selection handling.
projects/​igniteui-angular-extras/​src/​lib/​context-menu/​context-menu.component.spec.ts Menu rendering and dialog interactions.
projects/​igniteui-angular-extras/​src/​lib/​context-menu/​chart-dialog/​chart-dialog.component.spec.ts Chart dialog rendering and controls.
projects/​igniteui-angular-elements/​src/​utils/​register.spec.ts Element registration utilities.
projects/​igniteui-angular-elements/​src/​lib/​state.component.spec.ts Grid state serialization and restoration.
projects/​igniteui-angular-elements/​src/​lib/​icon.broadcast.service.spec.ts Broadcast messages and page lifecycle.
projects/​igniteui-angular-elements/​src/​lib/​exporters.spec.ts Exporter delegation.
projects/​igniteui-angular-elements/​src/​app/​wrapper/​wrapper.component.spec.ts Template context and lifecycle.
projects/​igniteui-angular-elements/​src/​app/​ng-element-strategy.spec.ts Inputs, outputs, projection, and teardown.
projects/​igniteui-angular-elements/​src/​app/​custom-strategy.spec.ts Grid events, properties, and hierarchical integration.
projects/​igniteui-angular-elements/​src/​app/​custom-strategy-deferred.spec.ts Deferred parent registration.
projects/​igniteui-angular-elements/​src/​app/​create-custom-element.spec.ts Custom-element API generation.

Review effort: Balanced

Comment thread projects/igniteui-angular-elements/src/app/custom-strategy.spec.ts
@kdinev
kdinev added this pull request to stack #17831 October 20, 2026 19:24
@kdinev
kdinev requested a balanced review from Copilot October 20, 2026 19:25

Copilot AI 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.

🔵 Needs a closer look

The deferred-registration test assumes isolation that the Elements test target does not enable, making it dependent on test-file execution order.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Test depends on isolated custom-element registry

projects/​igniteui-angular-elements/​src/​app/​custom-strategy-deferred.spec.ts:11

This test assumes a fresh custom-element registry, but the Elements test target (angular.json:452–471) does not enable isolation, and Angular's unit-test builder defaults isolate to false. The test:elements script does not override it. Both custom-strategy.spec.ts and register.spec.ts register igc-tree-grid, so this assertion fails if either runs first in the same browser context. Removing their DOM nodes does not unregister the element. Run this scenario with explicit isolation, or use uniquely named parent/child fixture elements with matching strategy configuration so the test does not depend on file order.

1 resolved since last review

Review effort: Balanced

@kdinev
kdinev force-pushed the elements-extras-coverage branch from 62beca6 to 168c83e Compare October 21, 2026 07:38
@kdinev
kdinev requested a review from damyanpetev October 21, 2026 08:11
@kdinev
kdinev force-pushed the elements-extras-coverage branch 2 times, most recently from 7090a19 to 39d3c90 Compare October 22, 2026 07:12
@kdinev
kdinev force-pushed the elements-extras-coverage branch from 39d3c90 to c57d3d3 Compare October 22, 2026 10:44

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants