Esempio n. 1
0
        public void ColspanRowTable_HeaderValues()
        {
            var expectedHeaders = new List <string>()
            {
                "Item", "Category", "Price"
            };

            var colspanRowTable = new ColspanRowTable(_webDriver);

            colspanRowTable.Open();

            var tableElement      = colspanRowTable.ColspanRowTableElement;
            var tableHeaderValues = tableElement.TableHeaderValues;

            tableHeaderValues.Should().BeEquivalentTo(expectedHeaders, options => options.WithStrictOrdering());
        }
Esempio n. 2
0
        public void ColspanRowTable_RowWithColspan_OnlyFirstCellOfColspanHasElement()
        {
            var colspanRowTable = new ColspanRowTable(_webDriver);

            colspanRowTable.Open();

            var tableElement = colspanRowTable.ColspanRowTableElement;
            var tableRowElementWithoutColspan = tableElement.TableRowElements.Single(x => x.GetColumn("Item").Text == "BetaBand");

            tableRowElementWithoutColspan.GetColumn("Category").Text.Should().Be("Music");
            tableRowElementWithoutColspan.GetColumn("Price").Text.Should().Be("3000");

            var tableRowElementWithColspan = tableElement.TableRowElements.Single(x => x.GetColumn(0).Text == "Total");

            tableRowElementWithColspan.GetColumn("Category").Text.Should().Be("8000");
            tableRowElementWithColspan.GetColumn("Price").Should().BeNull();
        }