Updated tests across the repository to use the new `apis` option with
`renderInTestApp` and `createExtensionTester` instead of wrapping
components with `TestApiProvider`. This simplifies tests and demonstrates
the use of the new API override functionality.
Updated test files:
- packages/frontend-plugin-api/src/components/ExtensionBoundary.test.tsx
- packages/frontend-plugin-api/src/blueprints/AppRootElementBlueprint.test.tsx
- plugins/catalog/src/alpha/pages.test.tsx
Total: 15 test cases migrated
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Added support for API overrides in `createExtensionTester` and
`renderInTestApp` to allow tests to override specific APIs without
requiring wrapper components. This provides app-level API overrides
that are available throughout the entire extension tree.
The `apis` option follows the same typing pattern as `TestApiProvider`
from `@backstage/test-utils` for consistency and type safety.
Example usage:
```typescript
const tester = createExtensionTester(MyExtension, {
apis: [
[errorApiRef, mockErrorApi],
[analyticsApiRef, mockAnalyticsApi],
],
});
renderInTestApp(<MyComponent />, {
apis: [
[errorApiRef, mockErrorApi],
[analyticsApiRef, mockAnalyticsApi],
],
});
```
This enables cleaner tests with app-level API overrides, eliminating
the need to wrap components with TestApiProvider in many cases.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Migrated DeleteEntityDialog and EntityOrphanWarning components from
Material UI to Backstage UI.
- DeleteEntityDialog now uses BUI Dialog, DialogHeader, DialogFooter,
and Button components
- EntityOrphanWarning now uses BUI Alert with an action button instead
of a clickable alert
- Updated translation: removed "Click here to delete" from description
- Added new translation key `deleteEntity.actionButtonTitle`
Signed-off-by: Johan Persson <johanopersson@gmail.com>
The @backstage/ui package has a custom build script that is not
recognized by `yarn backstage-cli repo build`, so it gets skipped.
This caused E2E tests to fail when packages import JavaScript
components from @backstage/ui.
Add explicit BUI build step to Linux and Windows E2E workflows,
matching the pattern already used in ci.yml and deploy_packages.yml.
Signed-off-by: Johan Persson <johanopersson@gmail.com>
Migrated UnregisterEntityDialog from Material UI to Backstage UI components.
- Replaced MUI Dialog, Button, Alert, Box with BUI equivalents
- Refactored to hook-based architecture with separate body components
- Added proper button loading states during async actions
- Extracted shared AdvancedDeleteAccordion component
- No breaking changes to public API
Signed-off-by: Johan Persson <johanopersson@gmail.com>