From: Ian Jackson Date: Sat, 10 Jul 2021 17:56:57 +0000 (+0100) Subject: wdt-bundles: hidden: Have alice play some cards X-Git-Tag: otter-0.7.2~148 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=4c578baac031d4e73985e92e0ed4a2f9b2b919fc;p=otter.git wdt-bundles: hidden: Have alice play some cards Signed-off-by: Ian Jackson --- diff --git a/wdriver/wdt-bundles.rs b/wdriver/wdt-bundles.rs index 42476c0b..b5341cc9 100644 --- a/wdriver/wdt-bundles.rs +++ b/wdriver/wdt-bundles.rs @@ -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");