public async void Skipped() { WebBrowser browser = new WebBrowser(WebDriver.Current); await xB.CurrentRun.AddScenario(this) .Given(HtmlReport.OfASingleSkippedScenario()) .When(WebUser.ViewsReport(browser)) .ThenAsync("the report will show the area name in yellow to indicate scenarios were skipped", async (s) => { await browser.WaitTillVisible(Pages.HtmlReportPage.Area.NameYellow(1)); }) .AndAsync("the features under the area will be collapsed because it was not failing", async (s) => { await browser.WaitTillNotVisible(Pages.HtmlReportPage.Area.Features(1)); }) .Run(); }
public async Task Collapse() { WebBrowser browser = new WebBrowser(WebDriver.Current); await xB.CurrentRun.AddScenario(this) .Given(HtmlReport.OfASingleFailedScenario()) .And(WebUser.ViewsReport(browser)) .WhenAsync("the user cliks the first area", async (s) => { await browser.ClickWhenVisible(Pages.HtmlReportPage.Area.Name(1)); }) .ThenAsync("the report should collapse the features listed under the area", async (s) => { await browser.WaitTillNotVisible(Pages.HtmlReportPage.Area.Features(1)); }) .Run(); }
public async void Passing() { WebBrowser browser = new WebBrowser(WebDriver.Current); await xB.CurrentRun.AddScenario(this) .Given(HtmlReport.OfASinglePassingScenario()) .When(WebUser.ViewsReport(browser)) .ThenAsync("the report will show the area name in green to indicate all features passed", async (s) => { await browser.WaitTillVisible(Pages.HtmlReportPage.Area.NameGreen(1)); browser.ElementHasText(Pages.HtmlReportPage.Area.Name(1), "My Area 1"); }) .AndAsync("the features under the area will be collapsed because it passed", async (s) => { await browser.WaitTillNotVisible(Pages.HtmlReportPage.Area.Features(1)); }) .Run(); }