test: add unit and integration tests for Backstage plugin#6
Merged
talissoncosta merged 1 commit intomainfrom Jan 20, 2026
Merged
test: add unit and integration tests for Backstage plugin#6talissoncosta merged 1 commit intomainfrom
talissoncosta merged 1 commit intomainfrom
Conversation
6 tasks
d39a8f7 to
f32c6e2
Compare
- Add CI workflow test job - Add unit tests for FlagsmithClient (12 tests) - Add unit tests for flagHelpers utilities (11 tests) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
f32c6e2 to
c22d37b
Compare
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.
Summary
Add comprehensive unit and integration tests for the Flagsmith Backstage plugin, plus GitHub Actions CI for running tests on every PR.
Closes #6424
Changes
CI/CD
yarn test --coverage --ci)Test Infrastructure
renderWithBackstage,createMockFetchApi) for consistent test setupUnit Tests
flagHelpers.ts):getFeatureEnvStatus,buildEnvStatusTooltip,calculateFeatureStats,paginateflagsmithTheme.ts):buildFlagUrl,buildProjectUrlURL buildersFlagsmithClient.ts): All methods with mocked fetch and error handlinguseFlagsmithProject,useFlagsmithUsagewith loading/success/error statesComponent Tests
LoadingState,MiniPagination,FlagStatusIndicator,FlagsmithLink,SearchInputFlagsTab,FlagsmithOverviewCard,FlagsmithUsageCardTest Coverage
Commits
ci: add test job to GitHub Actions workflowtest: add test fixtures and utilitiestest(utils): add unit tests for flagHelperstest(theme): add unit tests for flagsmithThemetest(api): add unit tests for FlagsmithClienttest(hooks): add unit tests for custom hookstest(components): add unit tests for shared componentstest(components): add integration tests for main componentsTest Plan
🤖 Generated with Claude Code