fixup import

Signed-off-by: Emma Indal <emma.indahl@gmail.com>
This commit is contained in:
Emma Indal
2022-07-05 14:51:10 +02:00
committed by Camila Belo
parent e7638fa7e7
commit 43e423cb85
4 changed files with 4 additions and 15 deletions
+1 -1
View File
@@ -7,4 +7,4 @@
'@backstage/plugin-search-backend-module-elasticsearch': major
---
This package has been promoted to 1.0. Read more about what it means in [New release: Backstage Search 1.0 blog](https://backstage.io/blog/2022/07/14/backstage-search-1.0)
This package has been promoted to 1.0. Read more about what it means in [New release: Backstage Search 1.0 blog](https://backstage.io/blog/2022/07/19/releasing-backstage-search-1.0)
+1
View File
@@ -51,6 +51,7 @@
"@backstage/plugin-scaffolder-backend": "^1.4.0-next.3",
"@backstage/plugin-scaffolder-backend-module-rails": "^0.4.2-next.1",
"@backstage/plugin-search-backend": "^0.5.4-next.2",
"@backstage/plugin-search-common": "^0.3.6-next.0",
"@backstage/plugin-search-backend-node": "^0.6.3-next.2",
"@backstage/plugin-search-backend-module-elasticsearch": "^0.2.0-next.2",
"@backstage/plugin-search-backend-module-pg": "^0.3.5-next.2",
+1 -1
View File
@@ -22,8 +22,8 @@ import { PgSearchEngine } from '@backstage/plugin-search-backend-module-pg';
import {
IndexBuilder,
LunrSearchEngine,
SearchEngine,
} from '@backstage/plugin-search-backend-node';
import { SearchEngine } from '@backstage/plugin-search-common';
import { DefaultTechDocsCollatorFactory } from '@backstage/plugin-techdocs-backend';
import { Router } from 'express';
import { PluginEnvironment } from '../types';
@@ -16,7 +16,7 @@
import { renderInTestApp } from '@backstage/test-utils';
import React from 'react';
import { useLocation, useOutlet } from 'react-router';
import { useLocation } from 'react-router';
import { useSearch } from '@backstage/plugin-search-react';
import { SearchPage } from './SearchPage';
@@ -50,11 +50,6 @@ jest.mock('@backstage/plugin-search-react', () => ({
}),
}));
jest.mock('../LegacySearchPage', () => ({
...jest.requireActual('@backstage/plugin-search-react'),
LegacySearchPage: jest.fn().mockReturnValue('LegacySearchPageMock'),
}));
describe('SearchPage', () => {
const origReplaceState = window.history.replaceState;
@@ -96,13 +91,6 @@ describe('SearchPage', () => {
expect(getByText('Route Children')).toBeInTheDocument();
});
it('renders legacy search when no router children are provided', async () => {
(useOutlet as jest.Mock).mockReturnValueOnce(null);
const { getByText } = await renderInTestApp(<SearchPage />);
expect(getByText('LegacySearchPageMock')).toBeInTheDocument();
});
it('replaces window history with expected query parameters', async () => {
(useSearch as jest.Mock).mockReturnValueOnce({
term: 'bieber',