Skip to content

Commit

Permalink
Fix react tests (#7077)
Browse files Browse the repository at this point in the history
facebook/create-react-app#8689 is causing our
tests to fail in the CI pipeline. As the comments suggest, downgrading
to react-scripts 3.4.0 fixes the problem.

In addition, fix a test warning due to a missing id field.

Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
  • Loading branch information
csmarchbanks committed Apr 1, 2020
1 parent fe47c9c commit 62bd77b
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 275 deletions.
3 changes: 1 addition & 2 deletions web/ui/react-app/package.json
Expand Up @@ -34,7 +34,7 @@
"react-copy-to-clipboard": "^5.0.1",
"react-dom": "^16.7.0",
"react-resize-detector": "^4.2.1",
"react-scripts": "^3.4.0",
"react-scripts": "3.4.0",
"react-test-renderer": "^16.9.0",
"reactstrap": "^8.0.1",
"sanitize-html": "^1.20.1",
Expand Down Expand Up @@ -71,7 +71,6 @@
"@types/sinon": "^7.5.0",
"@typescript-eslint/eslint-plugin": "2.x",
"@typescript-eslint/parser": "2.x",
"babel-eslint": "10.x",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.15.1",
"eslint": "6.x",
Expand Down
2 changes: 1 addition & 1 deletion web/ui/react-app/src/pages/graph/PanelList.test.tsx
Expand Up @@ -20,7 +20,7 @@ describe('PanelList', () => {
});

it('renders panels', () => {
const panelList = shallow(<PanelListContent {...({ panels: [{}] } as any)} />);
const panelList = shallow(<PanelListContent {...({ panels: [{ id: 'foo' }] } as any)} />);
const panels = panelList.find(Panel);
expect(panels.length).toBeGreaterThan(0);
});
Expand Down

0 comments on commit 62bd77b

Please sign in to comment.