mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
feat(spec): serialize selector-only string targets for the runner to re-resolve
This commit is contained in:
1 parent
1a9d82711f
commit
50cb9e98cb
2 files changed
+23
-7
No files matched your search
@@ -119,8 +119,17 @@ test("builtin Scroll carries the pre-computed to endpoint", () => {
|
||||
);
|
||||
});
|
||||
|
||||
test("an unresolved (string) target drops the action", () => {
|
||||
assert.equal(serializeAction({ kind: "Tap", on: "id:never-resolved" }), null);
|
||||
test("a string target serializes selector-only for the runner to re-resolve", () => {
|
||||
assert.deepEqual(serializeAction({ kind: "Tap", on: "id:save" }), {
|
||||
kind: "Tap",
|
||||
x: 0,
|
||||
y: 0,
|
||||
selector: "id:save",
|
||||
});
|
||||
});
|
||||
|
||||
test("an empty target or null action is dropped", () => {
|
||||
assert.equal(serializeAction({ kind: "Tap", on: "" }), null);
|
||||
assert.equal(serializeAction(null), null);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user