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