public void VerifyCloudStyleTemplate(Dictionary<string, int> styledTags, TagsTemplates template)
        {
            HtmlUnorderedList list = null;
            switch (template)
            {
                case TagsTemplates.CloudList:
                    list = this.ActiveBrowser.Find.ByExpression<HtmlUnorderedList>("class=sf-Tags list-unstyled").AssertIsPresent("unordered list for Cloud list template");
                    break;
                case TagsTemplates.TagCloud:
                    list = this.ActiveBrowser.Find.ByExpression<HtmlUnorderedList>("class=sf-Tags list-unstyled list-inline").AssertIsPresent("unordered list for Tags Cloud template");
                    break;
            }

            foreach (var tag in styledTags)
            {
                list.Find.ByExpression<HtmlAnchor>("innertext=" + tag.Key, "class=sf-Tags-size" + tag.Value).AssertIsPresent("anchor with correct size and inner text");
            }

            var allLinks = list.Find.AllByExpression<HtmlAnchor>("class=~sf-Tags");
            Assert.AreEqual(styledTags.Count, allLinks.Count, "Expected and actual count of tag links are not equal");
        }
Ejemplo n.º 2
0
        public void VerifyCloudStyleTemplate(Dictionary <string, int> styledTags, TagsTemplates template)
        {
            HtmlUnorderedList list = null;

            switch (template)
            {
            case TagsTemplates.CloudList:
                list = this.ActiveBrowser.Find.ByExpression <HtmlUnorderedList>("class=sf-Tags list-unstyled").AssertIsPresent("unordered list for Cloud list template");
                break;

            case TagsTemplates.TagCloud:
                list = this.ActiveBrowser.Find.ByExpression <HtmlUnorderedList>("class=sf-Tags list-unstyled list-inline").AssertIsPresent("unordered list for Tags Cloud template");
                break;
            }

            foreach (var tag in styledTags)
            {
                list.Find.ByExpression <HtmlAnchor>("innertext=" + tag.Key, "class=sf-Tags-size" + tag.Value).AssertIsPresent("anchor with correct size and inner text");
            }

            var allLinks = list.Find.AllByExpression <HtmlAnchor>("class=~sf-Tags");

            Assert.AreEqual(styledTags.Count, allLinks.Count, "Expected and actual count of tag links are not equal");
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Verifies the selected tags template option.
        /// </summary>
        /// <param name="template">The template.</param>
        public void VerifySelectedTagsTemplateOption(TagsTemplates template)
        {
            HtmlSelect optionsDropdown = this.EM.Classifications.TagsWidgetEditScreen.TagsTemplateDropdown.AssertIsPresent("Tags template dropdown");

            Assert.AreEqual(template.ToString(), optionsDropdown.SelectedOption.Value);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Selects the tags template.
        /// </summary>
        /// <param name="template">The template.</param>
        public void SelectTagsTemplate(TagsTemplates template)
        {
            HtmlSelect templateDropdown = this.EM.Classifications.TagsWidgetEditScreen.TagsTemplateDropdown.AssertIsPresent("Tags template dropdown");

            templateDropdown.SelectByValue(template.ToString(), true);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Verifies the selected tags template option.
        /// </summary>
        /// <param name="template">The template.</param>
        public void VerifySelectedTagsTemplateOption(TagsTemplates template)
        {
            HtmlSelect optionsDropdown = this.EM.Classifications.TagsWidgetEditScreen.TagsTemplateDropdown.AssertIsPresent("Tags template dropdown");

            Assert.AreEqual(template.ToString(), optionsDropdown.SelectedOption.Text);
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Selects the tags template.
 /// </summary>
 /// <param name="template">The template.</param>
 public void SelectTagsTemplate(TagsTemplates template)
 {
     HtmlSelect templateDropdown = this.EM.Classifications.TagsWidgetEditScreen.TagsTemplateDropdown.AssertIsPresent("Tags template dropdown");
     templateDropdown.SelectByText(template.ToString(), true);
 }