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>
Added changeset for the new integrationFor field affecting:
- CLI tooling (validation and types)
- Modules that declare cross-plugin integrations
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
- Added integrationFor field to BackstagePackageJson type
- Created fixIntegrationFor validator that ensures:
- Field is only used on module packages
- Value is an array of strings
- All entries are valid package names
- Added validator to the publish fixers list
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Added the integrationFor metadata field to modules that provide
integration for other plugins:
- catalog-backend-module-scaffolder-entity-model: integrates with scaffolder
- search-backend-module-catalog: indexes catalog for search
- search-backend-module-techdocs: indexes techdocs for search
- scaffolder-backend-module-notifications: sends scaffolder notifications
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Added documentation for the new backstage.integrationFor field to the
package metadata guide. This field enables cross-plugin module discovery
by declaring which packages a module provides integration for.
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This is a follow-up to the deprecation in #32521, completely removing
the Array variant from the ExtensionDefinitionAttachTo type.
The runtime still supports multiple attachment points for backward
compatibility, but new code will receive type errors.
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>