bolt icon indicating copy to clipboard operation
bolt copied to clipboard

Rules simulator does not support multi-location updates.

Open mckoss opened this issue 8 years ago • 5 comments

There is no way to write a test for a multi-location update in the simulator since all writes are to an atomic location and sequential.

Expect a way to test a multi-location write scenario.

A couple ideas of ways to implement this:

  • With no change to API - but treat successive writes (between succeeds or fails statements) as a multi-location update.
  • Add a .update({"path-1": <value-1>, "path-2": <value-2>); API.
  • Add explicit grouping command around multi-location updates:
.beginUpdate()
  .at(<path>)
  .write(<data>)
  .at(<path>)
  .write(<data>)
.endUpdate()
.succeeds(<reason>)

I'm leaning to the last approach as being most consistent with the current testing API.

mckoss avatar Nov 30 '15 21:11 mckoss

hey @mckoss I was wondering if there was any progress on this?

RomansBermans avatar Jun 08 '16 12:06 RomansBermans

I'm itching to get back to more work on Bolt and address the outstanding PR's I have in flight. I'm hopeful and can return to working on this in the next few weeks - I've been working on some other projects for the last few months.

mckoss avatar Jun 08 '16 17:06 mckoss

Hello, Any update on this ? we are using updates all over the places in our JS code, and could need a way to test the rules. perhaps using "patch" ???

sebastianovide avatar Oct 20 '16 15:10 sebastianovide

I really need this as well, any updates?

abdel-ships-it avatar Oct 21 '16 21:10 abdel-ships-it

+1

janvogt avatar Nov 28 '16 17:11 janvogt