public void LinkSelectorInsertLinkToPageFromThisSiteOverSelectedText() { BAT.Macros().NavigateTo().Pages(this.Culture); BAT.Wrappers().Backend().Pages().PagesWrapper().OpenPageZoneEditor(LinkSelectorPageName); BATFeather.Wrappers().Backend().Pages().PageZoneEditorWrapper().EditWidget(WidgetName); BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().SelectAllContentInEditableArea(); BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().OpenLinkSelector(); BATFeather.Wrappers().Backend().ContentBlocks().LinkSelectorWrapper().SwitchToSelectedTab(SelectedTabName); Assert.IsFalse(BATFeather.Wrappers().Backend().ContentBlocks().LinkSelectorWrapper().IsInsertLinkButtonEnabled()); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().VerifyPageStatusAndIcon(LinkSelectorPageName, "Locked"); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().VerifyPageStatusAndIcon(ParentPageName, "Published"); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().SearchItemByTitle(SearchText); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().WaitForItemsToAppear(SearchResultsCount); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().VerifyNoItemsFound(); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().SearchItemByTitle(NewSearchText); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().WaitForItemsToAppear(NewSearchResultsCount); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().VerifyPageStatusAndIconAfterSearch(NewSearchText, "Published"); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().CheckBreadcrumbAfterSearchInFlatSelector(NewSearchText, ResultPageBreadcrumb); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().SelectItemsInFlatSelector(NewSearchText); BATFeather.Wrappers().Backend().ContentBlocks().LinkSelectorWrapper().VerifyCorrectTextToDisplay(TextToDisplay, TabIndex); BATFeather.Wrappers().Backend().ContentBlocks().LinkSelectorWrapper().InsertLink(); BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().VerifyContentBlockTextDesignMode(TextToDisplay); BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().SwitchToHtmlView(); BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().VerifyContentInHtmlEditableArea(this.HtmlContent()); BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().SaveChanges(); BAT.Wrappers().Backend().Pages().PageZoneEditorWrapper().PublishPage(); BAT.Macros().NavigateTo().CustomPage("~/" + LinkSelectorPageName.ToLower(), true, this.Culture); BATFeather.Wrappers().Frontend().CommonWrapper().VerifySelectedAnchorLink(TextToDisplay, ExpectedUrl); }
public void LinkSelectorInsertLinkToPageFromThisSite() { BAT.Macros().User().EnsureAdminLoggedIn(); BAT.Macros().NavigateTo().Pages(this.Culture); BAT.Wrappers().Backend().Pages().PagesWrapper().OpenPageZoneEditor(LinkSelectorPageName); BATFeather.Wrappers().Backend().Pages().PageZoneEditorWrapper().EditWidget(WidgetName); BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().OpenLinkSelector(); BATFeather.Wrappers().Backend().ContentBlocks().LinkSelectorWrapper().SwitchToSelectedTab(SelectedTabName); Assert.IsFalse(BATFeather.Wrappers().Backend().ContentBlocks().LinkSelectorWrapper().IsInsertLinkButtonEnabled()); BATFeather.Wrappers().Backend().Widgets().SelectorsWrapper().SelectItemsInHierarchicalSelector(this.selectedPageName); BATFeather.Wrappers().Backend().ContentBlocks().LinkSelectorWrapper().VerifyCorrectTextToDisplay(InsertedPageName, TabIndex); BATFeather.Wrappers().Backend().ContentBlocks().LinkSelectorWrapper().SelectOpenInNewWindowOption(TabIndex); BATFeather.Wrappers().Backend().ContentBlocks().LinkSelectorWrapper().InsertLink(); BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().VerifyContentBlockTextDesignMode(InsertedPageName); BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().ClickHtmlButton(); BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().VerifyContentInHtmlEditableArea(this.HtmlContent()); BATFeather.Wrappers().Backend().ContentBlocks().ContentBlocksWrapper().SaveChanges(); BAT.Wrappers().Backend().Pages().PageZoneEditorWrapper().PublishPage(); BAT.Macros().NavigateTo().CustomPage("~/" + LinkSelectorPageName.ToLower(), true, this.Culture); BATFeather.Wrappers().Frontend().CommonWrapper().VerifySelectedAnchorLink(InsertedPageName, ExpectedUrl, true); }