public void ChangeCardWidgetTemplate() { BAT.Macros().NavigateTo().Pages(this.Culture); BAT.Wrappers().Backend().Pages().PagesWrapper().OpenPageZoneEditor(PageName); BATFeather.Wrappers().Backend().Pages().PageZoneEditorWrapper().EditWidget(WidgetName); BATFeather.Wrappers().Backend().Card().CardWrapper().FillHeadingText(HeadingText); BATFeather.Wrappers().Backend().Card().CardWrapper().FillTextArea(TextArea); BATFeather.Wrappers().Backend().Card().CardWrapper().ClickSelectImageButton(); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().WaitForContentToBeLoaded(isEmptyScreen: false); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().SelectMediaFile(ImageTitle); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().DoneSelecting(); BATFeather.Wrappers().Backend().Card().CardWrapper().FillLabel(LabelText); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().ClickSelectButton(0); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().SelectItemsInHierarchicalSelector(PageName2); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().DoneSelecting(); BATFeather.Wrappers().Backend().Navigation().NavigationWidgetEditWrapper().MoreOptions(); BATFeather.Wrappers().Backend().Card().CardWrapper().SelectCardWidetTemplate(CardWidgetTemplate); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SaveChanges(); BAT.Wrappers().Backend().Pages().PageZoneEditorWrapper().PublishPage(); BAT.Macros().NavigateTo().CustomPage("~/" + PageName.ToLower(), false, this.Culture); BATFeather.Wrappers().Frontend().Card().CardWrapper().VerifyCardWidgetContentOnFrontend(HeadingText, true); BATFeather.Wrappers().Frontend().Card().CardWrapper().VerifyCardWidgetContentOnFrontend(TextArea, true); BATFeather.Wrappers().Frontend().Card().CardWrapper().VerifyImageIsPresentOnFrontend(ImageTitle); BATFeather.Wrappers().Frontend().Card().CardWrapper().VerifyCardWidgetContentOnFrontend(LabelText, true); BATFeather.Wrappers().Frontend().Card().CardWrapper().VerifyPageIsPresentOnFrontend(LabelText, PageName2.ToLower()); }
public void AddCardWidgetOnPageBasedOnBootstrapTemplate() { BAT.Macros().NavigateTo().Pages(this.Culture); BAT.Wrappers().Backend().Pages().PagesWrapper().OpenPageZoneEditor(PageName); BATFeather.Wrappers().Backend().Pages().PageZoneEditorWrapper().AddWidgetToPlaceHolderPureMvcMode(WidgetName); BATFeather.Wrappers().Backend().Pages().PageZoneEditorWrapper().EditWidget(WidgetName); BATFeather.Wrappers().Backend().Card().CardWrapper().FillHeadingText(HeadingText); BATFeather.Wrappers().Backend().Card().CardWrapper().FillTextArea(TextArea); BATFeather.Wrappers().Backend().Card().CardWrapper().ClickSelectImageButton(); BATFeather.Wrappers().Backend().Media().MediaSelectorWrapper().SelectMediaFile(ImageTitle); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().DoneSelecting(); BATFeather.Wrappers().Backend().Card().CardWrapper().FillLabel(LabelText); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().ClickSelectButton(0); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().WaitForItemsToAppear(2); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().SelectItemsInPageSelector(PageName2); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().DoneSelecting(); BATFeather.Wrappers().Backend().Widgets().WidgetDesignerWrapper().SaveChanges(); BAT.Wrappers().Backend().Pages().PageZoneEditorWrapper().PublishPage(); BAT.Macros().NavigateTo().CustomPage("~/" + PageName.ToLower(), false, this.Culture, new HtmlFindExpression("id=PublicWrapper", "class=sfPublicWrapper")); BATFeather.Wrappers().Frontend().Card().CardWrapper().VerifyCardWidgetContentOnFrontend(HeadingText); BATFeather.Wrappers().Frontend().Card().CardWrapper().VerifyCardWidgetContentOnFrontend(TextArea); BATFeather.Wrappers().Frontend().Card().CardWrapper().VerifyImageIsPresentOnFrontend(ImageTitle); BATFeather.Wrappers().Frontend().Card().CardWrapper().VerifyCardWidgetContentOnFrontend(LabelText); BATFeather.Wrappers().Frontend().Card().CardWrapper().VerifyPageIsPresentOnFrontend(LabelText, PageName2.ToLower()); BATFeather.Wrappers().Frontend().Card().CardWrapper().ClickOnCardWidgetPageFromFrontend(LabelText); Assert.IsTrue(ActiveBrowser.ContainsText(Content), "Content block text was found but it shouldn't"); }