Fix nav bar issues stemming from resource name changes.
parent
e4bd3cdec5
commit
421470ebbe
|
@ -15,7 +15,7 @@
|
|||
"dev": "echo '===We use `rails api:start` now.==='",
|
||||
"webpack": "./node_modules/.bin/webpack-dev-server --config config/webpack.dev.js --host 0.0.0.0",
|
||||
"test-slow": "jest --coverage --no-cache -w 2",
|
||||
"test": "jest --no-coverage --cache",
|
||||
"test": "jest --no-coverage --cache -w 5",
|
||||
"typecheck": "./node_modules/.bin/tsc --noEmit --jsx preserve"
|
||||
},
|
||||
"keywords": [
|
||||
|
|
|
@ -17,7 +17,7 @@ export let fakeImages: TaggedImage[] = [
|
|||
"z": 164
|
||||
}
|
||||
},
|
||||
"uuid": "images.9.3"
|
||||
"uuid": "Image.9.3"
|
||||
},
|
||||
{
|
||||
"kind": "Image",
|
||||
|
@ -35,7 +35,7 @@ export let fakeImages: TaggedImage[] = [
|
|||
"z": 164
|
||||
}
|
||||
},
|
||||
"uuid": "images.8.4"
|
||||
"uuid": "Image.8.4"
|
||||
},
|
||||
{
|
||||
"kind": "Image",
|
||||
|
@ -53,6 +53,6 @@ export let fakeImages: TaggedImage[] = [
|
|||
"z": 53
|
||||
}
|
||||
},
|
||||
"uuid": "images.7.5"
|
||||
"uuid": "Image.7.5"
|
||||
}
|
||||
];
|
||||
|
|
|
@ -82,7 +82,7 @@ const tr4: TaggedResource = {
|
|||
"z": 144
|
||||
}
|
||||
},
|
||||
"uuid": "images.415.3"
|
||||
"uuid": "Image.415.3"
|
||||
};
|
||||
|
||||
const tr5: TaggedResource = {
|
||||
|
@ -101,7 +101,7 @@ const tr5: TaggedResource = {
|
|||
"z": 165
|
||||
}
|
||||
},
|
||||
"uuid": "images.414.4"
|
||||
"uuid": "Image.414.4"
|
||||
};
|
||||
|
||||
const tr6: TaggedResource = {
|
||||
|
@ -113,7 +113,7 @@ const tr6: TaggedResource = {
|
|||
"mode": 0,
|
||||
"label": "LED"
|
||||
},
|
||||
"uuid": "peripherals.11.5"
|
||||
"uuid": "Peripheral.11.5"
|
||||
};
|
||||
|
||||
const tr7: TaggedPoint = {
|
||||
|
@ -135,7 +135,7 @@ const tr7: TaggedPoint = {
|
|||
"z": 0,
|
||||
"openfarm_slug": "radish"
|
||||
},
|
||||
"uuid": "points.1392.6"
|
||||
"uuid": "Point.1392.6"
|
||||
};
|
||||
|
||||
const tr8: TaggedPoint = {
|
||||
|
@ -156,7 +156,7 @@ const tr8: TaggedPoint = {
|
|||
"z": 0,
|
||||
"openfarm_slug": "garlic"
|
||||
},
|
||||
"uuid": "points.1393.7"
|
||||
"uuid": "Point.1393.7"
|
||||
};
|
||||
|
||||
const tr9: TaggedPoint = {
|
||||
|
@ -177,7 +177,7 @@ const tr9: TaggedPoint = {
|
|||
"y": 637,
|
||||
"z": 5
|
||||
},
|
||||
"uuid": "points.1394.8"
|
||||
"uuid": "Point.1394.8"
|
||||
};
|
||||
|
||||
const tr10: TaggedPoint = {
|
||||
|
@ -198,7 +198,7 @@ const tr10: TaggedPoint = {
|
|||
"y": 421,
|
||||
"z": 5
|
||||
},
|
||||
"uuid": "points.1395.9"
|
||||
"uuid": "Point.1395.9"
|
||||
};
|
||||
|
||||
const tr11: TaggedPoint = {
|
||||
|
@ -219,7 +219,7 @@ const tr11: TaggedPoint = {
|
|||
"z": 10,
|
||||
"tool_id": 14
|
||||
},
|
||||
"uuid": "points.1396.10"
|
||||
"uuid": "Point.1396.10"
|
||||
};
|
||||
|
||||
const tr12: TaggedResource = {
|
||||
|
@ -239,7 +239,7 @@ const tr12: TaggedResource = {
|
|||
}
|
||||
]
|
||||
},
|
||||
"uuid": "regimens.11.46"
|
||||
"uuid": "Regimen.11.46"
|
||||
};
|
||||
|
||||
const tr13: TaggedResource = {
|
||||
|
|
|
@ -40,11 +40,11 @@ describe("<App />: Controls Pop-Up", () => {
|
|||
controlsPopUp("designer", true);
|
||||
controlsPopUp("designer/plants", true);
|
||||
controlsPopUp("controls", false);
|
||||
controlsPopUp("Device", true);
|
||||
controlsPopUp("Sequence", true);
|
||||
controlsPopUp("device", true);
|
||||
controlsPopUp("sequences", true);
|
||||
controlsPopUp("sequences/for_regimens", true);
|
||||
controlsPopUp("Regimen", false);
|
||||
controlsPopUp("Tool", true);
|
||||
controlsPopUp("regimens", false);
|
||||
controlsPopUp("tools", true);
|
||||
controlsPopUp("farmware", true);
|
||||
controlsPopUp("account", false);
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ describe("refresh()", () => {
|
|||
// 1. Enters the `catch` block.
|
||||
it("rejects malformed API data", (done) => {
|
||||
const device1: TaggedDevice = {
|
||||
"uuid": "device.6.1",
|
||||
"uuid": "Device.6.1",
|
||||
"kind": "Device",
|
||||
"specialStatus": undefined,
|
||||
"body": {
|
||||
|
|
|
@ -25,7 +25,7 @@ describe("successful refresh()", () => {
|
|||
// 3. Actually replaces resource.
|
||||
it("re-downloads an existing resource", (done) => {
|
||||
const device1: TaggedDevice = {
|
||||
"uuid": "device.6.1",
|
||||
"uuid": "Device.6.1",
|
||||
"kind": "Device",
|
||||
"specialStatus": undefined,
|
||||
"body": {
|
||||
|
|
|
@ -7,7 +7,7 @@ describe("<PeripheralForm/>", function () {
|
|||
const dispatch = jest.fn();
|
||||
const peripherals: TaggedPeripheral[] = [
|
||||
{
|
||||
uuid: "peripherals.2.2",
|
||||
uuid: "Peripheral.2.2",
|
||||
specialStatus: undefined,
|
||||
kind: "Peripheral",
|
||||
body: {
|
||||
|
@ -17,7 +17,7 @@ describe("<PeripheralForm/>", function () {
|
|||
}
|
||||
},
|
||||
{
|
||||
uuid: "peripherals.1.1",
|
||||
uuid: "Peripheral.1.1",
|
||||
specialStatus: undefined,
|
||||
kind: "Peripheral",
|
||||
body: {
|
||||
|
|
|
@ -19,7 +19,7 @@ describe("<PeripheralList/>", function () {
|
|||
|
||||
const peripherals: TaggedPeripheral[] = [
|
||||
{
|
||||
uuid: "peripherals.2.2",
|
||||
uuid: "Peripheral.2.2",
|
||||
kind: "Peripheral",
|
||||
specialStatus: undefined,
|
||||
body: {
|
||||
|
@ -29,7 +29,7 @@ describe("<PeripheralList/>", function () {
|
|||
}
|
||||
},
|
||||
{
|
||||
uuid: "peripherals.1.1",
|
||||
uuid: "Peripheral.1.1",
|
||||
kind: "Peripheral",
|
||||
specialStatus: undefined,
|
||||
body: {
|
||||
|
|
|
@ -23,7 +23,7 @@ describe("<PlantInventoryItem />", () => {
|
|||
expect(dispatch).toBeCalledWith({
|
||||
payload: {
|
||||
icon: "",
|
||||
plantUUID: "points.1.17"
|
||||
plantUUID: "Point.1.17"
|
||||
},
|
||||
type: Actions.TOGGLE_HOVERED_PLANT
|
||||
});
|
||||
|
|
|
@ -6,10 +6,10 @@ import { NavLinksProps } from "./interfaces";
|
|||
export const links = [
|
||||
{ name: "Farm Designer", icon: "leaf", slug: "designer" },
|
||||
{ name: "Controls", icon: "keyboard-o", slug: "controls" },
|
||||
{ name: "Device", icon: "cog", slug: "Device" },
|
||||
{ name: "Sequence", icon: "server", slug: "Sequence" },
|
||||
{ name: "Regimen", icon: "calendar-check-o", slug: "Regimen" },
|
||||
{ name: "Tool", icon: "wrench", slug: "Tool" },
|
||||
{ name: "Device", icon: "cog", slug: "device" },
|
||||
{ name: "Sequence", icon: "server", slug: "sequences" },
|
||||
{ name: "Regimen", icon: "calendar-check-o", slug: "regimens" },
|
||||
{ name: "Tool", icon: "wrench", slug: "tools" },
|
||||
{ name: "Farmware", icon: "crosshairs", slug: "farmware" }
|
||||
];
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@ import { defensiveClone } from "../../util";
|
|||
|
||||
const STATE: RegimenState = {
|
||||
"dailyOffsetMs": 300000,
|
||||
"selectedSequenceUUID": "sequences.71.167",
|
||||
"currentRegimen": "regimens.4.56",
|
||||
"selectedSequenceUUID": "Sequence.71.167",
|
||||
"currentRegimen": "Regimen.4.56",
|
||||
"weeks": [
|
||||
{
|
||||
"days": {
|
||||
|
@ -78,7 +78,7 @@ describe("INIT_RESOURCE", () => {
|
|||
state.currentRegimen = undefined;
|
||||
const action = {
|
||||
type: Actions.INIT_RESOURCE,
|
||||
payload: { uuid: "regimens.4.56", kind: "Regimen" }
|
||||
payload: { uuid: "Regimen.4.56", kind: "Regimen" }
|
||||
};
|
||||
const nextState = regimensReducer(STATE, action);
|
||||
expect(nextState.currentRegimen).toBe(action.payload.uuid);
|
||||
|
@ -91,7 +91,7 @@ describe("SELECT_REGIMEN", () => {
|
|||
state.currentRegimen = undefined;
|
||||
const action = {
|
||||
type: Actions.SELECT_REGIMEN,
|
||||
payload: { uuid: "regimens.4.56", kind: "Regimen" }
|
||||
payload: { uuid: "Regimen.4.56", kind: "Regimen" }
|
||||
};
|
||||
const nextState = regimensReducer(STATE, action);
|
||||
expect(nextState.currentRegimen).toBe(action.payload.uuid);
|
||||
|
|
|
@ -40,7 +40,7 @@ describe("<ActiveEditor />", () => {
|
|||
update: {
|
||||
color: "red", name: "Foo", regimen_items: []
|
||||
},
|
||||
uuid: "regimens.1.17"
|
||||
uuid: "Regimen.1.17"
|
||||
},
|
||||
type: Actions.OVERWRITE_RESOURCE
|
||||
});
|
||||
|
|
|
@ -71,7 +71,7 @@ describe("<RegimenEditorWidget />", () => {
|
|||
const deleteButton = wrapper.find("button").at(2);
|
||||
expect(deleteButton.text()).toContain("Delete");
|
||||
deleteButton.simulate("click");
|
||||
expect(mockDestroy).toHaveBeenCalledWith("regimens.6.22");
|
||||
expect(mockDestroy).toHaveBeenCalledWith("Regimen.6.22");
|
||||
});
|
||||
|
||||
it("saves regimen", () => {
|
||||
|
@ -79,6 +79,6 @@ describe("<RegimenEditorWidget />", () => {
|
|||
const saveeButton = wrapper.find("button").at(0);
|
||||
expect(saveeButton.text()).toContain("Save");
|
||||
saveeButton.simulate("click");
|
||||
expect(mockSave).toHaveBeenCalledWith("regimens.8.24");
|
||||
expect(mockSave).toHaveBeenCalledWith("Regimen.8.24");
|
||||
});
|
||||
});
|
||||
|
|
|
@ -46,7 +46,7 @@ describe("<AllSteps/>", () => {
|
|||
},
|
||||
"kind": "sequence"
|
||||
},
|
||||
"uuid": "sequences.8.52"
|
||||
"uuid": "Sequence.8.52"
|
||||
} as TaggedSequence;
|
||||
|
||||
maybeTagSteps(TEST_CASE);
|
||||
|
|
|
@ -44,12 +44,12 @@ describe("<SequenceEditorMiddleActive/>", () => {
|
|||
|
||||
it("deletes", () => {
|
||||
clickButton(2, "Delete");
|
||||
expect(mockDestroy).toHaveBeenCalledWith("sequences.0.16");
|
||||
expect(mockDestroy).toHaveBeenCalledWith("Sequence.0.16");
|
||||
});
|
||||
|
||||
it("copies", () => {
|
||||
clickButton(3, "Copy");
|
||||
expect(mockCopy.mock.calls[0][0].uuid).toEqual("sequences.1.33");
|
||||
expect(mockCopy.mock.calls[0][0].uuid).toEqual("Sequence.1.33");
|
||||
});
|
||||
|
||||
it("has drag area", () => {
|
||||
|
|
|
@ -15,7 +15,7 @@ describe("<TestButton/>", () => {
|
|||
"args": { "version": 4 },
|
||||
"kind": "sequence"
|
||||
},
|
||||
"uuid": "sequences.23.47"
|
||||
"uuid": "Sequence.23.47"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ describe("<InputDefault/>", () => {
|
|||
},
|
||||
"kind": "sequence"
|
||||
},
|
||||
"uuid": "sequences.74.145"
|
||||
"uuid": "Sequence.74.145"
|
||||
};
|
||||
const c = mount(<Wrapper>
|
||||
<InputDefault
|
||||
|
|
Loading…
Reference in New Issue