예제 #1
0
		public async void EmptyTestRun()
		{
            WebBrowser browser = new WebBrowser(WebDriver.Current);
            await xB.CurrentRun.AddScenario(this)
                .Given(HtmlReport.OfAnEmptyTestRun())
                .When(WebUser.ViewsReport(browser))
                .ThenAsync("the report will show the test run name at the top", async (s) => {
                    await browser.WaitTillVisible(Pages.HtmlReportPage.TestRun.Name);
                    browser.ElementHasText(Pages.HtmlReportPage.TestRun.Name, "My Test Run");
                })
                .And("the report will show the test run name as the title for the page", (s) => {
                    browser.HasTitle("My Test Run");
                })
                .AndAsync("the report will show the test run name in gray to indicate no scenarios were run", async (s) => {
                    await browser.WaitTillVisible(Pages.HtmlReportPage.TestRun.NameGrey);
                })
                .Run();
		}