From a99569acc8acbbdadb8b2ab38b7dfa1fce3c65b0 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 21 Jul 2021 19:16:57 +0100 Subject: [PATCH] autolower: Prep for test by raising the hand we are about to claim Signed-off-by: Ian Jackson --- wdriver/wdt-hand.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/wdriver/wdt-hand.rs b/wdriver/wdt-hand.rs index 56d417cb..631d8f72 100644 --- a/wdriver/wdt-hand.rs +++ b/wdriver/wdt-hand.rs @@ -53,14 +53,25 @@ impl Ctx { w.synch()?; let hand = w.find_piece(HAND)?; + let hand_pieceid = hand.pieceid.to_string(); + let hand_posg = hand.posg()?; w.action_chain() .move_pos(&hand)? + .send_keys("W") + .click() + .send_keys("tW") .click() .perform() .did("select hand")?; w.synch()?; + let top = w.execute_script(&format!(r##" + return defs_marker.previousElementSibling.dataset.piece; + "##))?; + assert_eq!( top.value().as_str().unwrap(), + hand_pieceid ); + w.action_chain() .send_keys('C') .perform() -- 2.30.2