Rename AirbrakeWidget to EntityAirbrakeContent

Signed-off-by: Karan Shah <karan.shah@simplybusiness.co.uk>
This commit is contained in:
Karan Shah
2021-12-31 09:33:36 +00:00
parent cccee1da42
commit 5b4a983a7a
9 changed files with 19 additions and 19 deletions
+2 -2
View File
@@ -18,10 +18,10 @@ export const airbrakePlugin: BackstagePlugin<
{}
>;
// Warning: (ae-missing-release-tag) "AirbrakeWidget" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
// Warning: (ae-missing-release-tag) "EntityAirbrakeContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const AirbrakeWidget: () => JSX.Element;
export const EntityAirbrakeContent: () => JSX.Element;
// (No @packageDocumentation comment for this package)
```
+3 -3
View File
@@ -15,7 +15,7 @@
*/
import React from 'react';
import { createDevApp } from '@backstage/dev-utils';
import { AirbrakeWidget, airbrakePlugin } from '../src/plugin';
import { EntityAirbrakeContent, airbrakePlugin } from '../src/plugin';
import {
Content,
ContentHeader,
@@ -32,7 +32,7 @@ createDevApp()
<Page themeId="tool">
<Header
title="Airbrake demo application"
subtitle="Test the widget below"
subtitle="Test the plugin below"
>
<HeaderLabel label="Owner" value="Owner" />
<HeaderLabel label="Lifecycle" value="Alpha" />
@@ -43,7 +43,7 @@ createDevApp()
A description of your plugin goes here.
</SupportButton>
</ContentHeader>
<AirbrakeWidget />
<EntityAirbrakeContent />
</Content>
</Page>
),
@@ -15,13 +15,13 @@
*/
import React from 'react';
import { AirbrakeWidget } from './AirbrakeWidget';
import { EntityAirbrakeContent } from './EntityAirbrakeContent';
import exampleData from './example-data.json';
import { renderInTestApp } from '@backstage/test-utils';
describe('AirbrakeWidget', () => {
describe('EntityAirbrakeContent', () => {
it('renders all errors sent from Airbrake', async () => {
const table = await renderInTestApp(<AirbrakeWidget />);
const table = await renderInTestApp(<EntityAirbrakeContent />);
expect(exampleData.groups.length).toBeGreaterThan(0);
for (const group of exampleData.groups) {
expect(
@@ -27,7 +27,7 @@ const useStyles = makeStyles<BackstageTheme>(() => ({
},
}));
export const AirbrakeWidget = () => {
export const EntityAirbrakeContent = () => {
const classes = useStyles();
return (
+3 -3
View File
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AirbrakeWidget, airbrakePlugin } from './index';
import { EntityAirbrakeContent, airbrakePlugin } from './index';
describe('The Airbrake plugin index file', () => {
it('exports the plugin and page', async () => {
expect(AirbrakeWidget).toBeTruthy();
it('exports the plugin and content', async () => {
expect(EntityAirbrakeContent).toBeTruthy();
expect(airbrakePlugin).toBeTruthy();
});
});
+1 -1
View File
@@ -13,4 +13,4 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { airbrakePlugin, AirbrakeWidget } from './plugin';
export { airbrakePlugin, EntityAirbrakeContent } from './plugin';
+2 -2
View File
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import React from 'react';
import { airbrakePlugin, AirbrakeWidget } from './plugin';
import { airbrakePlugin, EntityAirbrakeContent } from './plugin';
import { renderInTestApp } from '@backstage/test-utils';
describe('Airbrake', () => {
@@ -23,7 +23,7 @@ describe('Airbrake', () => {
});
it('should render page', async () => {
const rendered = await renderInTestApp(<AirbrakeWidget />);
const rendered = await renderInTestApp(<EntityAirbrakeContent />);
expect(rendered.getByText('ChunkLoadError')).toBeInTheDocument();
});
});
+4 -4
View File
@@ -27,12 +27,12 @@ export const airbrakePlugin = createPlugin({
},
});
export const AirbrakeWidget = airbrakePlugin.provide(
export const EntityAirbrakeContent = airbrakePlugin.provide(
createRoutableExtension({
name: 'AirbrakePage',
name: 'EntityAirbrakeContent',
component: () =>
import('./components/AirbrakeWidget/AirbrakeWidget').then(
m => m.AirbrakeWidget,
import('./components/EntityAirbrakeContent/EntityAirbrakeContent').then(
m => m.EntityAirbrakeContent,
),
mountPoint: rootRouteRef,
}),