Remove tests that were testing presence of nav items (pre-icon nav stuff)
parent
2792281043
commit
98baa520e9
|
@ -18,7 +18,8 @@ if Rails.env == "development"
|
|||
Peripheral,
|
||||
Log,
|
||||
PinBinding,
|
||||
Point,
|
||||
PointGroupItem,
|
||||
PointGroup,
|
||||
Point,
|
||||
TokenIssuance,
|
||||
ToolSlot,
|
||||
|
@ -27,7 +28,6 @@ if Rails.env == "development"
|
|||
SavedGarden,
|
||||
SensorReading,
|
||||
FarmwareInstallation,
|
||||
PointGroup,
|
||||
Tool,
|
||||
Device,
|
||||
Delayed::Job,
|
||||
|
|
|
@ -117,8 +117,16 @@ describe("<App />: NavBar", () => {
|
|||
const p = fakeProps();
|
||||
p.loaded = FULLY_LOADED;
|
||||
const wrapper = mount(<App {...p} />);
|
||||
expect(wrapper.text())
|
||||
.toContain("Farm DesignerControlsDeviceSequencesRegimensToolsFarmware");
|
||||
const t = wrapper.text();
|
||||
const strings = [
|
||||
"Farm Designer",
|
||||
"Controls",
|
||||
"Device",
|
||||
"Sequences",
|
||||
"Regimens",
|
||||
"Farmware"
|
||||
];
|
||||
strings.map(string => expect(t).toContain(string));
|
||||
wrapper.unmount();
|
||||
});
|
||||
|
||||
|
|
|
@ -95,8 +95,6 @@ describe("<FarmDesigner/>", () => {
|
|||
it("renders nav titles", () => {
|
||||
mockPath = "/app/designer/plants";
|
||||
const wrapper = mount(<FarmDesigner {...fakeProps()} />);
|
||||
["Map", "Plants", "Events"].map(string =>
|
||||
expect(wrapper.text()).toContain(string));
|
||||
expect(wrapper.find(".panel-nav").first().hasClass("hidden"))
|
||||
.toBeTruthy();
|
||||
expect(wrapper.find(".farm-designer-panels").hasClass("panel-open"))
|
||||
|
@ -108,8 +106,6 @@ describe("<FarmDesigner/>", () => {
|
|||
it("hides panel", () => {
|
||||
mockPath = "/app/designer";
|
||||
const wrapper = mount(<FarmDesigner {...fakeProps()} />);
|
||||
["Map", "Plants", "Events"].map(string =>
|
||||
expect(wrapper.text()).toContain(string));
|
||||
expect(wrapper.find(".panel-nav").first().hasClass("hidden"))
|
||||
.toBeFalsy();
|
||||
expect(wrapper.find(".farm-designer-panels").hasClass("panel-open"))
|
||||
|
|
|
@ -15,12 +15,6 @@ describe("<PureFarmEvents/>", () => {
|
|||
calendarRows,
|
||||
});
|
||||
|
||||
it("renders nav", () => {
|
||||
const wrapper = render(<PureFarmEvents {...fakeProps()} />);
|
||||
["Map", "Plants", "Events"].map(string =>
|
||||
expect(wrapper.text()).toContain(string));
|
||||
});
|
||||
|
||||
it("sorts items correctly", () => {
|
||||
const results = render(<PureFarmEvents {...fakeProps()} />);
|
||||
const rows = results
|
||||
|
|
|
@ -12,12 +12,8 @@ describe("<PlantInventory />", () => {
|
|||
|
||||
it("renders", () => {
|
||||
const wrapper = mount(<Plants {...fakeProps()} />);
|
||||
["Map",
|
||||
"Plants",
|
||||
"Events",
|
||||
"Strawberry Plant",
|
||||
"11 days old"
|
||||
].map(string => expect(wrapper.text()).toContain(string));
|
||||
["Strawberry Plant",
|
||||
"11 days old"].map(string => expect(wrapper.text()).toContain(string));
|
||||
expect(wrapper.find("input").props().placeholder)
|
||||
.toEqual("Search your plants...");
|
||||
});
|
||||
|
|
|
@ -80,12 +80,6 @@ describe("<SavedGardens />", () => {
|
|||
expect(destroySavedGarden).toHaveBeenCalledWith(p.savedGardens[0].uuid);
|
||||
});
|
||||
|
||||
it("goes back", () => {
|
||||
const wrapper = mount(<SavedGardens {...fakeProps()} />);
|
||||
wrapper.find("i").first().simulate("click");
|
||||
expect(history.push).toHaveBeenCalledWith("/app/designer/plants");
|
||||
});
|
||||
|
||||
it("has no saved gardens yet", () => {
|
||||
const p = fakeProps();
|
||||
p.savedGardens = [];
|
||||
|
|
Loading…
Reference in New Issue