new fields in general settings

and test for password switcher
This commit is contained in:
2020-07-03 00:20:11 +02:00
parent 08c2567551
commit 3b1d85824f
4 changed files with 48 additions and 18 deletions

View File

@ -16,5 +16,12 @@ describe('<GeneralSettings/>', function () {
wrapper.unmount();
});
it('test password hide/show switchbutton', function () {
const wrapper = shallow(<GeneralSettings/>);
expect(wrapper.find("FormGroup").findWhere(it => it.props().controlId === "passwordfield")).toHaveLength(0);
wrapper.find("FormCheck").findWhere(it => it.props().label === "Enable Password support").simulate("change");
expect(wrapper.find("FormGroup").findWhere(it => it.props().controlId === "passwordfield")).toHaveLength(1);
});
});