frontend-plugin-api: update ExtensionBoundary test + switch to extensionId
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -83,15 +83,18 @@ describe('ExtensionBoundary', () => {
|
||||
),
|
||||
).render();
|
||||
|
||||
await waitFor(() =>
|
||||
expect(analyticsApiMock.getEvents()[0]).toMatchObject({
|
||||
await waitFor(() => {
|
||||
const event = analyticsApiMock
|
||||
.getEvents()
|
||||
.find(e => e.subject === subject);
|
||||
|
||||
expect(event).toMatchObject({
|
||||
action,
|
||||
subject,
|
||||
context: {
|
||||
extension: 'test',
|
||||
routeRef: 'unknown',
|
||||
extensionId: 'test',
|
||||
},
|
||||
}),
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -59,7 +59,7 @@ export function ExtensionBoundary(props: ExtensionBoundaryProps) {
|
||||
|
||||
// Skipping "routeRef" attribute in the new system, the extension "id" should provide more insight
|
||||
const attributes = {
|
||||
extension: node.spec.id,
|
||||
extensionId: node.spec.id,
|
||||
pluginId: node.spec.source?.id,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user