From 10b54cb6716579661d3398db99de9674242f4a77 Mon Sep 17 00:00:00 2001 From: Aditya Kumar Date: Wed, 3 Sep 2025 09:58:19 +0530 Subject: [PATCH 1/2] Minor doc changes Signed-off-by: Aditya Kumar --- docs/frontend-system/building-plugins/02-testing.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/frontend-system/building-plugins/02-testing.md b/docs/frontend-system/building-plugins/02-testing.md index 21449a5bef..9e5bb1be44 100644 --- a/docs/frontend-system/building-plugins/02-testing.md +++ b/docs/frontend-system/building-plugins/02-testing.md @@ -78,7 +78,7 @@ This pattern also works for many other context providers. An important example i ## Testing extensions -To facilitate testing of frontend extensions, the `@backstage/frontend-test-utils` package provides a tester class which starts up an entire frontend harness, complete with a number of default features. You can then provide overrides for extensions whose behavior you need to adjust for the test run. +To facilitate testing of frontend extensions, the `@backstage/frontend-test-utils` package provides a tester class that starts up an entire frontend harness, complete with a number of default features. You can then provide overrides for extensions whose behavior you need to adjust for the test run. A number of features (frontend extensions and overrides) are also accepted by the tester. Here are some examples of how these facilities can be useful: @@ -92,7 +92,7 @@ import { createExtensionTester } from '@backstage/frontend-test-utils'; import { indexPageExtension } from './plugin'; describe('Index page', () => { - it('should render a the index page', async () => { + it('should render the index page', async () => { await renderInTestApp( createExtensionTester(indexPageExtension).reactElement(), ); @@ -108,7 +108,7 @@ Note that the `.reactElement()` method will look for the `coreExtensionData.reac ### Multiple extensions -In some cases you might need to test multiple extensions together, in particular when testing inputs. In this case, you can add more extensions to the tester instance using the `.add(...)` method. It also accepts an optional options object as the second argument, which you can use to provide configuration for the extension instance. +In some cases, you might need to test multiple extensions together, particularly when testing inputs. In this case, you can add more extensions to the tester instance using the `.add(...)` method. It also accepts an optional options object as the second argument, which you can use to provide configuration for the extension instance. ```tsx import { screen } from '@testing-library/react'; @@ -134,7 +134,7 @@ describe('Index page', async () => { }); ``` -When testing multiple extensions you may sometimes want to access the output of other extensions than the main test subject. You can use the `.query(ext)` method to query a different extension that has been added to the tester, by passing the extension used with the `createExtensionTester(...).add(ext)` +When testing multiple extensions, you may sometimes want to access the output of other extensions than the main test subject. You can use the `.query(ext)` method to query a different extension that has been added to the tester, by passing the extension used with the `createExtensionTester(...).add(ext)` ### Setting configuration @@ -147,7 +147,7 @@ import { createExtensionTester } from '@backstage/frontend-test-utils'; import { indexPageExtension, detailsPageExtension } from './plugin'; describe('Index page', () => { - it('should accepts a custom title via config', async () => { + it('should accept a custom title via config', async () => { const tester = createExtensionTester(indexPageExtension, { // Extension configuration for the index page config: { title: 'Custom page' }, From 4071458967111ddd87cbf6de5f7923e69b8476fc Mon Sep 17 00:00:00 2001 From: Aditya Kumar <136452216+AdityaK60@users.noreply.github.com> Date: Mon, 8 Sep 2025 15:34:48 +0530 Subject: [PATCH 2/2] Update 02-testing.md Signed-off-by: Aditya Kumar <136452216+AdityaK60@users.noreply.github.com> --- docs/frontend-system/building-plugins/02-testing.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/frontend-system/building-plugins/02-testing.md b/docs/frontend-system/building-plugins/02-testing.md index 9e5bb1be44..ac90185b40 100644 --- a/docs/frontend-system/building-plugins/02-testing.md +++ b/docs/frontend-system/building-plugins/02-testing.md @@ -78,7 +78,7 @@ This pattern also works for many other context providers. An important example i ## Testing extensions -To facilitate testing of frontend extensions, the `@backstage/frontend-test-utils` package provides a tester class that starts up an entire frontend harness, complete with a number of default features. You can then provide overrides for extensions whose behavior you need to adjust for the test run. +To facilitate testing of frontend extensions, the `@backstage/frontend-test-utils` package provides a tester class which starts up an entire frontend harness, complete with a number of default features. You can then provide overrides for extensions whose behavior you need to adjust for the test run. A number of features (frontend extensions and overrides) are also accepted by the tester. Here are some examples of how these facilities can be useful: @@ -108,7 +108,7 @@ Note that the `.reactElement()` method will look for the `coreExtensionData.reac ### Multiple extensions -In some cases, you might need to test multiple extensions together, particularly when testing inputs. In this case, you can add more extensions to the tester instance using the `.add(...)` method. It also accepts an optional options object as the second argument, which you can use to provide configuration for the extension instance. +In some cases you might need to test multiple extensions together, in particular when testing inputs. In this case, you can add more extensions to the tester instance using the `.add(...)` method. It also accepts an optional options object as the second argument, which you can use to provide configuration for the extension instance. ```tsx import { screen } from '@testing-library/react'; @@ -134,7 +134,7 @@ describe('Index page', async () => { }); ``` -When testing multiple extensions, you may sometimes want to access the output of other extensions than the main test subject. You can use the `.query(ext)` method to query a different extension that has been added to the tester, by passing the extension used with the `createExtensionTester(...).add(ext)` +When testing multiple extensions you may sometimes want to access the output of other extensions than the main test subject. You can use the `.query(ext)` method to query a different extension that has been added to the tester, by passing the extension used with the `createExtensionTester(...).add(ext)` ### Setting configuration