示例#1
0
        public void Sort_SholdWorkAppropriateForNonTextTypes(string columnName, SortDirectionsEnum direction, Type propertyType)
        {
            ExceptionsHandler.Hande(() =>
            {
                this.navigator.AllTypesDataPage().GoTo();
                var tableElement    = new TableElement("table", this.driver);
                string columnHeader = columnName.StartsWith("NestedModel") ? this.GetHeaderForNestedModel(columnName) : columnName;
                tableElement.ClickSortButton(columnHeader, direction);

                AssertNonTextPropertyOrder(columnName, columnHeader, direction, propertyType, tableElement);
                tableElement.GoToLastPage();
                AssertNonTextPropertyOrder(columnName, columnHeader, direction, propertyType, tableElement);
            },
                                    this.driver);
        }
示例#2
0
        public void Sort_SholdWorkAppropriateForTextTypes(string columnName, SortDirectionsEnum direction)
        {
            ExceptionsHandler.Hande(() =>
            {
                this.navigator.AllTypesDataPage().GoTo();
                var tableElement = new TableElement("table", this.driver);
                tableElement.ClickSortButton(columnName, direction);

                // Assert that rows are in correct order for the first page
                AssertTextPropertyOrder(columnName, direction, tableElement);
                tableElement.GoToLastPage();
                // Assert that rows are in correct order for the last page
                AssertTextPropertyOrder(columnName, direction, tableElement);
            },
                                    this.driver);
        }
示例#3
0
        public void Sort_SholdWorkWithSubsecuentPropertiesSortOperations()
        {
            ExceptionsHandler.Hande(() =>
            {
                string firstColumnName  = "Integer";
                string secondColumnName = "DoubleProperty";

                this.navigator.AllTypesDataPage().GoTo();
                var tableElement = new TableElement("table", this.driver);
                tableElement.ClickSortButton(firstColumnName, SortDirectionsEnum.Asc);
                tableElement.ClickSortButton(secondColumnName, SortDirectionsEnum.Asc);

                AssertNonTextPropertyOrder(secondColumnName, secondColumnName, SortDirectionsEnum.Asc, typeof(double), tableElement);
                tableElement.GoToLastPage();
                AssertNonTextPropertyOrder(secondColumnName, secondColumnName, SortDirectionsEnum.Asc, typeof(double), tableElement);
            },
                                    this.driver);
        }