Fix faiiling tests (due to farmdesigner / sequence editor updates)
parent
85e1a0365c
commit
07bd01c086
|
@ -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"
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
|
||||
|
|
|
@ -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", () => {
|
||||
|
|
|
@ -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", () => {
|
||||
|
|
Loading…
Reference in New Issue