diff options
Diffstat (limited to 'gui-clamp/ui-react/src/components/dialogs/ControlLoop/AccordionHeader.test.js')
-rw-r--r-- | gui-clamp/ui-react/src/components/dialogs/ControlLoop/AccordionHeader.test.js | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/AccordionHeader.test.js b/gui-clamp/ui-react/src/components/dialogs/ControlLoop/AccordionHeader.test.js index 7685340..987f1fc 100644 --- a/gui-clamp/ui-react/src/components/dialogs/ControlLoop/AccordionHeader.test.js +++ b/gui-clamp/ui-react/src/components/dialogs/ControlLoop/AccordionHeader.test.js @@ -27,12 +27,24 @@ import toJson from "enzyme-to-json"; describe('Verify AccordionHeader', () => { const index = 0; - const title = "PMSH Instance"; - const orderState = "UNINITIALISED"; - const container = shallow(<AccordionHeader title={ { title } } orderState={ { orderState } } index={ { index } } key={ { index } }/>); it("renders correctly", () => { + const container = shallow(<AccordionHeader index={ index }/>); expect(toJson(container)).toMatchSnapshot(); }); + it("renders correctly when orderState is uninitialized", () => { + const container = shallow(<AccordionHeader title={ "UNINITIALISED_TEST" } orderState={ "UNINITIALISED" } index={ index } key={ index }/>); + expect(toJson(container)).toMatchSnapshot(); + }); + + it("renders correctly when orderState is passive", () => { + const container = shallow(<AccordionHeader title={ "PASSIVE_TEST" } orderState={ "PASSIVE" } index={ index } key={ index }/>); + expect(toJson(container)).toMatchSnapshot(); + }); + + it("renders correctly when orderState is running", () => { + const container = shallow(<AccordionHeader title={ "RUNNING_TEST" } orderState={ "RUNNING" } index={ index } key={ index }/>); + expect(toJson(container)).toMatchSnapshot(); + }); });
\ No newline at end of file |