Permalink
Browse files

DoubleClick/RightClick tests against AutomationTestbed

  • Loading branch information...
1 parent 37902ad commit e838a316bb38c73e16417879a67b704cf3f432a9 @stirno committed Apr 22, 2012
@@ -10,6 +10,35 @@ public class InteractiveNative : FluentTest
{
private static string testUrl = "http://automation.apphb.com/interactive";
+ public void MouseClickOperations()
+ {
+ I.Open(testUrl);
+
+ // single click should add btn-primary
+ I.Click("#button-form button:eq(0)");
+ I.Expect.Class("btn-primary").On("#button-form button:eq(0)");
+
+ // clicking again should remove it
+ I.Click("#button-form button:eq(0)");
+ I.Expect.Throws(() => I.Expect.Class("btn-primary").On("#button-form button:eq(0)"));
+
+ // double click should add btn-primary
+ I.DoubleClick("#button-form button:eq(1)");
+ I.Expect.Class("btn-primary").On("#button-form button:eq(1)");
+
+ // double clicking again should remove it
+ I.DoubleClick("#button-form button:eq(1)");
+ I.Expect.Throws(() => I.Expect.Class("btn-primary").On("#button-form button:eq(1)"));
+
+ // right click should add btn-primary
+ I.RightClick("#button-form button:eq(2)");
+ I.Expect.Class("btn-primary").On("#button-form button:eq(2)");
+
+ // right clicking again should remove it
+ I.RightClick("#button-form button:eq(2)");
+ I.Expect.Throws(() => I.Expect.Class("btn-primary").On("#button-form button:eq(2)"));
+ }
+
public void YUIDragDrop()
{
I.Open(testUrl);
@@ -31,5 +31,11 @@ public void CartEditor_BuyMotorcycles()
{
this.forms.CartEditor_BuyMotorcycles();
}
+
+ [Fact]
+ public void MouseClickOperations()
+ {
+ this.interactive.MouseClickOperations();
+ }
}
}
@@ -30,5 +30,11 @@ public void CartEditor_BuyMotorcycles()
{
this.forms.CartEditor_BuyMotorcycles();
}
+
+ [Fact]
+ public void MouseClickOperations()
+ {
+ this.interactive.MouseClickOperations();
+ }
}
}
@@ -31,5 +31,11 @@ public void CartEditor_BuyMotorcycles()
{
this.forms.CartEditor_BuyMotorcycles();
}
+
+ [Fact]
+ public void MouseClickOperations()
+ {
+ this.interactive.MouseClickOperations();
+ }
}
}

0 comments on commit e838a31

Please sign in to comment.