Exemplo n.º 1
0
describe("FilterButtons::toggleFilter:", () => {
  const expectXHRJSTypes = {
    all: false,
    html: false,
    css: false,
    js: true,
    xhr: true,
    fonts: false,
    images: false,
    media: false,
    flash: false,
    ws: false,
    other: false,
  };

  const store = configureStore();
  const wrapper = mount(Provider(
    { store },
    FilterButtons()
  ));

  store.dispatch(Actions.toggleRequestFilterType("xhr"));
  store.dispatch(Actions.toggleRequestFilterType("js"));
  asExpected(wrapper, expectXHRJSTypes, `when xhr, js is toggled`);
});
Exemplo n.º 2
0
describe("FilterButtons component:", () => {
  const store = configureStore();
  const wrapper = mount(FilterButtons({ store }));

  asExpected(wrapper, expectDefaultTypes, "by default");
});