/// <summary> /// Performs Server Setup and prepare the system with needed data. /// </summary> protected override void ServerSetup() { RuntimeSettingsModificator.ExecuteWithClientTimeout(800000, () => BAT.Macros().NavigateTo().CustomPage("~/sitefinity/pages", false)); RuntimeSettingsModificator.ExecuteWithClientTimeout(800000, () => BAT.Macros().User().EnsureAdminLoggedIn()); BAT.Arrange(this.TestName).ExecuteSetUp(); }
/// <summary> /// /// Performs clean up and clears all data created by the test. /// </summary> protected override void ServerCleanup() { BAT.Macros().User().EnsureAdminLoggedIn(); BAT.Arrange(this.TestName).ExecuteTearDown(); }
public void DeactivateFeatherAndDeleteWidgetFromHybridPageTemplate() { var featherDeactivated = false; try { // Add widget to template RuntimeSettingsModificator.ExecuteWithClientTimeout(ClientTimeoutInterval, () => BAT.Macros().User().EnsureAdminLoggedIn()); RuntimeSettingsModificator.ExecuteWithClientTimeout(ClientTimeoutInterval, () => BAT.Macros().NavigateTo().CustomPage(PageTemplatesPageUrl, false, null, new HtmlFindExpression("InnerText=" + PageTemplateName))); BAT.Wrappers().Backend().PageTemplates().PageTemplateMainScreen().OpenTemplateEditor(PageTemplateName); BATFrontend.Wrappers().Backend().Pages().PageZoneEditorWrapper().DragAndDropWidgetToPlaceholder(WidgetName, Placeholder); Assert.IsTrue(BAT.Wrappers().Frontend().Pages().PagesWrapperFrontend().IsHtmlControlPresent(WidgetContent)); BAT.Wrappers().Backend().PageTemplates().PageTemplateModifyScreen().PublishTemplate(); // Verify on frontend RuntimeSettingsModificator.ExecuteWithClientTimeout(ClientTimeoutInterval, () => BAT.Macros().NavigateTo().CustomPage(PageUrl, false)); Assert.IsTrue(BAT.Wrappers().Frontend().Pages().PagesWrapperFrontend().IsHtmlControlPresent(WidgetContent)); // Deactivate Feather BATFrontend.Wrappers().Backend().FrontendModule().FrontendModule().DeactivateFeather(ActiveBrowser); featherDeactivated = true; // Verify on frontend RuntimeSettingsModificator.ExecuteWithClientTimeout(ClientTimeoutInterval, () => BAT.Macros().NavigateTo().CustomPage(PageUrl, false)); Assert.IsFalse(BAT.Wrappers().Frontend().Pages().PagesWrapperFrontend().IsHtmlControlPresent(WidgetContent)); // Remove widget from template RuntimeSettingsModificator.ExecuteWithClientTimeout(ClientTimeoutInterval, () => BAT.Macros().User().EnsureAdminLoggedIn()); RuntimeSettingsModificator.ExecuteWithClientTimeout(ClientTimeoutInterval, () => BAT.Macros().NavigateTo().CustomPage(PageTemplatesPageUrl, false, null, new HtmlFindExpression("InnerText=" + PageTemplateName))); BAT.Wrappers().Backend().PageTemplates().PageTemplateMainScreen().OpenTemplateEditor(PageTemplateName); BAT.Wrappers().Backend().Pages().PageZoneEditorWrapper().DeleteWidget(WidgetName); Assert.IsFalse(BAT.Wrappers().Frontend().Pages().PagesWrapperFrontend().IsHtmlControlPresent(WidgetContent)); BAT.Wrappers().Backend().PageTemplates().PageTemplateModifyScreen().PublishTemplate(); // Verify on frontend RuntimeSettingsModificator.ExecuteWithClientTimeout(ClientTimeoutInterval, () => BAT.Macros().NavigateTo().CustomPage(PageUrl, false)); Assert.IsFalse(BAT.Wrappers().Frontend().Pages().PagesWrapperFrontend().IsHtmlControlPresent(WidgetContent)); // Activate Feather BATFrontend.Wrappers().Backend().FrontendModule().FrontendModule().ActivateFeather(ActiveBrowser); featherDeactivated = false; } finally { if (featherDeactivated) { // Activate Feather if Test Failed BATFrontend.Wrappers().Backend().FrontendModule().FrontendModule().ActivateFeather(ActiveBrowser); } } }
public void CheckNavigationInImageSelector() { BAT.Macros().NavigateTo().Pages(this.Culture); BAT.Wrappers().Backend().Pages().PagesWrapper().OpenPageZoneEditor(PageName); BATFeather.Wrappers().Backend().Pages().PageZoneEditorWrapper().EditWidget(WidgetName); BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().OpenImageSelector(); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifySelectedFilter(SelectedFilterName); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfMediaFiles(3); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfFolders(0); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectMediaFiles(ImageName1, ImageName2, ImageName3); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().SelectFilter(MyImages); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfMediaFiles(2); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfFolders(0); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectMediaFiles(ImageName1, ImageName2); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().SelectFilter(AllLibraries); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfMediaFiles(0); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfFolders(2); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectFolders(DefaultLibrary, LibraryName); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().SelectFolder(LibraryName); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfMediaFiles(1); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfFolders(1); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectMediaFiles(ImageName1); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectFolders(ChildImageLibrary); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().SelectFolder(ChildImageLibrary); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfMediaFiles(1); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfFolders(1); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectMediaFiles(ImageName2); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectFolders(NextChildImageLibrary); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().SelectFolder(NextChildImageLibrary); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfMediaFiles(1); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfFolders(0); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectMediaFiles(ImageName3); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().SelectFolderFromBreadCrumb(ChildImageLibrary); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfMediaFiles(1); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfFolders(1); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectMediaFiles(ImageName2); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectFolders(NextChildImageLibrary); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().SelectFolderFromSideBar(NextChildImageLibrary); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfMediaFiles(1); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfFolders(0); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectMediaFiles(ImageName3); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().SelectMediaFile(ImageName3); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().ConfirmMediaFileSelection(); Assert.IsTrue(BATFeather.Wrappers().Backend().Media().ImagePropertiesWrapper().IsTitlePopulated(ImageName3), "Image title is not populated correctly"); Assert.IsTrue(BATFeather.Wrappers().Backend().Media().ImagePropertiesWrapper().IsImageAltTextPopulated(ImageAltText), "Image alt text is not populated correctly"); BATFeather.Wrappers().Backend().Media().ImagePropertiesWrapper().ConfirmMediaProperties(); BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().SaveChanges(); BAT.Wrappers().Backend().Pages().PageZoneEditorWrapper().PublishPage(); this.VerifyFrontend(); }
/// <summary> /// Forces calling initialize methods that will prepare test with data and resources. This method must be overridden if you want /// in your test case. /// </summary> protected override void ServerSetup() { RuntimeSettingsModificator.ExecuteWithClientTimeout(200000, () => BAT.Macros().User().EnsureAdminLoggedIn()); BAT.Arrange(this.TestName).ExecuteSetUp(); BAT.Wrappers().Backend().ModuleBuilder().ModuleInitializerWrapper().WaitForSystemRestart(); }
/// <summary> /// Performs Server Setup and prepare the system with needed data. /// </summary> protected override void ServerSetup() { BAT.Macros().User().EnsureAdminLoggedIn(); }
private void NavigateToModulesAndServicesPage() { RuntimeSettingsModificator.ExecuteWithClientTimeout(ClientTimeoutInterval, () => BAT.Macros().User().EnsureAdminLoggedIn()); RuntimeSettingsModificator.ExecuteWithClientTimeout(ClientTimeoutInterval, () => BAT.Macros().NavigateTo().CustomPage(ModulesAndServicesPageUrl, false)); }
public void ValidateAllFieldsAndChangeUserInfoInProfileWidget() { this.LoginUser(UserEmail, UserPassword); ////Verify first and last name empty fields message BAT.Macros().NavigateTo().CustomPage("~/" + PageName.ToLower(), true, this.Culture); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().FillFirstName(string.Empty); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().FillLastName(string.Empty); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().SaveChangesButton(); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().AssertFirstNameFieldMessage(); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().AssertLastNameFieldMessage(); ////Change first and last name BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().FillFirstName(UserFirstNameEdited); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().FillLastName(UserLastNameEdited); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().SaveChangesButton(); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().AssertSuccessfullySavedMessage(); ////Verify new password and retype empty fields message BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().ChangePasswordLink(); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().FillOldPassword(OldPassword); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().SaveChangesButton(); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().AssertNewPasswordInvalidFieldMessage(); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().AssertRetypePasswordInvalidFieldMessage(); ////Verify old password empty field message BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().FillNewPassword(UserPasswordEdited); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().FillRetypePassword(UserPasswordEdited); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().SaveChangesButton(); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().AssertOldPasswordInvalidFieldMessage(); ////Verify short password validation message BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().FillOldPassword(OldPassword); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().FillNewPassword(ShortPassword); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().FillRetypePassword(ShortPassword); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().SaveChangesButton(); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().AssertPasswordLengthFieldMessage(); ////Verify wrong re-type password validation message BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().FillOldPassword(OldPassword); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().FillNewPassword(UserPasswordEdited); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().FillRetypePassword(WrongPassword); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().SaveChangesButton(); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().AssertNewAndRepeatPassDoNotMatchFieldMessage(); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().AssertRepeatAndNewPassDoNotMatchFieldMessage(); ////Change password BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().FillOldPassword(OldPassword); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().FillNewPassword(UserPasswordEdited); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().FillRetypePassword(UserPasswordEdited); BATFeather.Wrappers().Frontend().Identity().ProfileWrapper().SaveChangesButton(); ////Log in with new password BAT.Macros().User().LogOut(); this.LoginUser(UserEmail, UserPasswordEdited); BAT.Macros().User().LogOut(); }
public void LoginFormAddChangeRemoveRedirectToPageAfterLogin() { // Edit the page with login form and select page to redirect after login BAT.Macros().NavigateTo().Pages(this.Culture); BAT.Wrappers().Backend().Pages().PagesWrapper().OpenPageZoneEditor(LoginPageName); BATFeather.Wrappers().Backend().Pages().PageZoneEditorWrapper().EditWidget(LoginFormWidget); BATFeather.Wrappers().Backend().Identity().LoginFormWrapper().ClickSelectButtonForRedirectToPage(); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().SelectItemsInFlatSelector(this.pageToSelect); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().DoneSelecting(); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().VerifySelectedItemsFromFlatSelector(this.pageToSelect); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SaveChanges(); BAT.Wrappers().Backend().Pages().PageZoneEditorWrapper().PublishPage(); BAT.Macros().User().LogOut(); BAT.Macros().NavigateTo().CustomPage("~/" + LoginPageName.ToLower(), false, this.Culture); BATFeather.Wrappers().Frontend().Identity().LoginFormWrapper().EnterUserName(AdminUserName); BATFeather.Wrappers().Frontend().Identity().LoginFormWrapper().EnterPassword(AdminPassword); BATFeather.Wrappers().Frontend().Identity().LoginFormWrapper().PressLoginButton(); BATFeather.Wrappers().Frontend().CommonWrapper().WaitForNewPageToLoad(this.pageToSelect[0].ToLower(), false); // Edit the page with login form and CHANGE the page to redirect after login BAT.Macros().NavigateTo().Pages(this.Culture); BAT.Wrappers().Backend().Pages().PagesWrapper().OpenPageZoneEditor(LoginPageName); BATFeather.Wrappers().Backend().Pages().PageZoneEditorWrapper().EditWidget(LoginFormWidget); BATFeather.Wrappers().Backend().Identity().LoginFormWrapper().ClickSelectButtonForRedirectToPage(); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().SelectItemsInFlatSelector(this.pageToChange); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().DoneSelecting(); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().VerifySelectedItemsFromFlatSelector(this.pageToChange); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SaveChanges(); BAT.Wrappers().Backend().Pages().PageZoneEditorWrapper().PublishPage(); BAT.Macros().User().LogOut(); BAT.Macros().NavigateTo().CustomPage("~/" + LoginPageName.ToLower(), false, this.Culture); BATFeather.Wrappers().Frontend().Identity().LoginFormWrapper().EnterUserName(AdminUserName); BATFeather.Wrappers().Frontend().Identity().LoginFormWrapper().EnterPassword(AdminPassword); BATFeather.Wrappers().Frontend().Identity().LoginFormWrapper().PressLoginButton(); BATFeather.Wrappers().Frontend().CommonWrapper().WaitForNewPageToLoad(this.pageToChange[0].ToLower(), false); // Edit the page with login form and REMOVE the page to redirect after login BAT.Macros().NavigateTo().Pages(this.Culture); BAT.Wrappers().Backend().Pages().PagesWrapper().OpenPageZoneEditor(LoginPageName); BATFeather.Wrappers().Backend().Pages().PageZoneEditorWrapper().EditWidget(LoginFormWidget); BATFeather.Wrappers().Backend().Identity().LoginFormWrapper().ClickSelectButtonForRedirectToPage(); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().SelectItemsInFlatSelector(this.pageToChange); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().DoneSelecting(); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SaveChanges(); BAT.Wrappers().Backend().Pages().PageZoneEditorWrapper().PublishPage(); BAT.Macros().User().LogOut(); BAT.Macros().NavigateTo().CustomPage("~/" + LoginPageName.ToLower(), false, this.Culture); BATFeather.Wrappers().Frontend().Identity().LoginFormWrapper().EnterUserName(AdminUserName); BATFeather.Wrappers().Frontend().Identity().LoginFormWrapper().EnterPassword(AdminPassword); BATFeather.Wrappers().Frontend().Identity().LoginFormWrapper().PressLoginButton(); BATFeather.Wrappers().Frontend().CommonWrapper().WaitForNewPageToLoad(LoginPageName.ToLower(), false); BATFeather.Wrappers().Frontend().Identity().LoginFormWrapper().AssertAlreadyLoggedInMessage(); }
public void SelectSortedVideosWithChangedThumbnails() { BAT.Macros().NavigateTo().Pages(this.Culture); BAT.Wrappers().Backend().Pages().PagesWrapper().OpenPageZoneEditor(PageName); BATFeather.Wrappers().Backend().Pages().PageZoneEditorWrapper().EditWidget(WidgetName); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SelectRadioButtonOption(WidgetDesignerRadioButtonIds.CurrentlyOpenLibrary); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SwitchToListSettingsTab(); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SelectOptionInSortingSelector("Title ASC"); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SelectOptionInThumbnailSelector("Thumbnail: 120x94 px cropped"); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SwitchToSingleItemSettingsTab(); BATFeather.Wrappers().Backend().Media().VideoPropertiesWrapper().VerifySelectedOptionAspectRatioSelector("Auto"); BATFeather.Wrappers().Backend().Media().VideoPropertiesWrapper().SelectOptionAspectRatioSelector("4x3"); BATFeather.Wrappers().Backend().Media().VideoPropertiesWrapper().VerifyWidthAndHeightValues("600", "450"); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SaveChanges(); BATFeather.Wrappers().Backend().Pages().PageZoneEditorMediaWrapper().VerifyCorrectOrderOfImagesOnBackend(VideoAltText + 1, VideoAltText + 2, VideoAltText + 3); for (int k = 0; k <= 2; k++) { if (k == 0) { string src = this.GetVideoSource(this.videoTitles[k], ImageType, LibraryName, "-vthumbnail.jpg"); BATFeather.Wrappers().Backend().Pages().PageZoneEditorMediaWrapper().VerifyImageThumbnail(this.videoTitles[k], src); } else { string src = this.GetVideoSource(this.videoTitles[k], ImageType, AnotherVideoLibraryTitle, "-vthumbnail.jpg"); BATFeather.Wrappers().Backend().Pages().PageZoneEditorMediaWrapper().VerifyImageThumbnail(this.videoTitles[k], src); } } BAT.Wrappers().Backend().Pages().PageZoneEditorWrapper().PublishPage(); BAT.Macros().NavigateTo().CustomPage("~/" + PageName.ToLower(), true, this.Culture); BATFeather.Wrappers().Frontend().ImageGallery().ImageGalleryWrapper().VerifyCorrectOrderOfImages(VideoAltText + 1, VideoAltText + 2, VideoAltText + 3); for (int i = 0; i <= 2; i++) { if (i == 0) { string src = this.GetVideoSource(this.videoTitles[i], ImageType, LibraryName, "-vthumbnail.jpg"); BATFeather.Wrappers().Frontend().ImageGallery().ImageGalleryWrapper().VerifyImage(VideoAltText + (i + 1), src); } else { string src = this.GetVideoSource(this.videoTitles[i], ImageType, AnotherVideoLibraryTitle, "-vthumbnail.jpg"); BATFeather.Wrappers().Frontend().ImageGallery().ImageGalleryWrapper().VerifyImage(VideoAltText + (i + 1), src); } } BATFeather.Wrappers().Frontend().ImageGallery().ImageGalleryWrapper().ClickImage(VideoAltText + 2); Assert.IsTrue(BATFeather.Wrappers().Frontend().VideoGallery().VideoGalleryWrapper().IsVideoTitlePresentOnDetailMasterPage(this.videoTitles[1])); var scr = this.GetVideodHref(this.videoTitles[1]); BATFeather.Wrappers().Frontend().VideoGallery().VideoGalleryWrapper().VerifyVideo(scr, Width, Height); var hrefPrevious = this.GetVideoHref(this.videoTitles[0], LibraryName); BATFeather.Wrappers().Frontend().VideoGallery().VideoGalleryWrapper().VerifyPreviousVideo(hrefPrevious); var hrefNext = this.GetVideoHref(this.videoTitles[2], AnotherVideoLibraryTitle); BATFeather.Wrappers().Frontend().VideoGallery().VideoGalleryWrapper().VerifyNextVideo(hrefNext); var hrefBack = "/" + PageName.ToLower() + "/" + "Index/"; BATFeather.Wrappers().Frontend().VideoGallery().VideoGalleryWrapper().VerifyBackToAllVideos(hrefBack); BAT.Macros().NavigateTo().CustomPage("~/" + PageName.ToLower() + "/" + AnotherVideoLibraryTitle.ToLower(), true, this.Culture); for (int j = 1; j <= 3; j++) { if (j == 1) { BATFeather.Wrappers().Frontend().VideoGallery().VideoGalleryWrapper().VerifyVideoIsNotPresent(VideoAltText + j); } else { var src = this.GetVideoSource(this.videoTitles[j - 1], ImageType, AnotherVideoLibraryTitle, "-vthumbnail.jpg"); BATFeather.Wrappers().Frontend().ImageGallery().ImageGalleryWrapper().VerifyImage(VideoAltText + j, src); } } BATFeather.Wrappers().Frontend().ImageGallery().ImageGalleryWrapper().VerifyCorrectOrderOfImages(VideoAltText + 2, VideoAltText + 3); }
/// <summary> /// Performs Server Setup and prepare the system with needed data. /// </summary> protected override void ServerSetup() { BAT.Macros().User().EnsureAdminLoggedIn(); BAT.Arrange(EventsTestsCommon.BaseArrangementName).ExecuteSetUp(); }
public void MvcWidgetUseMasterDetailContentController() { BAT.Macros().NavigateTo().CustomPage("~/" + PageName.ToLower(), false); Assert.IsTrue(ActiveBrowser.ContainsText(PageText), "Page text is not correct."); }
/// <summary> /// Close Browser /// <summary> public void CloseBrowserAndConfirmDialog() { var confirmDialog = BAT.Macros().DialogFacade().ConfirmDialog(); ActiveBrowser.Close(); }
public void CheckNavigationInDocumentSelector() { BAT.Macros().User().EnsureAdminLoggedIn(); BAT.Macros().NavigateTo().Pages(this.Culture); BAT.Wrappers().Backend().Pages().PagesWrapper().OpenPageZoneEditor(PageName); BATFeather.Wrappers().Backend().Pages().PageZoneEditorWrapper().EditWidget(WidgetName); BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().OpenDocumentSelector(); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().PressCancelButton(); BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().OpenDocumentSelector(); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifySelectedFilter(SelectedFilterName); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfMediaFiles(3, MediaType); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfFolders(0); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectMediaFiles(DocumentName1, DocumentName2, DocumentName3); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().SelectFilter(MyDocuments); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfMediaFiles(2, MediaType); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfFolders(0); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectMediaFiles(DocumentName1, DocumentName2); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().SelectFilter(AllLibraries); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfMediaFiles(0, MediaType); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfFolders(2); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectFolders(DefaultLibrary, LibraryName); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().SelectFolder(LibraryName); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfMediaFiles(1, MediaType); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfFolders(1); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectMediaFiles(DocumentName1); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectFolders(ChildLibrary); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().SelectFolder(ChildLibrary); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfMediaFiles(1, MediaType); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfFolders(1); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectMediaFiles(DocumentName2); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectFolders(NextChildLibrary); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().SelectFolder(NextChildLibrary); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfMediaFiles(1, MediaType); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfFolders(0); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectMediaFiles(DocumentName3); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().SelectFolderFromBreadCrumb(ChildLibrary); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfMediaFiles(1, MediaType); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfFolders(1); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectMediaFiles(DocumentName2); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectFolders(NextChildLibrary); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().SelectFolderFromSideBar(NextChildLibrary); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfMediaFiles(1, MediaType); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitCorrectCountOfFolders(0); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().VerifyCorrectMediaFiles(DocumentName3); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().SelectMediaFile(DocumentName3, true); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().ConfirmMediaFileSelection(); Assert.IsTrue(BATFeather.Wrappers().Backend().Media().DocumentPropertiesWrapper().IsTitlePopulated(DocumentName3), "Document title is not populated correctly"); BATFeather.Wrappers().Backend().Media().DocumentPropertiesWrapper().ConfirmMediaPropertiesDocsTemporary(); BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().SaveChanges(); BAT.Wrappers().Backend().Pages().PageZoneEditorWrapper().PublishPage(); this.VerifyFrontend(); }
public void SelectSortedImagesWithChangedThumbnails() { BAT.Macros().NavigateTo().Pages(this.Culture); BAT.Wrappers().Backend().Pages().PagesWrapper().OpenPageZoneEditor(PageName); BATFeather.Wrappers().Backend().Pages().PageZoneEditorWrapper().EditWidget(WidgetName); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SelectRadioButtonOption(WidgetDesignerRadioButtonIds.currentlyOpenLibrary); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SwitchToListSettingsTab(); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SelectOptionInSortingSelector("Title ASC"); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SelectOptionInThumbnailSelector("Small: 240 px width"); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SwitchToSingleItemSettingsTab(); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SelectOptionInThumbnailSelector("Thumbnail: 120x120 px cropped", false); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SaveChanges(); BATFeather.Wrappers().Backend().Pages().PageZoneEditorMediaWrapper().VerifyCorrectOrderOfImagesOnBackend(ImageAltText + 1, ImageAltText + 2, ImageAltText + 3); for (int k = 0; k <= 2; k++) { if (k == 0) { string src = this.GetImageSource(false, this.imageTitles[k], ImageType, LibraryName, "-small.jpg"); BATFeather.Wrappers().Backend().Pages().PageZoneEditorMediaWrapper().VerifyImageThumbnail(this.imageTitles[k], src); } else { string src = this.GetImageSource(false, this.imageTitles[k], ImageType, AnotherImageLibraryTitle, "-small.jpg"); BATFeather.Wrappers().Backend().Pages().PageZoneEditorMediaWrapper().VerifyImageThumbnail(this.imageTitles[k], src); } } BAT.Wrappers().Backend().Pages().PageZoneEditorWrapper().PublishPage(); BAT.Macros().NavigateTo().CustomPage("~/" + PageName.ToLower(), true, this.Culture); BATFeather.Wrappers().Frontend().ImageGallery().ImageGalleryWrapper().VerifyCorrectOrderOfImages(ImageAltText + 1, ImageAltText + 2, ImageAltText + 3); for (int i = 0; i <= 2; i++) { if (i == 0) { string src = this.GetImageSource(false, this.imageTitles[i], ImageType, LibraryName, "-small.jpg"); BATFeather.Wrappers().Frontend().ImageGallery().ImageGalleryWrapper().VerifyImage(ImageAltText + (i + 1), src); } else { string src = this.GetImageSource(false, this.imageTitles[i], ImageType, AnotherImageLibraryTitle, "-small.jpg"); BATFeather.Wrappers().Frontend().ImageGallery().ImageGalleryWrapper().VerifyImage(ImageAltText + (i + 1), src); } } BATFeather.Wrappers().Frontend().ImageGallery().ImageGalleryWrapper().ClickImage(ImageAltText + 2); Assert.IsTrue(BATFeather.Wrappers().Frontend().ImageGallery().ImageGalleryWrapper().IsImageTitlePresentOnDetailMasterPage(this.imageTitles[1])); var scr = this.GetImageSource(false, this.imageTitles[1], ImageType, AnotherImageLibraryTitle, "-thumbnail.jpg"); BATFeather.Wrappers().Frontend().ImageGallery().ImageGalleryWrapper().VerifyImage(ImageAltText + 2, scr); var hrefPrevious = this.GetImageHref(true, this.imageTitles[0], LibraryName); BATFeather.Wrappers().Frontend().ImageGallery().ImageGalleryWrapper().VerifyPreviousImage(hrefPrevious); var hrefNext = this.GetImageHref(true, this.imageTitles[2], AnotherImageLibraryTitle); BATFeather.Wrappers().Frontend().ImageGallery().ImageGalleryWrapper().VerifyNextImage(hrefNext); var hrefBack = "/" + PageName.ToLower() + "/" + "Index/"; BATFeather.Wrappers().Frontend().ImageGallery().ImageGalleryWrapper().VerifyBackToAllImages(hrefBack); BAT.Macros().NavigateTo().CustomPage("~/" + PageName.ToLower() + "/" + AnotherImageLibraryTitle.ToLower(), true, this.Culture); for (int j = 1; j <= 3; j++) { if (j == 1) { BATFeather.Wrappers().Frontend().ImageGallery().ImageGalleryWrapper().VerifyImageIsNotPresent(ImageAltText + j); } else { var src = this.GetImageSource(false, this.imageTitles[j - 1], ImageType, AnotherImageLibraryTitle, "-small.jpg"); BATFeather.Wrappers().Frontend().ImageGallery().ImageGalleryWrapper().VerifyImage(ImageAltText + j, src); } } BATFeather.Wrappers().Frontend().ImageGallery().ImageGalleryWrapper().VerifyCorrectOrderOfImages(ImageAltText + 2, ImageAltText + 3); }
/// <summary> /// Forces calling initialize methods that will prepare test with data and resources. This method must be overridden if you want /// in your test case. /// </summary> protected override void ServerSetup() { BAT.Arrange(this.TestName).ExecuteArrangement("LoadApplication"); RuntimeSettingsModificator.ExecuteWithClientTimeout(200000, () => BAT.Macros().User().EnsureAdminLoggedIn()); BAT.Arrange(this.TestName).ExecuteSetUp(); }
/// <summary> /// Performs Server Setup and prepare the system with needed data. /// </summary> protected override void ServerSetup() { BAT.Macros().User().EnsureAdminLoggedIn(); BAT.Arrange(EditAndChangeSelectedImageArrangement).ExecuteSetUp(); }
/// <summary> /// Performs Server Setup and prepare the system with needed data. /// </summary> protected override void ServerSetup() { BAT.Macros().User().EnsureAdminLoggedIn(); BAT.Arrange(this.TestName).ExecuteSetUp(); currentProviderUrlName = BAT.Arrange(this.TestName).ExecuteArrangement("GetCurrentProviderUrlName").Result.Values["CurrentProviderUrlName"]; }
/// <summary> /// Verify news widget on the frontend /// </summary> public void VerifyNewsOnTheFrontend() { BAT.Macros().NavigateTo().CustomPage("~/" + PageName.ToLower(), true, this.Culture); Assert.IsTrue(BATFeather.Wrappers().Frontend().News().NewsWrapper().IsNewsTitlesPresentOnThePageFrontend(this.newsTitles)); }
/// <summary> /// Performs Server Setup and prepare the system with needed data. /// </summary> protected override void ServerSetup() { BAT.Macros().User().EnsureAdminLoggedIn(); BAT.Arrange(this.TestName).ExecuteSetUp(); }
public void ValidateAllFieldsInRegistrationWidget() { ////Verify all required fields message BAT.Macros().NavigateTo().CustomPage("~/" + RegistrationPage.ToLower(), false, this.Culture, new HtmlFindExpression("tagname=button", "InnerText=Register")); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().RegisterButton(); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().AssertEmptyEmailFieldMessage(); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().AssertEmptyUsernameFieldMessage(); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().AssertEmptyPasswordFieldMessage(); ////Verify existing user name validation message BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillEmail(Email); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillUserName(EditorUserName); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillPassword(Password); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillRetypePassword(Password); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().RegisterButton(); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().AssertExistingUserNameFieldMessage(); ////Verify existing email validation message BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillEmail(EditorUserEmail); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillUserName(UserName); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillPassword(Password); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillRetypePassword(Password); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().RegisterButton(); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().AssertExistingEmailAddressMessage(); ////Verify wrong email format validation message BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillEmail(WrongEmail); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillUserName(UserName); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillPassword(Password); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillRetypePassword(Password); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().RegisterButton(); Assert.IsFalse(ActiveBrowser.ContainsText(SuccessfullyRegisteredUserMessage), "Successfully registered message was found on the page"); ////Verify emtpy re-type password validation message BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillEmail(Email); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillUserName(UserName); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillPassword(Password); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillRetypePassword(string.Empty); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().RegisterButton(); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().AssertReTypePasswordFieldMessage(); ////Verify wrong re-type password validation message BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillEmail(Email); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillUserName(UserName); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillPassword(Password); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillRetypePassword(WrongPassword); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().RegisterButton(); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().AssertReTypePasswordFieldMessage(); ////Verify short password validation message BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillEmail(Email); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillUserName(UserName); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillPassword(ShortPassword); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().FillRetypePassword(ShortPassword); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().RegisterButton(); BATFeather.Wrappers().Frontend().Identity().RegistrationWrapper().AssertShortPasswordFieldMessage(); }