Limit the use of the same shortcut name when adding a shortcut- test file changes added

Signed-off-by: AmbrishRamachandiran <ambrish.r@infosys.com>
This commit is contained in:
AmbrishRamachandiran
2023-07-28 20:52:29 +05:30
parent adff62590f
commit 831c28e3fc
2 changed files with 10 additions and 4 deletions
+5 -2
View File
@@ -26,7 +26,7 @@ import {
import { AlertDisplay } from '@backstage/core-components';
import { TestApiProvider } from '@backstage/test-utils';
import { analyticsApiRef } from '@backstage/core-plugin-api';
import { shortcutsApiRef } from './api';
import { shortcutsApiRef, shortcutApi } from './api';
describe('AddShortcut', () => {
const api = new DefaultShortcutsApi(MockStorageApi.create());
@@ -80,7 +80,10 @@ describe('AddShortcut', () => {
await renderInTestApp(
<TestApiProvider
apis={[[analyticsApiRef, analyticsSpy, shortcutsApiRef]]}
apis={[
[analyticsApiRef, analyticsSpy],
[shortcutsApiRef, shortcutApi],
]}
>
<AddShortcut {...props} />
</TestApiProvider>,
+5 -2
View File
@@ -27,7 +27,7 @@ import {
} from '@backstage/test-utils';
import { AlertDisplay } from '@backstage/core-components';
import { analyticsApiRef } from '@backstage/core-plugin-api';
import { shortcutsApiRef } from './api';
import { shortcutsApiRef, shortcutApi } from './api';
describe('EditShortcut', () => {
const shortcut: Shortcut = {
@@ -88,7 +88,10 @@ describe('EditShortcut', () => {
await renderInTestApp(
<TestApiProvider
apis={[[analyticsApiRef, analyticsSpy, shortcutsApiRef]]}
apis={[
[analyticsApiRef, analyticsSpy],
[shortcutsApiRef, shortcutApi],
]}
>
<EditShortcut {...props} />
</TestApiProvider>,