X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/8699b7818676e6b22707757989885b58060e06b3..2a7fd99c212c33a1ec9911f8529fa5afc59a7bb2:/src/components/multi-panel-view/multi-panel-view.test.tsx
diff --git a/src/components/multi-panel-view/multi-panel-view.test.tsx b/src/components/multi-panel-view/multi-panel-view.test.tsx
index 53a3bb6089..3f4911c225 100644
--- a/src/components/multi-panel-view/multi-panel-view.test.tsx
+++ b/src/components/multi-panel-view/multi-panel-view.test.tsx
@@ -10,7 +10,7 @@ import { Button } from "@material-ui/core";
configure({ adapter: new Adapter() });
-const PanelMock = ({panelName, panelMaximized, doHidePanel, doMaximizePanel, children, ...rest}) =>
+const PanelMock = ({panelName, panelMaximized, doHidePanel, doMaximizePanel, doUnMaximizePanel, panelIlluminated, panelRef, children, ...rest}) =>
{children}
;
describe('', () => {
@@ -22,7 +22,7 @@ describe('', () => {
};
});
- it('should show default toggle buttons for every child', () => {
+ it('should show default panel buttons for every child', () => {
const childs = [
This is one panel,
This is another panel,
@@ -34,25 +34,27 @@ describe('', () => {
expect(wrapper.html()).toContain('This is another panel');
});
- it('should toggle panel when clicking on its button', () => {
+ it('should show panel when clicking on its button', () => {
const childs = [
This is one panel,
];
- const wrapper = mount({[...childs]});
+ props.panelStates = [
+ {name: 'Initially invisible Panel', visible: false},
+ ]
- // Initial state: panel visible
- expect(wrapper.html()).toContain('This is one panel');
+ const wrapper = mount({[...childs]});
- // Panel toggling
- wrapper.find(Button).simulate('click');
+ // Initial state: panel not visible
expect(wrapper.html()).not.toContain('This is one panel');
expect(wrapper.html()).toContain('All panels are hidden');
+
+ // Panel visible when clicking on its button
wrapper.find(Button).simulate('click');
expect(wrapper.html()).toContain('This is one panel');
expect(wrapper.html()).not.toContain('All panels are hidden');
});
- it('should show custom toggle buttons when config provided', () => {
+ it('should show custom panel buttons when config provided', () => {
const childs = [
This is one panel,
This is another panel,