chiark / gitweb /
wdt-bundles: hidden: Have alice play some cards
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 10 Jul 2021 17:56:57 +0000 (18:56 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 10 Jul 2021 18:25:16 +0000 (19:25 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
wdriver/wdt-bundles.rs

index 42476c0bb12240a9e654c2abcb672b8342a56618..b5341cc9e47d2ff9166d8123d7efbddf265dcf08 100644 (file)
@@ -62,12 +62,15 @@ fn tests(UsualSetup { su, alice, bob, ..}: UsualSetup) {
     let game_spec = &c.su.ds.subst("@specs@/vatikan.game.toml")?;
     c.otter(&["reset"],&[&game_spec])?;
 
+    let deckg = Pos::new(150,184);
+    let handg = Pos::new(68, 175);
+
     {
       let mut alice = c.su.w(&c.alice)?;
       alice.synch()?;
 
-      let deckp = alice.posg2posw(Pos::new(150,184))?;
-      let handp = alice.posg2posw(Pos::new(68, 175))?;
+      let deckp = alice.posg2posw(deckg)?;
+      let handp = alice.posg2posw(handg)?;
       alice.action_chain()
         .move_pos(handp)?
         .click()
@@ -104,6 +107,27 @@ fn tests(UsualSetup { su, alice, bob, ..}: UsualSetup) {
       bob.get(bob.current_url()?)?;
       bob.synch()?;
     }
+
+    {
+      let mut alice = c.su.w(&c.alice)?;
+
+      let cardsg = Pos::new(80,100);
+
+      alice.action_chain()
+        .move_w(&alice, (handg + Pos::new(   2, -15 ))?)?
+        .click_and_hold()
+        .move_w(&alice, (handg + Pos::new( -20,   5 ))?)?
+        .release()
+        .move_w(&alice, (handg + Pos::new(  -7,  -0 ))?)?
+        .click_and_hold()
+        .move_w(&alice, cardsg)?
+        .release()
+        .perform()
+        .did("play")?;
+
+      alice.synch()?;
+    }
+
   });
 
   debug!("finishing");