public void FunctionsPage_NoFunctions() { FunctionsPage page = Dashboard.GoToFunctionsPage(); FunctionsSection section = page.FunctionsSection; Assert.True(section.IsUserAccesible); Assert.Equal("Functions", section.Title.Text); FunctionsTable table = section.Table; table.WaitForDataToLoad(); // Find the table again because after load it gets completely replace table = section.Table; IEnumerable <TableRow> rows = table.BodyRows; Assert.Equal(1, rows.Count()); TableRow singleRow = rows.Single(); IEnumerable <TableCell> cells = singleRow.Cells; Assert.Equal(1, cells.Count()); TableCell singleCell = cells.Single(); Assert.Equal(table.HeaderRows.First().Cells.Count(), singleCell.ColSpan); Assert.Equal("No functions are present.", singleCell.RawElement.Text); }
public void FunctionsPage_Functions() { FunctionsPage page = Dashboard.GoToFunctionsPage(); FunctionsSection section = page.FunctionsSection; section.Table.WaitForDataToLoad(); IEnumerable <TableRow> functionsRows = section.Table.BodyRows; Assert.Equal(1, functionsRows.Count()); FunctionsTableRow functionRow = functionsRows.Single() as FunctionsTableRow; Assert.NotNull(functionRow); // TODO: assert link Assert.Equal("SingleFunction.Function", functionRow.FunctionName); Assert.Equal(2, functionRow.SuccessCount); Assert.Equal(1, functionRow.FailCount); }
public void FunctionsPage_Functions() { FunctionsPage page = Dashboard.GoToFunctionsPage(); FunctionsSection functionsSection = page.FunctionsSection; functionsSection.Table.WaitForDataToLoad(); IEnumerable <TableRow> functionsRows = functionsSection.Table.BodyRows; Assert.Equal(1, functionsRows.Count()); FunctionsTableRow functionRow = functionsRows.Single() as FunctionsTableRow; Assert.NotNull(functionRow); Assert.Equal("SingleFunction.Function", functionRow.FunctionName); Assert.Equal(0, functionRow.SuccessCount); Assert.Equal(0, functionRow.FailCount); Assert.Equal( Dashboard.BuildFullUrl(FunctionDefinitionPage.ConstructRelativePath(_functionDefinitionId)), functionRow.FunctionLink.Href); }