elastic/kibana

Expand feature registry validation test coverage

Open

#207,342 opened on Jan 21, 2025

View on GitHub
 (6 comments) (0 reactions) (1 assignee)TypeScript (8,021 forks)batch import
Team:Coregood first issue

Repository metrics

Stars
 (19,065 stars)
PR merge metrics
 (Avg merge 1d 16h) (999 merged PRs in 30d)

Description

In https://github.com/elastic/kibana/pull/202863#discussion_r1923664248 the registry had to be changed to accommodate replacing disabled privileges with disabled privileges, but this surfaced the fact that the existing test cases miss coverage for the following privilege replacement scenarios:

  • Disabled → Disabled privilege replacement
  • Disabled → Enabled privilege replacement

We currently only test that Enabled → Disabled is prevented

Tests are located in x-pack/platform/plugins/shared/features/server/feature_registry.test.ts

Contributor guide