public void ThenThePageWillBeLoaded(string expectedPage) { var itemType = "page heading"; if (expectedPage == "Returns Policy" || expectedPage == "Contact Us" || expectedPage == "Home Page") { if (expectedPage == "Returns Policy" || expectedPage == "Contact Us") { InformationalPageAssertions.ConfirmInformationalPageHasBeenLoaded(itemType, expectedPage); } else if (expectedPage == "Home Page") { HomepageAssertions.ConfirmHomePageHasBeenLoaded(); } } else { switch (expectedPage) { case "All About Cookies": InformationalPageAssertions.ConfirmInformationalPageHyperLinksToExternalSitesAreCorrect(Urls.ExternalAllAboutCookies); break; case "Shopify Privacy": InformationalPageAssertions.ConfirmInformationalPageHyperLinksToExternalSitesAreCorrect(Urls.ExternalShopify); break; case "Google Privacy": InformationalPageAssertions.ConfirmInformationalPageHyperLinksToExternalSitesAreCorrect(Urls.ExternalGooglePrivacy); break; case "Google Opt Out": InformationalPageAssertions.ConfirmInformationalPageHyperLinksToExternalSitesAreCorrect(Urls.ExternalGoogleOptOut); break; case "Facebook Data Policy": InformationalPageAssertions.ConfirmInformationalPageHyperLinksToExternalSitesAreCorrect(Urls.ExternalFacebookAdvertising); break; default: Assert.Inconclusive(TestErrorHelper.CaseValueNotRecognised(expectedPage)); break; } } }
public void ThenTheInformationalPageWillLoad(string expectedHeading) { var itemType = "page heading"; InformationalPageAssertions.ConfirmInformationalPageHasBeenLoaded(itemType, expectedHeading); }