From 969925f065bed19438f12e90a72966c5c54e1ba6 Mon Sep 17 00:00:00 2001 From: Jawwad Mukhtar Date: Thu, 2 Sep 2021 14:12:41 +0100 Subject: [PATCH 1/2] refactor add mobile support --- .../HelpMyStreetFE.Specs/Default.srprofile | 12 + .../Drivers/BrowserSeleniumDriverFactory.cs | 213 ++++++++++++------ 2 files changed, 158 insertions(+), 67 deletions(-) diff --git a/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Default.srprofile b/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Default.srprofile index 21bcbe322..8b09712c7 100644 --- a/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Default.srprofile +++ b/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Default.srprofile @@ -49,5 +49,17 @@ + + + + + + + + + + + + diff --git a/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Drivers/BrowserSeleniumDriverFactory.cs b/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Drivers/BrowserSeleniumDriverFactory.cs index 4c5133c44..88c57efe6 100644 --- a/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Drivers/BrowserSeleniumDriverFactory.cs +++ b/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Drivers/BrowserSeleniumDriverFactory.cs @@ -5,23 +5,65 @@ using OpenQA.Selenium.Remote; using OpenQA.Selenium.Safari; using System; -using System.Collections.Generic; using System.Reflection; -using System.Text; using TechTalk.SpecFlow; namespace HelpMyStreetFE.Specs.Drivers { + struct BrowserDetails + { + private FeatureContext _featureContext; + private ScenarioContext _scenarioContext; + private Version _version; + public BrowserDetails(FeatureContext featureContext, ScenarioContext scenarioContext, Version version) + { + _featureContext = featureContext; + _scenarioContext = scenarioContext; + _version = version; + } + + public string BrowserVersion { get { return "latest"; } } + public string Resolution { get { return "1920x1080";} } + public string Project { get { return "HelpMyStreetFE"; } } + public string BrowserStackUser { get { return Environment.GetEnvironmentVariable("BROWSERSTACK_USERNAME"); } } + public string BrowserStackAccessKey { get { return Environment.GetEnvironmentVariable("BROWSERSTACK_ACCESS_KEY"); } } + public bool Debug { get { return true; } } + public string Console { get { return "info"; } } + public string NetworkLogs { get { return "true"; } } + public string Name { get { return _featureContext.FeatureInfo.Title + " / " + _scenarioContext.ScenarioInfo.Title; } } + public string Build { get { return $"Version {_version} on {Environment.MachineName}"; } } + } + + struct Windows + { + public string OSVersion { get { return "10"; }} + public string OS { get { return "Windows"; } } + } + + struct MacOS + { + public string OSVersion { get { return "Big Sur"; } } + public string OS { get { return "OS X"; } } + } + public class BrowserSeleniumDriverFactory { private readonly FeatureContext _featureContext; private readonly ScenarioContext _scenarioContext; - + private Version _version; + private BrowserDetails _browserDetails; + private Windows _windows; + private MacOS _macOS; + private const string URI = "https://hub-cloud.browserstack.com/wd/hub/"; public BrowserSeleniumDriverFactory(FeatureContext featureContext, ScenarioContext scenarioContext) { _featureContext = featureContext; _scenarioContext = scenarioContext; + _version = Assembly.GetExecutingAssembly().GetName().Version; + _browserDetails = new BrowserDetails(_featureContext, _scenarioContext,_version); + _windows = new Windows(); + _macOS = new MacOS(); } public IWebDriver GetForBrowser(string browserId) @@ -33,103 +75,140 @@ public IWebDriver GetForBrowser(string browserId) case "CHROME": return GetChromeDriver(); case "FIREFOX": return GetFirefoxDriver(); case "SAFARI": return GetSafariDriver(); + case "ANDROID": return GetAndroidDriver(); + case "IOS": return GetIOSDriver(); case string browser: throw new NotSupportedException($"{browser} is not a supported browser"); default: throw new NotSupportedException("not supported browser: "); } } + private IWebDriver GetFirefoxDriver() { - Version version = Assembly.GetExecutingAssembly().GetName().Version; - FirefoxOptions firefoxCapability = new FirefoxOptions(); - firefoxCapability.AddAdditionalCapability("os_version", "10", true); firefoxCapability.AddAdditionalCapability("browser", "firefox", true); - firefoxCapability.AddAdditionalCapability("browser_version", "latest", true); - firefoxCapability.AddAdditionalCapability("os", "Windows", true); - firefoxCapability.AddAdditionalCapability("resolution", "1920x1080", true); - firefoxCapability.AddAdditionalCapability("project", "HelpMyStreetFE", true); - firefoxCapability.AddAdditionalCapability("name", _featureContext.FeatureInfo.Title + " / " + _scenarioContext.ScenarioInfo.Title, true); // test name - firefoxCapability.AddAdditionalCapability("build", $"Version {version} on {System.Environment.MachineName}", true); // Your tests will be organized within this build - firefoxCapability.AddAdditionalCapability("browserstack.user", Environment.GetEnvironmentVariable("BROWSERSTACK_USERNAME"), true); - firefoxCapability.AddAdditionalCapability("browserstack.key", Environment.GetEnvironmentVariable("BROWSERSTACK_ACCESS_KEY"), true); - firefoxCapability.AddAdditionalCapability("browserstack.debug", true, true); - firefoxCapability.AddAdditionalCapability("browserstack.console", "info", true); - firefoxCapability.AddAdditionalCapability("browserstack.networkLogs", "true", true); - - IWebDriver driver = new RemoteWebDriver(new Uri("https://hub-cloud.browserstack.com/wd/hub/"), firefoxCapability); + firefoxCapability.AddAdditionalCapability("os_version", _windows.OSVersion, true); + firefoxCapability.AddAdditionalCapability("browser_version", _browserDetails.BrowserVersion, true); + firefoxCapability.AddAdditionalCapability("os", _windows.OS, true); + firefoxCapability.AddAdditionalCapability("resolution", _browserDetails.Resolution, true); + firefoxCapability.AddAdditionalCapability("project", _browserDetails.Project, true); + firefoxCapability.AddAdditionalCapability("name", _browserDetails.Name, true); // test name + firefoxCapability.AddAdditionalCapability("build", _browserDetails.Build, true); // Your tests will be organized within this build + firefoxCapability.AddAdditionalCapability("browserstack.user", _browserDetails.BrowserStackUser, true); + firefoxCapability.AddAdditionalCapability("browserstack.key", _browserDetails.BrowserStackAccessKey, true); + firefoxCapability.AddAdditionalCapability("browserstack.debug", _browserDetails.Debug, true); + firefoxCapability.AddAdditionalCapability("browserstack.console", _browserDetails.Console, true); + firefoxCapability.AddAdditionalCapability("browserstack.networkLogs", _browserDetails.NetworkLogs, true); + + IWebDriver driver = new RemoteWebDriver(new Uri(URI), firefoxCapability); return driver; } private IWebDriver GetChromeDriver() { - Version version = Assembly.GetExecutingAssembly().GetName().Version; - ChromeOptions chromeCapability = new ChromeOptions(); - chromeCapability.AddAdditionalCapability("os_version", "10", true); chromeCapability.AddAdditionalCapability("browser", "Chrome", true); - chromeCapability.AddAdditionalCapability("browser_version", "latest", true); - chromeCapability.AddAdditionalCapability("os", "Windows", true); - chromeCapability.AddAdditionalCapability("resolution", "1920x1080", true); - chromeCapability.AddAdditionalCapability("project", "HelpMyStreetFE", true); - chromeCapability.AddAdditionalCapability("name", _featureContext.FeatureInfo.Title + " / " + _scenarioContext.ScenarioInfo.Title, true); - chromeCapability.AddAdditionalCapability("build", $"Version {version} on {System.Environment.MachineName}", true); - chromeCapability.AddAdditionalCapability("browserstack.user", Environment.GetEnvironmentVariable("BROWSERSTACK_USERNAME"), true); - chromeCapability.AddAdditionalCapability("browserstack.key", Environment.GetEnvironmentVariable("BROWSERSTACK_ACCESS_KEY"), true); - chromeCapability.AddAdditionalCapability("browserstack.debug", true, true); - chromeCapability.AddAdditionalCapability("browserstack.console", "info", true); - chromeCapability.AddAdditionalCapability("browserstack.networkLogs", "true", true); - - IWebDriver driver = new RemoteWebDriver(new Uri("https://hub-cloud.browserstack.com/wd/hub/"), chromeCapability); + chromeCapability.AddAdditionalCapability("os_version", _windows.OSVersion, true); + chromeCapability.AddAdditionalCapability("browser_version", _browserDetails.BrowserVersion, true); + chromeCapability.AddAdditionalCapability("os", _windows.OS, true); + chromeCapability.AddAdditionalCapability("resolution", _browserDetails.Resolution, true); + chromeCapability.AddAdditionalCapability("project", _browserDetails.Project, true); + chromeCapability.AddAdditionalCapability("name", _browserDetails.Name, true); + chromeCapability.AddAdditionalCapability("build", _browserDetails.Build, true); + chromeCapability.AddAdditionalCapability("browserstack.user", _browserDetails.BrowserStackUser, true); + chromeCapability.AddAdditionalCapability("browserstack.key", _browserDetails.BrowserStackAccessKey, true); + chromeCapability.AddAdditionalCapability("browserstack.debug", _browserDetails.Debug, true); + chromeCapability.AddAdditionalCapability("browserstack.console", _browserDetails.Console, true); + chromeCapability.AddAdditionalCapability("browserstack.networkLogs", _browserDetails.NetworkLogs, true); + + IWebDriver driver = new RemoteWebDriver(new Uri(URI), chromeCapability); return driver; } private IWebDriver GetEdgeDriver() { - Version version = Assembly.GetExecutingAssembly().GetName().Version; - EdgeOptions edgeCapability = new EdgeOptions(); - edgeCapability.AddAdditionalCapability("os_version", "10"); edgeCapability.AddAdditionalCapability("browser", "Edge"); - edgeCapability.AddAdditionalCapability("browser_version", "latest"); - edgeCapability.AddAdditionalCapability("os", "Windows"); - edgeCapability.AddAdditionalCapability("resolution", "1920x1080"); - edgeCapability.AddAdditionalCapability("project", "HelpMyStreetFE"); - edgeCapability.AddAdditionalCapability("name", _featureContext.FeatureInfo.Title + " / " + _scenarioContext.ScenarioInfo.Title); - edgeCapability.AddAdditionalCapability("build", $"Version {version} on {System.Environment.MachineName}"); - edgeCapability.AddAdditionalCapability("browserstack.user", Environment.GetEnvironmentVariable("BROWSERSTACK_USERNAME")); - edgeCapability.AddAdditionalCapability("browserstack.key", Environment.GetEnvironmentVariable("BROWSERSTACK_ACCESS_KEY")); - edgeCapability.AddAdditionalCapability("browserstack.debug", true); - edgeCapability.AddAdditionalCapability("browserstack.console", "info"); - edgeCapability.AddAdditionalCapability("browserstack.networkLogs", "true"); - - IWebDriver driver = new RemoteWebDriver(new Uri("https://hub-cloud.browserstack.com/wd/hub/"), edgeCapability); + edgeCapability.AddAdditionalCapability("os_version", _windows.OSVersion); + edgeCapability.AddAdditionalCapability("browser_version", _browserDetails.BrowserVersion); + edgeCapability.AddAdditionalCapability("os", _windows.OS); + edgeCapability.AddAdditionalCapability("resolution", _browserDetails.Resolution); + edgeCapability.AddAdditionalCapability("project", _browserDetails.Project); + edgeCapability.AddAdditionalCapability("name", _browserDetails.Name); + edgeCapability.AddAdditionalCapability("build", _browserDetails.Build); + edgeCapability.AddAdditionalCapability("browserstack.user", _browserDetails.BrowserStackUser); + edgeCapability.AddAdditionalCapability("browserstack.key", _browserDetails.BrowserStackAccessKey); + edgeCapability.AddAdditionalCapability("browserstack.debug", _browserDetails.Debug); + edgeCapability.AddAdditionalCapability("browserstack.console", _browserDetails.Console); + edgeCapability.AddAdditionalCapability("browserstack.networkLogs", _browserDetails.NetworkLogs); + + IWebDriver driver = new RemoteWebDriver(new Uri(URI), edgeCapability); return driver; } private IWebDriver GetSafariDriver() { - Version version = Assembly.GetExecutingAssembly().GetName().Version; - SafariOptions safariCapability = new SafariOptions(); - safariCapability.AddAdditionalCapability("os_version", "Big Sur"); safariCapability.AddAdditionalCapability("browser", "Safari"); - safariCapability.AddAdditionalCapability("browser_version", "latest"); - safariCapability.AddAdditionalCapability("os", "OS X"); - safariCapability.AddAdditionalCapability("resolution", "1920x1080"); - safariCapability.AddAdditionalCapability("project", "HelpMyStreetFE"); - safariCapability.AddAdditionalCapability("name", _featureContext.FeatureInfo.Title + " / " + _scenarioContext.ScenarioInfo.Title); - safariCapability.AddAdditionalCapability("build", $"Version {version} on {System.Environment.MachineName}"); - safariCapability.AddAdditionalCapability("browserstack.user", Environment.GetEnvironmentVariable("BROWSERSTACK_USERNAME")); - safariCapability.AddAdditionalCapability("browserstack.key", Environment.GetEnvironmentVariable("BROWSERSTACK_ACCESS_KEY")); - safariCapability.AddAdditionalCapability("browserstack.debug", true); - safariCapability.AddAdditionalCapability("browserstack.console", "info"); - safariCapability.AddAdditionalCapability("browserstack.networkLogs", "true"); - - IWebDriver driver = new RemoteWebDriver(new Uri("https://hub-cloud.browserstack.com/wd/hub/"), safariCapability); + safariCapability.AddAdditionalCapability("os_version", _macOS.OSVersion); + safariCapability.AddAdditionalCapability("browser_version", _browserDetails.BrowserVersion); + safariCapability.AddAdditionalCapability("os", _macOS.OS); + safariCapability.AddAdditionalCapability("resolution", _browserDetails.Resolution); + safariCapability.AddAdditionalCapability("project", _browserDetails.Project); + safariCapability.AddAdditionalCapability("name", _browserDetails.Name); + safariCapability.AddAdditionalCapability("build", _browserDetails.Build); + safariCapability.AddAdditionalCapability("browserstack.user", _browserDetails.BrowserStackUser); + safariCapability.AddAdditionalCapability("browserstack.key", _browserDetails.BrowserStackAccessKey); + safariCapability.AddAdditionalCapability("browserstack.debug", _browserDetails.Debug); + safariCapability.AddAdditionalCapability("browserstack.console", _browserDetails.Console); + safariCapability.AddAdditionalCapability("browserstack.networkLogs", _browserDetails.NetworkLogs); + + IWebDriver driver = new RemoteWebDriver(new Uri(URI), safariCapability); + + return driver; + } + + private IWebDriver GetAndroidDriver() + { + ChromeOptions androidCapability = new ChromeOptions(); + androidCapability.AddAdditionalCapability("browser", "Android", true); + androidCapability.AddAdditionalCapability("real_mobile", "true", true); + androidCapability.AddAdditionalCapability("device", "Samsung Galaxy S20", true); + androidCapability.AddAdditionalCapability("os_version", "10.0", true); + androidCapability.AddAdditionalCapability("project", _browserDetails.Project, true); + androidCapability.AddAdditionalCapability("name", _browserDetails.Name, true); + androidCapability.AddAdditionalCapability("build", _browserDetails.Build, true); + androidCapability.AddAdditionalCapability("browserstack.user", _browserDetails.BrowserStackUser, true); + androidCapability.AddAdditionalCapability("browserstack.key", _browserDetails.BrowserStackAccessKey, true); + androidCapability.AddAdditionalCapability("browserstack.debug", _browserDetails.Debug, true); + androidCapability.AddAdditionalCapability("browserstack.console", _browserDetails.Console, true); + androidCapability.AddAdditionalCapability("browserstack.networkLogs", _browserDetails.NetworkLogs, true); + + IWebDriver driver = new RemoteWebDriver(new Uri(URI), androidCapability); + + return driver; + } + + private IWebDriver GetIOSDriver() + { + SafariOptions iosCapability = new SafariOptions(); + iosCapability.AddAdditionalCapability("browser", "iPhone"); + iosCapability.AddAdditionalCapability("real_mobile", "true"); + iosCapability.AddAdditionalCapability("device", "iPhone 12"); + iosCapability.AddAdditionalCapability("os_version", "14"); + iosCapability.AddAdditionalCapability("project", _browserDetails.Project); + iosCapability.AddAdditionalCapability("name", _browserDetails.Name); + iosCapability.AddAdditionalCapability("build", _browserDetails.Build); + iosCapability.AddAdditionalCapability("browserstack.user", _browserDetails.BrowserStackUser); + iosCapability.AddAdditionalCapability("browserstack.key", _browserDetails.BrowserStackAccessKey); + iosCapability.AddAdditionalCapability("browserstack.debug", _browserDetails.Debug); + iosCapability.AddAdditionalCapability("browserstack.console", _browserDetails.Console); + iosCapability.AddAdditionalCapability("browserstack.networkLogs", _browserDetails.NetworkLogs); + + IWebDriver driver = new RemoteWebDriver(new Uri(URI), iosCapability); return driver; } From b476056de78bd2c287f2e67bc98f5eb15383d48d Mon Sep 17 00:00:00 2001 From: Jawwad Mukhtar Date: Thu, 2 Sep 2021 16:04:33 +0100 Subject: [PATCH 2/2] add Desktop tag --- .../HelpMyStreetFE.Specs/Default.srprofile | 4 +- .../Features/SiteNavigation.feature | 2 + .../Features/SiteNavigation.feature.cs | 109 +++++++++--------- 3 files changed, 61 insertions(+), 54 deletions(-) diff --git a/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Default.srprofile b/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Default.srprofile index 8b09712c7..0bf17c565 100644 --- a/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Default.srprofile +++ b/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Default.srprofile @@ -27,7 +27,7 @@ - + @@ -51,12 +51,14 @@ + !tagmatch:Desktop + !tagmatch:Desktop diff --git a/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Features/SiteNavigation.feature b/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Features/SiteNavigation.feature index dd8f7121b..07eb74605 100644 --- a/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Features/SiteNavigation.feature +++ b/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Features/SiteNavigation.feature @@ -1,9 +1,11 @@ @StartVolunteerBrowser @AcceptAllCookies +@Desktop Feature: SiteNavigation Navigation using top menu bar on home page @MaximiseWindows + Scenario Outline: Primary navigation (wide screen) Given the volunteer's element #site-nav ul li:nth-child() a should have text When the volunteer clicks the element #site-nav ul li:nth-child() a diff --git a/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Features/SiteNavigation.feature.cs b/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Features/SiteNavigation.feature.cs index 46509e4c1..c2f93747e 100644 --- a/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Features/SiteNavigation.feature.cs +++ b/HelpMyStreetFE.Specs/HelpMyStreetFE.Specs/Features/SiteNavigation.feature.cs @@ -21,7 +21,8 @@ namespace HelpMyStreetFE.Specs.Features [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [TechTalk.SpecRun.FeatureAttribute("SiteNavigation", new string[] { "StartVolunteerBrowser", - "AcceptAllCookies"}, Description="\tNavigation using top menu bar on home page", SourceFile="Features\\SiteNavigation.feature", SourceLine=2)] + "AcceptAllCookies", + "Desktop"}, Description="\tNavigation using top menu bar on home page", SourceFile="Features\\SiteNavigation.feature", SourceLine=3)] public partial class SiteNavigationFeature { @@ -29,7 +30,8 @@ public partial class SiteNavigationFeature private string[] _featureTags = new string[] { "StartVolunteerBrowser", - "AcceptAllCookies"}; + "AcceptAllCookies", + "Desktop"}; #line 1 "SiteNavigation.feature" #line hidden @@ -40,7 +42,8 @@ public virtual void FeatureSetup() testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "SiteNavigation", "\tNavigation using top menu bar on home page", ProgrammingLanguage.CSharp, new string[] { "StartVolunteerBrowser", - "AcceptAllCookies"}); + "AcceptAllCookies", + "Desktop"}); testRunner.OnFeatureStart(featureInfo); } @@ -91,7 +94,7 @@ public virtual void PrimaryNavigationWideScreen(string name, string index, strin argumentsOfScenario.Add("url", url); argumentsOfScenario.Add("Page Title", pageTitle); TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Primary navigation (wide screen)", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 7 +#line 9 this.ScenarioInitialize(scenarioInfo); #line hidden bool isScenarioIgnored = default(bool); @@ -111,16 +114,16 @@ public virtual void PrimaryNavigationWideScreen(string name, string index, strin else { this.ScenarioStart(); -#line 8 +#line 10 testRunner.Given(string.Format("the volunteer\'s element #site-nav ul li:nth-child({0}) a should have text {1}", index, name), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line hidden -#line 9 +#line 11 testRunner.When(string.Format("the volunteer clicks the element #site-nav ul li:nth-child({0}) a", index), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); #line hidden -#line 10 +#line 12 testRunner.Then(string.Format("the volunteer\'s url should be {0}", url), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line hidden -#line 11 +#line 13 testRunner.And(string.Format("the volunteer\'s page title should be {0}", pageTitle), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden } @@ -128,50 +131,50 @@ public virtual void PrimaryNavigationWideScreen(string name, string index, strin } [TechTalk.SpecRun.ScenarioAttribute("Primary navigation (wide screen), Request Help", new string[] { - "MaximiseWindows"}, SourceLine=14)] + "MaximiseWindows"}, SourceLine=16)] public virtual void PrimaryNavigationWideScreen_RequestHelp() { -#line 7 +#line 9 this.PrimaryNavigationWideScreen("Request Help", "1", "request-help/", "Request Help - Help My Street", ((string[])(null))); #line hidden } [TechTalk.SpecRun.ScenarioAttribute("Primary navigation (wide screen), Case Studies", new string[] { - "MaximiseWindows"}, SourceLine=14)] + "MaximiseWindows"}, SourceLine=16)] public virtual void PrimaryNavigationWideScreen_CaseStudies() { -#line 7 +#line 9 this.PrimaryNavigationWideScreen("Case Studies", "2", "case-studies", "Case Studies - Help My Street", ((string[])(null))); #line hidden } [TechTalk.SpecRun.ScenarioAttribute("Primary navigation (wide screen), Resources", new string[] { - "MaximiseWindows"}, SourceLine=14)] + "MaximiseWindows"}, SourceLine=16)] public virtual void PrimaryNavigationWideScreen_Resources() { -#line 7 +#line 9 this.PrimaryNavigationWideScreen("Resources", "3", "resources", "Resources - Help My Street", ((string[])(null))); #line hidden } [TechTalk.SpecRun.ScenarioAttribute("Primary navigation (wide screen), Questions", new string[] { - "MaximiseWindows"}, SourceLine=14)] + "MaximiseWindows"}, SourceLine=16)] public virtual void PrimaryNavigationWideScreen_Questions() { -#line 7 +#line 9 this.PrimaryNavigationWideScreen("Questions", "4", "questions", "Frequently Asked Questions - Help My Street", ((string[])(null))); #line hidden } [TechTalk.SpecRun.ScenarioAttribute("No further primary navigation links (wide screen)", new string[] { - "MaximiseWindows"}, SourceLine=20)] + "MaximiseWindows"}, SourceLine=22)] public virtual void NoFurtherPrimaryNavigationLinksWideScreen() { string[] tagsOfScenario = new string[] { "MaximiseWindows"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("No further primary navigation links (wide screen)", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 21 +#line 23 this.ScenarioInitialize(scenarioInfo); #line hidden bool isScenarioIgnored = default(bool); @@ -191,7 +194,7 @@ public virtual void NoFurtherPrimaryNavigationLinksWideScreen() else { this.ScenarioStart(); -#line 22 +#line 24 testRunner.Then("the volunteer\'s element #site-nav ul li:nth-child(5) a should not be visible", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line hidden } @@ -213,7 +216,7 @@ public virtual void PrimaryNavigationNarrowScreen(string name, string index, str argumentsOfScenario.Add("url", url); argumentsOfScenario.Add("Page Title", pageTitle); TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Primary navigation (narrow screen)", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 25 +#line 27 this.ScenarioInitialize(scenarioInfo); #line hidden bool isScenarioIgnored = default(bool); @@ -233,21 +236,21 @@ public virtual void PrimaryNavigationNarrowScreen(string name, string index, str else { this.ScenarioStart(); -#line 26 +#line 28 testRunner.Given("the volunteer has clicked the element #site-nav-toggle", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line hidden -#line 27 +#line 29 testRunner.And(string.Format("the volunteer\'s element #sitenavCollapsed #site-nav ul li:nth-child({0}) a should" + " have text {1}", index, name), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden -#line 28 +#line 30 testRunner.When(string.Format("the volunteer clicks the element #sitenavCollapsed #site-nav ul li:nth-child({0})" + " a", index), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); #line hidden -#line 29 +#line 31 testRunner.Then(string.Format("the volunteer\'s url should be {0}", url), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line hidden -#line 30 +#line 32 testRunner.And(string.Format("the volunteer\'s page title should be {0}", pageTitle), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden } @@ -255,50 +258,50 @@ public virtual void PrimaryNavigationNarrowScreen(string name, string index, str } [TechTalk.SpecRun.ScenarioAttribute("Primary navigation (narrow screen), Request Help", new string[] { - "800pxWidth"}, SourceLine=33)] + "800pxWidth"}, SourceLine=35)] public virtual void PrimaryNavigationNarrowScreen_RequestHelp() { -#line 25 +#line 27 this.PrimaryNavigationNarrowScreen("Request Help", "1", "request-help/", "Request Help - Help My Street", ((string[])(null))); #line hidden } [TechTalk.SpecRun.ScenarioAttribute("Primary navigation (narrow screen), Case Studies", new string[] { - "800pxWidth"}, SourceLine=33)] + "800pxWidth"}, SourceLine=35)] public virtual void PrimaryNavigationNarrowScreen_CaseStudies() { -#line 25 +#line 27 this.PrimaryNavigationNarrowScreen("Case Studies", "2", "case-studies", "Case Studies - Help My Street", ((string[])(null))); #line hidden } [TechTalk.SpecRun.ScenarioAttribute("Primary navigation (narrow screen), Resources", new string[] { - "800pxWidth"}, SourceLine=33)] + "800pxWidth"}, SourceLine=35)] public virtual void PrimaryNavigationNarrowScreen_Resources() { -#line 25 +#line 27 this.PrimaryNavigationNarrowScreen("Resources", "3", "resources", "Resources - Help My Street", ((string[])(null))); #line hidden } [TechTalk.SpecRun.ScenarioAttribute("Primary navigation (narrow screen), Questions", new string[] { - "800pxWidth"}, SourceLine=33)] + "800pxWidth"}, SourceLine=35)] public virtual void PrimaryNavigationNarrowScreen_Questions() { -#line 25 +#line 27 this.PrimaryNavigationNarrowScreen("Questions", "4", "questions", "Frequently Asked Questions - Help My Street", ((string[])(null))); #line hidden } [TechTalk.SpecRun.ScenarioAttribute("No further primary navigation links (narrow screen)", new string[] { - "800pxWidth"}, SourceLine=39)] + "800pxWidth"}, SourceLine=41)] public virtual void NoFurtherPrimaryNavigationLinksNarrowScreen() { string[] tagsOfScenario = new string[] { "800pxWidth"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("No further primary navigation links (narrow screen)", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 40 +#line 42 this.ScenarioInitialize(scenarioInfo); #line hidden bool isScenarioIgnored = default(bool); @@ -318,10 +321,10 @@ public virtual void NoFurtherPrimaryNavigationLinksNarrowScreen() else { this.ScenarioStart(); -#line 41 +#line 43 testRunner.Given("the volunteer has clicked the element #site-nav-toggle", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line hidden -#line 42 +#line 44 testRunner.Then("the volunteer\'s element #sitenavCollapsed #site-nav ul li:nth-child(5) a should n" + "ot be visible", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line hidden @@ -344,7 +347,7 @@ public virtual void FooterNavigation(string name, string index, string url, stri argumentsOfScenario.Add("url", url); argumentsOfScenario.Add("Page Title", pageTitle); TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Footer navigation", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 46 +#line 48 this.ScenarioInitialize(scenarioInfo); #line hidden bool isScenarioIgnored = default(bool); @@ -364,16 +367,16 @@ public virtual void FooterNavigation(string name, string index, string url, stri else { this.ScenarioStart(); -#line 47 +#line 49 testRunner.Given(string.Format("the volunteer\'s element footer a:nth-child({0}) should have text {1}", index, name), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); #line hidden -#line 48 +#line 50 testRunner.When(string.Format("the volunteer clicks the element footer a:nth-child({0})", index), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); #line hidden -#line 49 +#line 51 testRunner.Then(string.Format("the volunteer\'s url should be {0}", url), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line hidden -#line 50 +#line 52 testRunner.And(string.Format("the volunteer\'s page title should be {0}", pageTitle), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden } @@ -381,50 +384,50 @@ public virtual void FooterNavigation(string name, string index, string url, stri } [TechTalk.SpecRun.ScenarioAttribute("Footer navigation, Privacy Policy", new string[] { - "MaximiseWindows"}, SourceLine=53)] + "MaximiseWindows"}, SourceLine=55)] public virtual void FooterNavigation_PrivacyPolicy() { -#line 46 +#line 48 this.FooterNavigation("Privacy Policy", "2", "privacy-policy", "Privacy Policy - Help My Street", ((string[])(null))); #line hidden } [TechTalk.SpecRun.ScenarioAttribute("Footer navigation, Terms & Conditions", new string[] { - "MaximiseWindows"}, SourceLine=53)] + "MaximiseWindows"}, SourceLine=55)] public virtual void FooterNavigation_TermsConditions() { -#line 46 +#line 48 this.FooterNavigation("Terms & Conditions", "3", "terms-conditions", "Terms and Conditions - Help My Street", ((string[])(null))); #line hidden } [TechTalk.SpecRun.ScenarioAttribute("Footer navigation, About Us", new string[] { - "MaximiseWindows"}, SourceLine=53)] + "MaximiseWindows"}, SourceLine=55)] public virtual void FooterNavigation_AboutUs() { -#line 46 +#line 48 this.FooterNavigation("About Us", "4", "about-us", "About Us - Help My Street", ((string[])(null))); #line hidden } [TechTalk.SpecRun.ScenarioAttribute("Footer navigation, Contact Us", new string[] { - "MaximiseWindows"}, SourceLine=53)] + "MaximiseWindows"}, SourceLine=55)] public virtual void FooterNavigation_ContactUs() { -#line 46 +#line 48 this.FooterNavigation("Contact Us", "5", "contact-us", "Contact Us - Help My Street", ((string[])(null))); #line hidden } [TechTalk.SpecRun.ScenarioAttribute("No further footer navigation links (narrow screen)", new string[] { - "MaximiseWindows"}, SourceLine=59)] + "MaximiseWindows"}, SourceLine=61)] public virtual void NoFurtherFooterNavigationLinksNarrowScreen() { string[] tagsOfScenario = new string[] { "MaximiseWindows"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("No further footer navigation links (narrow screen)", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 60 +#line 62 this.ScenarioInitialize(scenarioInfo); #line hidden bool isScenarioIgnored = default(bool); @@ -444,7 +447,7 @@ public virtual void NoFurtherFooterNavigationLinksNarrowScreen() else { this.ScenarioStart(); -#line 61 +#line 63 testRunner.Then("the volunteer\'s element footer a:nth-child(6) should not be visible", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line hidden }