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

Signed-off-by: AmbrishRamachandiran <ambrish.r@infosys.com>
This commit is contained in:
AmbrishRamachandiran
2023-07-28 21:05:57 +05:30
parent 831c28e3fc
commit caaa5c8a55
2 changed files with 2 additions and 14 deletions
+1 -7
View File
@@ -26,7 +26,6 @@ import {
import { AlertDisplay } from '@backstage/core-components';
import { TestApiProvider } from '@backstage/test-utils';
import { analyticsApiRef } from '@backstage/core-plugin-api';
import { shortcutsApiRef, shortcutApi } from './api';
describe('AddShortcut', () => {
const api = new DefaultShortcutsApi(MockStorageApi.create());
@@ -79,12 +78,7 @@ describe('AddShortcut', () => {
const spy = jest.spyOn(api, 'add');
await renderInTestApp(
<TestApiProvider
apis={[
[analyticsApiRef, analyticsSpy],
[shortcutsApiRef, shortcutApi],
]}
>
<TestApiProvider apis={[[analyticsApiRef, analyticsSpy]]}>
<AddShortcut {...props} />
</TestApiProvider>,
);
+1 -7
View File
@@ -27,7 +27,6 @@ import {
} from '@backstage/test-utils';
import { AlertDisplay } from '@backstage/core-components';
import { analyticsApiRef } from '@backstage/core-plugin-api';
import { shortcutsApiRef, shortcutApi } from './api';
describe('EditShortcut', () => {
const shortcut: Shortcut = {
@@ -87,12 +86,7 @@ describe('EditShortcut', () => {
const spy = jest.spyOn(api, 'update');
await renderInTestApp(
<TestApiProvider
apis={[
[analyticsApiRef, analyticsSpy],
[shortcutsApiRef, shortcutApi],
]}
>
<TestApiProvider apis={[[analyticsApiRef, analyticsSpy]]}>
<EditShortcut {...props} />
</TestApiProvider>,
);