public void ShouldChooseFullTableLayoutWhenHasTheadAndThs()
        {
            Selenium.Setup(o => o.GetXpathCount("id('tableId')/thead")).Returns(1);
            Selenium.Setup(o => o.GetXpathCount("id('tableId')//th")).Returns(1);

            var chooser = new TableLayoutChooser(Selenium.Object, "tableId");
            ITableLayout layout = chooser.GetLayout();

            Assert.IsInstanceOfType(layout, typeof(FullTableLayout));
        }
        public void ShouldChoosePlainTablePlusThLayoutWhenHasThsButDoesNotHaveThead()
        {
            Selenium.Setup(o => o.GetXpathCount("id('tableId')/thead")).Returns(0);
            Selenium.Setup(o => o.GetXpathCount("id('tableId')//th")).Returns(1);

            var chooser = new TableLayoutChooser(Selenium.Object, "tableId");
            ITableLayout layout = chooser.GetLayout();

            Assert.IsInstanceOfType(layout, typeof(PlainTablePlusThLayout));
        }
 public void ShouldChoosePlainTablePlusThLayoutWhenHasThsButDoesNotHaveThead()
 {
     OpenPlainTablePlusTh();
     var layout = new TableLayoutChooser(Browser.GetDelegate(), "oneTable").GetLayout();
     Assert.IsInstanceOfType(layout, typeof(PlainTablePlusThLayout));
 }
 public void ShouldChooseFullTableLayoutWhenHasTheadAndThs()
 {
     OpenFullTable();
     var layout = new TableLayoutChooser(Browser.GetDelegate(), "oneTable").GetLayout();
     Assert.IsInstanceOfType(layout, typeof(FullTableLayout));
 }
Esempio n. 5
0
 public ITable Table(string id)
 {
     var layout = new TableLayoutChooser(_selenium, id).GetLayout();
     return new Table.Table(_selenium, layout, id);
 }