Exemplo n.º 1
0
 public void TableChainTest()
 {
     PerformancePage.Open();
     PerformancePage.CheckOpened();
     PerformancePage.UsersTable.AssertThat()
     .Size(400)
     .Size(Is.GreaterThan(399))
     .Size(Is.LessThanOrEqualTo(400))
     .Size(Is.GreaterThanOrEqualTo(400))
     .Size(Is.LessThan(401))
     .HasRowWithValues(
         HasValue("Brian Meyer", InColumn("Name")),
         HasValue("*****@*****.**", InColumn("Email")))
     .NotEmpty()
     .RowsWithValues(3, ContainsValue("Baker", InColumn(1)))
     .HasColumn("Email")
     .HasColumns(new[] { "Name", "City" })
     .Columns(Is.SubsequenceOf(new[] { "Name", "City", "Phone", "Email", "Address" }))
     .Tag(ContainsString("table"))
     .Displayed()
     .Enabled()
     .Attr("id", ContainsString("users-table"))
     .CssClass(ContainsString("uui-table"))
     .Css("color", ContainsString("rgba(102, 102, 102, 1)"))
     .Text(ContainsString("Name"))
     .HasClass("stripe");
 }
Exemplo n.º 2
0
 public void IsValidationTest()
 {
     _weather.Is
     .Selected("Hot option")
     .Selected(Is.SubsequenceOf(new[] { "Hot option", "Cold" }));
     _weather.AssertThat
     .Values(HasItems(new[] { "Sunny" }))
     .Disabled(HasItems(new[] { "Disabled" }))
     .Enabled(HasItems(new[] { "Sunny" }))
     .Enabled(HasItems(new[] { "Cold", "Sunny" }))
     .Size(Is.LessThan(6))
     .AllDisplayed()
     .AllTags(Is.SubsequenceOf(new[] { "input" }))
     .AllCss("color", Is.SubsequenceOf(new[] { "rgba(102, 102, 102, 1)" }));
     _weather.Has
     .Size(5)
     .NotEmpty()
     .Attrs(Is.SubsequenceOf(new[] { "class" }))
     .CssClasses(Is.SubsequenceOf(new[] { "html-left" }))
     .HasCssClasses("html-left");
     _weather.CheckBoxes[0].Has.Selected();
     _weather.CheckBoxes[4].ShouldBe.Deselected();
 }