mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 09:46:16 +01:00
remove outdated react-router-enzyme-context
This commit is contained in:
@@ -1,15 +1,11 @@
|
|||||||
// @flow
|
// @flow
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { mount, shallow } from "enzyme";
|
import { mount, shallow } from "@scm-manager/ui-tests/enzyme-router";
|
||||||
import "@scm-manager/ui-tests/enzyme";
|
|
||||||
import "@scm-manager/ui-tests/i18n";
|
import "@scm-manager/ui-tests/i18n";
|
||||||
import ReactRouterEnzymeContext from "react-router-enzyme-context";
|
|
||||||
import Paginator from "./Paginator";
|
import Paginator from "./Paginator";
|
||||||
|
|
||||||
xdescribe("paginator rendering tests", () => {
|
xdescribe("paginator rendering tests", () => {
|
||||||
|
|
||||||
const options = new ReactRouterEnzymeContext();
|
|
||||||
|
|
||||||
const dummyLink = {
|
const dummyLink = {
|
||||||
href: "https://dummy"
|
href: "https://dummy"
|
||||||
};
|
};
|
||||||
@@ -23,8 +19,7 @@ xdescribe("paginator rendering tests", () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const paginator = shallow(
|
const paginator = shallow(
|
||||||
<Paginator collection={collection} />,
|
<Paginator collection={collection} />
|
||||||
options.get()
|
|
||||||
);
|
);
|
||||||
const buttons = paginator.find("Button");
|
const buttons = paginator.find("Button");
|
||||||
expect(buttons.length).toBe(7);
|
expect(buttons.length).toBe(7);
|
||||||
@@ -46,8 +41,7 @@ xdescribe("paginator rendering tests", () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const paginator = shallow(
|
const paginator = shallow(
|
||||||
<Paginator collection={collection} />,
|
<Paginator collection={collection} />
|
||||||
options.get()
|
|
||||||
);
|
);
|
||||||
const buttons = paginator.find("Button");
|
const buttons = paginator.find("Button");
|
||||||
expect(buttons.length).toBe(5);
|
expect(buttons.length).toBe(5);
|
||||||
@@ -86,8 +80,7 @@ xdescribe("paginator rendering tests", () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const paginator = shallow(
|
const paginator = shallow(
|
||||||
<Paginator collection={collection} />,
|
<Paginator collection={collection} />
|
||||||
options.get()
|
|
||||||
);
|
);
|
||||||
const buttons = paginator.find("Button");
|
const buttons = paginator.find("Button");
|
||||||
expect(buttons.length).toBe(6);
|
expect(buttons.length).toBe(6);
|
||||||
@@ -129,8 +122,7 @@ xdescribe("paginator rendering tests", () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const paginator = shallow(
|
const paginator = shallow(
|
||||||
<Paginator collection={collection} />,
|
<Paginator collection={collection} />
|
||||||
options.get()
|
|
||||||
);
|
);
|
||||||
const buttons = paginator.find("Button");
|
const buttons = paginator.find("Button");
|
||||||
expect(buttons.length).toBe(5);
|
expect(buttons.length).toBe(5);
|
||||||
@@ -169,8 +161,7 @@ xdescribe("paginator rendering tests", () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const paginator = shallow(
|
const paginator = shallow(
|
||||||
<Paginator collection={collection} />,
|
<Paginator collection={collection} />
|
||||||
options.get()
|
|
||||||
);
|
);
|
||||||
const buttons = paginator.find("Button");
|
const buttons = paginator.find("Button");
|
||||||
expect(buttons.length).toBe(6);
|
expect(buttons.length).toBe(6);
|
||||||
@@ -214,8 +205,7 @@ xdescribe("paginator rendering tests", () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const paginator = shallow(
|
const paginator = shallow(
|
||||||
<Paginator collection={collection} />,
|
<Paginator collection={collection} />
|
||||||
options.get()
|
|
||||||
);
|
);
|
||||||
const buttons = paginator.find("Button");
|
const buttons = paginator.find("Button");
|
||||||
expect(buttons.length).toBe(7);
|
expect(buttons.length).toBe(7);
|
||||||
@@ -272,8 +262,7 @@ xdescribe("paginator rendering tests", () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const paginator = mount(
|
const paginator = mount(
|
||||||
<Paginator collection={collection} onPageChange={callMe} />,
|
<Paginator collection={collection} onPageChange={callMe} />
|
||||||
options.get()
|
|
||||||
);
|
);
|
||||||
paginator.find("Button.pagination-previous").simulate("click");
|
paginator.find("Button.pagination-previous").simulate("click");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user