Exemplo n.º 1
0
 public void ThenUserIsCreatedCorrectly(string userName)
 {
     Thread.Sleep(2500);
     UserPage.AllDisplayLink.Click();
     Thread.Sleep(1000);
     WatiNAssert.AssertIsTrue(UserPage.UserTable.InnerHtml.Contains(userName), userName + "NotInUserTable.jpg");
 }
Exemplo n.º 2
0
 public void ThenUserIsCreatedCorrectly(string userName)
 {
     IEInstance.WaitForComplete();
     UserPage.AllDisplayLink.Click();
     IEInstance.WaitForComplete();
     WatiNAssert.AssertIsTrue(UserPage.UserTable.InnerHtml.Contains(userName), userName + "NotInUserTable.jpg");
 }
Exemplo n.º 3
0
        public void ThenIShouldBeOnTheSiteSettingsPage()
        {
            WatiNAssert.AssertIsTrue(SettingsPage.PageTitle.InnerHtml.Contains("Site Settings"), "NotOnSiteSettingsPage.jpg");
            var menu = new SiteMenu(HomePage);

            WatiNAssert.AssertIsTrue(menu.BreadCrumbSpan.InnerHtml.Contains("Site Settings"), "NotOnSiteSettingsPage2.jpg");
        }
Exemplo n.º 4
0
        public void APageShouldBeCreated(string pageName)
        {
            Thread.Sleep(1500);
            var menu = GetPage <SiteMenu>();

            WatiNAssert.AssertStringsAreEqual(pageName, menu.BreadCrumbSpan.Text, pageName + "NotInBreadcrumb.jpg");
            WatiNAssert.AssertIsTrue(menu.MainMenu.InnerHtml.Contains(pageName), pageName + "NotInMenu.jpg");
        }
Exemplo n.º 5
0
        public void ThenProfilePropertyIsCreatedCorrectly(string propertyName)
        {
            Thread.Sleep(1500);
            IEInstance.WaitForComplete();
            var propertyRow = ProfilePropertiesPage.GetPropertyRow(propertyName);

            WatiNAssert.AssertIsTrue(propertyRow != null, "Property_" + propertyName + "_CreatedError.jpg");
        }
Exemplo n.º 6
0
 public void ThenUserIsDeletedFromTheSite(string userName, string password, string displayName)
 {
     WatiNAssert.AssertIsTrue(UserPage.CheckUserDisplaysAsDeleted(displayName), displayName + "InUserTable.jpg");
     LoginPage.LogoffUser();
     Thread.Sleep(1500);
     LoginPage.LoginUser(userName, password);
     WatiNAssert.AssertIsTrue(LoginPage.LoginMessage.InnerHtml.Contains("Login Failed."), userName + "AbleToLogin.jpg");
 }
Exemplo n.º 7
0
        public void ThenTheLanguageIsAddedToTheLanguagePage(string languageName)
        {
            IEInstance.WaitForComplete();
            Span flagSpan = LanguagePage.GetLanguageFlagSpanByLocaleName(languageName);

            WatiNAssert.AssertIsTrue(flagSpan.Exists, "FlagSpanMissing.jpg");
            WatiNAssert.AssertIsTrue(flagSpan.ClassName.Equals("Language"), "FlagSpanError.jpg");
        }
Exemplo n.º 8
0
 public void ThenUserIsDeletedFromTheSite(string userName, string password, string displayName)
 {
     WatiNAssert.AssertIsTrue(UserPage.CheckUserDisplaysAsDeleted(displayName), displayName + "InUserTable.jpg");
     LoginPage.LogoffUser();
     IEInstance.WaitUntilContainsText("Login");
     LoginPage.LoginUser(userName, password, false, 0);
     WatiNAssert.AssertIsTrue(LoginPage.LoginMessage.InnerHtml.Contains("Login Failed."), userName + "AbleToLogin.jpg");
 }
Exemplo n.º 9
0
        public void ThenTheLanguageFrancaisCanadaIsAddedToTheSite(string languageName)
        {
            Span flagSpan = LanguagePage.GetLanguageFlagSpanByLocaleName(languageName);

            Thread.Sleep(5000);
            IEInstance.Refresh();
            WatiNAssert.AssertIsTrue(flagSpan.Exists, "FlagSpanMissing2.jpg");
            WatiNAssert.AssertIsTrue(flagSpan.ClassName.Equals("Language"), "FlagSpanError2.jpg");
        }
Exemplo n.º 10
0
        public void ThenThenSubjectInNotificationEmailShouldReplaceAllTokens()
        {
            var user         = UserController.GetUserByName(PortalId, TestUsers.Admin.UserName);
            var notification = NotificationsController.Instance.GetNotifications(user.UserID, PortalId, -1, 1)
                               .FirstOrDefault();

            WatiNAssert.AssertIsTrue(notification != null, "GetNotification_" + user.UserID + "_Error.jpg");
            Assert.IsTrue(notification.Subject.IndexOf("[", StringComparison.InvariantCultureIgnoreCase) == -1);
        }
Exemplo n.º 11
0
 public void ThenAsAnAnonymousUserOnThePageICanSeeTheModuleAndItsContent(string pageName, string moduleName, string moduleContent)
 {
     Thread.Sleep(1500);
     IEInstance.GoTo(SiteUrl);
     Thread.Sleep(1500);
     LoginPage.LogoffUser();
     Thread.Sleep(1500);
     pageName = pageName.Replace(" ", "");
     IEInstance.GoTo(SiteUrl + "/" + pageName + ".aspx");
     WatiNAssert.AssertIsTrue(HomePage.HtmlModuleExistsOnPage(moduleName, moduleContent), "AnonUserCannotSeeModule.jpg");
 }
Exemplo n.º 12
0
 public void DialogMustOpen(string dialogName)
 {
     if (HtmlModule.TelerikEditor.PopUpFrame != null)
     {
         WatiNAssert.AssertIsTrue(HtmlModule.TelerikEditor.PopUpFrame.Frame(Find.BySrc(s => s.Contains(dialogName))) != null, "DialogNotOpen.png");
     }
     else
     {
         WatiNAssert.AssertIsTrue(IEInstance.Frame(Find.BySrc(s => s.Contains(dialogName))) != null, "DialogNotOpen.png");
     }
 }
Exemplo n.º 13
0
        public void ThenTheLanguageIsAddedToTheLanguagePage(string languageName)
        {
            Span flagSpan = LanguagePage.GetLanguageFlagSpanByLocaleName(languageName);

            Thread.Sleep(5000);
            IEInstance.Refresh();
            Thread.Sleep(1500);
            WatiNAssert.AssertIsTrue(flagSpan.Exists, "FlagSpanMissing.jpg");
            WatiNAssert.AssertIsTrue(flagSpan.ClassName.Equals("Language"), "FlagSpanError.jpg");
            IEInstance.GoTo(SiteUrl + "/logoff.aspx");
        }
Exemplo n.º 14
0
 public void ThenAsAnAdminOnThePageICanSeeTheModuleAndItsContent(string pageName, string moduleName, string moduleContent)
 {
     Thread.Sleep(1500);
     IEInstance.GoTo(SiteUrl);
     Thread.Sleep(1500);
     LoginPage.LogoffUser();
     Thread.Sleep(1500);
     LoginPage.LoginUser(TestUsers.Admin.UserName, TestUsers.Admin.Password);
     pageName = pageName.Replace(" ", "");
     IEInstance.GoTo(SiteUrl + "/" + pageName + ".aspx");
     WatiNAssert.AssertIsTrue(HomePage.HtmlModuleExistsOnPage(moduleName, moduleContent), "MissingModuleForAdmin.jpg");
 }
Exemplo n.º 15
0
 public void ThenIShouldBeLoggedInAsTheUser(string userName)
 {
     Thread.Sleep(2500);
     WatiNAssert.AssertIsTrue(LoginPage.LoginLink.Text.ToLower() == "logout", userName + "NotLoggedIn.jpg", LoginPage.LoginLink.Text.ToLower());
     if (userName.Equals(TestUsers.Host.UserName))
     {
         WatiNAssert.AssertStringsAreEqual(TestUsers.Host.DisplayName, HomePage.RegisterLink.Text, "TestHostNotLoggedIn.jpg");
     }
     else if (userName.Equals(TestUsers.Admin.UserName))
     {
         WatiNAssert.AssertStringsAreEqual(TestUsers.Admin.DisplayName, HomePage.RegisterLink.Text, "AdminNotLoggedIn.jpg");
     }
 }
Exemplo n.º 16
0
        public void ThenThePageCalledTestPageIsDeleted(string pageName)
        {
            Thread.Sleep(2500);
            IEInstance.Refresh();
            var menu = GetPage <SiteMenu>();

            WatiNAssert.AssertIsFalse(menu.MainMenu.Link(Find.ByText(s => s.Contains(pageName))).Exists, pageName + "FoundInMenu.jpg", pageName + " found in main menu: " + menu.MainMenu.InnerHtml);
            IEInstance.GoTo(SiteUrl + "/Admin/RecycleBin.aspx");
            var recycleBin = GetPage <RecycleBinPage>();

            Thread.Sleep(1000);
            WatiNAssert.AssertIsTrue(recycleBin.PagesRecycleBin.InnerHtml.Contains(pageName), pageName + "NotFoundInRecycleBin.jpg", pageName + " not found in recycle bin: " + recycleBin.PagesRecycleBin.InnerHtml);
        }
Exemplo n.º 17
0
        public void ThenAChildPortalShouldBeCreatedCorrectly(string portalAlias, string portalTitle)
        {
            IEInstance.NativeBrowser.NavigateTo(new Uri("http://" + SiteUrl + "/host/sitemanagement.aspx"));
            IEInstance.WaitForComplete();

            WatiNAssert.AssertIsTrue(SiteManagementPage.PortalsTable.InnerHtml.Contains(portalTitle), portalTitle + "NotInSitesTable.jpg");

            IEInstance.GoTo(SiteUrl + "/" + portalAlias);
            IEInstance.WaitForComplete();
            WatiNAssert.AssertIsTrue(IEInstance.Image(Find.ById("dnn_dnnLogo_imgLogo")).Exists, "LogoNotFoundOnChildPortal.jpg");
            WatiNAssert.AssertIsTrue(HomePage.LogoLink.Exists, "LogoLinkNotFoundOnChildPortal.jpg");
            WatiNAssert.AssertIsTrue(HomePage.LoginLink.Exists, "LoginLinkNotFoundOnChildPortal.jpg");
            WatiNAssert.AssertIsTrue(HomePage.RegisterLink.Exists, "RegisterLinkNotFoundOnChildPortal.jpg");
        }
Exemplo n.º 18
0
 public void ThenAsUserOnThePageICanSeeTheModuleAndItsContent(string userName, string password, string pageName, string moduleName, string moduleContent)
 {
     Thread.Sleep(1500);
     IEInstance.GoTo(SiteUrl);
     Thread.Sleep(1500);
     if (HomePage.LoginLink.Text.ToLower() == "logout")
     {
         LoginPage.LogoffUser();
         Thread.Sleep(1500);
     }
     LoginPage.LoginUser(userName, password, true, 0);
     pageName = pageName.Replace(" ", "");
     IEInstance.GoTo(SiteUrl + "/" + pageName + ".aspx");
     Thread.Sleep(1500);
     WatiNAssert.AssertIsTrue(HomePage.HtmlModuleExistsOnPage(moduleName, moduleContent), "MissingModuleFor" + userName + ".jpg");
 }
Exemplo n.º 19
0
        public void ThenTheLanguageFrancaisCanadaIsAddedToTheSite(string languageName)
        {
            Span flagSpan = LanguagePage.GetLanguageFlagSpanByLocaleName(languageName);

            IEInstance.WaitForComplete();
            IEInstance.Refresh();
            WatiNAssert.AssertIsTrue(flagSpan.Exists, "FlagSpanMissing2.jpg");
            WatiNAssert.AssertIsTrue(flagSpan.ClassName.Equals("Language"), "FlagSpanError2.jpg");
            IEInstance.GoTo(SiteUrl + "/logoff.aspx");
            IEInstance.WaitForComplete();
            flagSpan.Link(Find.Any).ClickNoWait();
            IEInstance.WaitForComplete();
            if (languageName.Contains("français"))
            {
                WatiNAssert.AssertIsTrue(HomePage.LoginLink.Text.ToLower().Contains("connexion"), "LoginLinkTextIncorrect.jpg");
                WatiNAssert.AssertIsTrue(HomePage.RegisterLink.Text.ToLower().Contains("inscription"), "RegisterLinkTextIncorrect.jpg");
            }

            Span originalFlag = LanguagePage.GetLanguageFlagSpanByLocaleName("English (United States)");

            originalFlag.Link(Find.Any).ClickNoWait();
            IEInstance.WaitForComplete();
        }
Exemplo n.º 20
0
 public void ThenIShouldBeLoggedIn()
 {
     Thread.Sleep(1500);
     WatiNAssert.AssertIsTrue(LoginPage.LoginLink.Text.ToLower() == "logout", "UserNotLoggedIn.jpg");
 }
Exemplo n.º 21
0
        public void ThenUserProfilePageShouldNotAppearInTargetDropDownList()
        {
            var dropDown = RedirectionSettingsPage.TargetPageSelectList;

            WatiNAssert.AssertIsTrue(!dropDown.Option(Find.ByText("Activity Feed")).Exists, "UserProfileExistsIndropDown.png");
        }
Exemplo n.º 22
0
 public void ThenIShouldSeeTheHostSectionOnThePage()
 {
     WatiNAssert.AssertIsTrue(SettingsPage.HostSectionLink.Exists, "HostSettingsSectionNotOnPage.jpg");
 }
Exemplo n.º 23
0
 public void ThenIShouldSeeMySite()
 {
     IEInstance.WaitForComplete();
     WatiNAssert.AssertIsTrue(HomePage.LogoImage.Exists, "CantFindSite.jpg");
 }
Exemplo n.º 24
0
 public void ThenIShouldSeeMySite()
 {
     Thread.Sleep(2500);
     WatiNAssert.AssertIsTrue(HomePage.Title.Text.Contains("My Website"), "CantFindSite.jpg");
 }
Exemplo n.º 25
0
 public void IAmLoggedInAsTheRegisterUser(string displayName)
 {
     IEInstance.WaitUntilContainsText(displayName);
     WatiNAssert.AssertIsTrue(HomePage.RegisterLink.Text.StartsWith(displayName), displayName + "NotLoggedIn.jpg", HomePage.RegisterLink.Text);
 }
Exemplo n.º 26
0
 public void ThenSuperUserAccountIsCreatedCorrectly(string userName)
 {
     IEInstance.GoToNoWait(SiteUrl + "/Host/SuperuserAccounts.aspx");
     Thread.Sleep(2000);
     WatiNAssert.AssertIsTrue(HostUserPage.UserTable.InnerHtml.Contains(userName), userName + "NotInHostUserTable.jpg");
 }
Exemplo n.º 27
0
 public void ThenIShouldnTSeeManageUsersInThisRoleButton()
 {
     WatiNAssert.AssertIsTrue(!SecurityRolesPage.ManageUsersInRoleLink.Exists, "ManageUsersInRoleLinkExsits.png");
 }
Exemplo n.º 28
0
 public void IAmLoggedInAsTheRegisterUser(string displayName)
 {
     Thread.Sleep(2500);
     WatiNAssert.AssertIsTrue(HomePage.UserNameLink.Text.StartsWith(displayName), displayName + "NotLoggedIn.jpg", HomePage.UserNameLink.Text);
 }
Exemplo n.º 29
0
 public void ThenPasswordFieldSValueShouldBe(string expectedValue)
 {
     WatiNAssert.AssertIsTrue(RegisterPage.PasswordField.Value == expectedValue, "PasswordLost.png");
 }
Exemplo n.º 30
0
 public void ThenSuperUserAccountIsCreatedCorrectly(string userName)
 {
     Thread.Sleep(4000);
     WatiNAssert.AssertIsTrue(HostUserPage.UserTable.InnerHtml.Contains(userName), userName + "NotInHostUserTable.jpg");
 }