import SentryOptionsContainer, {
    SentryFooter,
    SentryOptions
} from "./Sentry";

describe("<Sentry />", () => {
    const initialState = { settings: { data: { enable_sentry: false } } };
    const store = mockStore(initialState);
    let wrapper;

    it("renders correctly", () => {
        wrapper = shallow(<SentryOptionsContainer store={store} />).dive();
        expect(wrapper).toMatchSnapshot();
    });

    it("renders SentryFooter correctly", () => {
        wrapper = shallow(<SentryFooter />);
        expect(wrapper).toMatchSnapshot();
    });

    it("renders SentryOptions correctly", () => {
        const props = {
            enabled: false,
            onToggle: jest.fn()
        };
        wrapper = shallow(<SentryOptions {...props} />);
        expect(wrapper).toMatchSnapshot();
    });

});

@@ -80,16 +80,98 @@
 Sentry%22;
+%0Aimport * as actions from %22../../actions%22;%0Aimport %7B Button %7D from %22../../../base%22;
 %0A%0Adescri
@@ -895,12 +895,428 @@
    %7D);%0A%0A
+    it(%22dispatches updateSetting() action on checkbox toggle to update 'enable_sentry' field%22, () =%3E %7B%0A        const spy = sinon.spy(actions, %22updateSetting%22);%0A        expect(spy.called).toBe(false);%0A%0A        wrapper = mount(%3CSentryOptionsContainer store=%7Bstore%7D /%3E);%0A        wrapper.find(Button).prop(%22onClick%22)();%0A%0A        expect(spy.calledWith(%22enable_sentry%22, true)).toBe(true);%0A%0A        spy.restore();%0A    %7D);%0A%0A
 %7D);%0A

Update administration Sentry component tests