Fix faiiling tests (due to farmdesigner / sequence editor updates)

pull/1439/head
Rick Carlino 2019-09-16 09:14:33 -05:00
parent 85e1a0365c
commit 07bd01c086
4 changed files with 12 additions and 6 deletions

View File

@ -49,7 +49,7 @@ describe("connectivity reducer", () => {
it("broadcasts PING_NO", () => {
pingNO("yep", 123);
expect(store.dispatch).toHaveBeenCalledWith({
payload: { id: "yep", },
payload: { id: "yep", at: 123 },
type: "PING_NO"
});
});

View File

@ -147,7 +147,7 @@ describe("sync()", function () {
describe("execSequence()", function () {
it("calls execSequence", async () => {
await actions.execSequence(1);
expect(mockDevice.execSequence).toHaveBeenCalledWith(1);
expect(mockDevice.execSequence).toHaveBeenCalledWith(1, undefined);
expect(success).toHaveBeenCalled();
});

View File

@ -104,9 +104,14 @@ describe("<CreatePoints />", () => {
it("fills the state with default data", () => {
const wrapper = shallow<CreatePoints>(<CreatePoints {...fakeProps()} />);
wrapper.instance().getPointData();
expect(wrapper.instance().state).toEqual({
color: "green", cx: 0, cy: 0, r: 1, name: "Created Point"
});
const props = {
color: "green",
cx: 3.21,
cy: 1.23,
r: 15,
name: "Created Point"
};
expect(wrapper.instance().state).toEqual(props);
});
it("unmounts", () => {

View File

@ -90,7 +90,8 @@ describe("<TestButton/>", () => {
btn.simulate("click");
expect(btn.hasClass("orange")).toBeTruthy();
expect(warning).not.toHaveBeenCalled();
expect(mockDevice.execSequence).toHaveBeenCalledWith(props.sequence.body.id);
expect(mockDevice.execSequence)
.toHaveBeenCalledWith(props.sequence.body.id, undefined);
});
it("opens parameter assignment menu", () => {