Add MockAlertApi and MockFeatureFlagsApi to frontend-test-utils
Introduces comprehensive mock implementations for AlertApi and FeatureFlagsApi in @backstage/frontend-test-utils, following the 3-pattern approach (function, factory, mock) for consistency with existing test utilities. The new mocks include useful testing methods: - MockAlertApi: clearAlerts(), waitForAlert(), getAlerts() - MockFeatureFlagsApi: getState(), setState(), clearState() Also adds a mockApis namespace that provides these new mocks and re-exports existing mockApis from @backstage/test-utils for backwards compatibility. Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -3961,9 +3961,11 @@ __metadata:
|
||||
"@backstage/version-bridge": "workspace:^"
|
||||
"@testing-library/jest-dom": "npm:^6.0.0"
|
||||
"@types/react": "npm:^18.0.0"
|
||||
"@types/zen-observable": "npm:^0.8.0"
|
||||
react: "npm:^18.0.2"
|
||||
react-dom: "npm:^18.0.2"
|
||||
react-router-dom: "npm:^6.30.2"
|
||||
zen-observable: "npm:^0.10.0"
|
||||
zod: "npm:^3.25.76"
|
||||
peerDependencies:
|
||||
"@testing-library/react": ^16.0.0
|
||||
|
||||
Reference in New Issue
Block a user