Skip to content

Commit

Permalink
Fix tests after local search swap.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyperkid123 committed May 22, 2024
1 parent 2a9fa98 commit 4968574
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 1 addition & 3 deletions cypress/component/AllServicesPage/AllServicesPage.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ describe('<AllServices />', () => {
status: 200,
fixture: 'settings-navigation.json',
});
// cy.intercept('http://localhost:8080/api/chrome-service/v1/static/stable/stage/navigation/*-navigation.json?ts=*', {
// data: [],
// });
cy.intercept('http://localhost:8080/api/chrome-service/v1/static/stable/stage/search/search-index.json', []);
});

it('should filter by service category title', () => {
Expand Down
1 change: 1 addition & 0 deletions cypress/component/DefaultLayout.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ describe('<Default layout />', () => {
navItems: [],
});
cy.intercept('GET', '/api/chrome-service/v1/static/stable/stage/services/services-generated.json', []);
cy.intercept('GET', '/api/chrome-service/v1/static/stable/stage/search/search-index.json', []);
});

it('render correctly with few nav items', () => {
Expand Down
1 change: 1 addition & 0 deletions cypress/component/helptopics/HelpTopicManager.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ describe('HelpTopicManager', () => {
navItems: [],
});
cy.intercept('GET', '/api/chrome-service/v1/static/stable/stage/services/services-generated.json', []);
cy.intercept('http://localhost:8080/api/chrome-service/v1/static/stable/stage/search/search-index.json', []);
});

it.only('should switch help topics drawer content', () => {
Expand Down
4 changes: 4 additions & 0 deletions src/components/RootApp/ScalprumRoot.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import configureStore from 'redux-mock-store';
import { Provider } from 'react-redux';
import { Provider as JotaiProvider } from 'jotai';

jest.mock('../Search/SearchInput', () => {
return jest.fn().mockImplementation(() => <div />);
});

jest.mock('../../utils/common', () => {
const utils = jest.requireActual('../../utils/common');
return {
Expand Down

0 comments on commit 4968574

Please sign in to comment.