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:
@@ -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>,
|
||||
);
|
||||
|
||||
@@ -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>,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user