Limit the use of the same shortcut name when adding a shortcut- test file changes
Signed-off-by: AmbrishRamachandiran <ambrish.r@infosys.com>
This commit is contained in:
@@ -26,6 +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';
|
||||
|
||||
describe('AddShortcut', () => {
|
||||
const api = new DefaultShortcutsApi(MockStorageApi.create());
|
||||
@@ -78,7 +79,9 @@ describe('AddShortcut', () => {
|
||||
const spy = jest.spyOn(api, 'add');
|
||||
|
||||
await renderInTestApp(
|
||||
<TestApiProvider apis={[[analyticsApiRef, analyticsSpy]]}>
|
||||
<TestApiProvider
|
||||
apis={[[analyticsApiRef, analyticsSpy, shortcutsApiRef]]}
|
||||
>
|
||||
<AddShortcut {...props} />
|
||||
</TestApiProvider>,
|
||||
);
|
||||
|
||||
@@ -27,6 +27,7 @@ import {
|
||||
} from '@backstage/test-utils';
|
||||
import { AlertDisplay } from '@backstage/core-components';
|
||||
import { analyticsApiRef } from '@backstage/core-plugin-api';
|
||||
import { shortcutsApiRef } from './api';
|
||||
|
||||
describe('EditShortcut', () => {
|
||||
const shortcut: Shortcut = {
|
||||
@@ -86,7 +87,9 @@ describe('EditShortcut', () => {
|
||||
const spy = jest.spyOn(api, 'update');
|
||||
|
||||
await renderInTestApp(
|
||||
<TestApiProvider apis={[[analyticsApiRef, analyticsSpy]]}>
|
||||
<TestApiProvider
|
||||
apis={[[analyticsApiRef, analyticsSpy, shortcutsApiRef]]}
|
||||
>
|
||||
<EditShortcut {...props} />
|
||||
</TestApiProvider>,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user