Exemplo n.º 1
0
        public void Old_BlogPost_URLs_Are_Working()
        {
            var url = $"{AppConfig.RootUrl}articles/hello-world";

            Navigation.GoToUrl(url);

            Assert.IsTrue(BlogPostPage.IsAt("Hello World"));
        }
Exemplo n.º 2
0
        public void Rss_Feed_Is_Working()
        {
            Navigation.GoToRssFeed();

            foreach (var blogPost in DataToValidate.BlogPosts.Reverse().Take(10))
            {
                RssFeed.GoToArticle(blogPost.Title);
                Assert.IsTrue(BlogPostPage.IsAt(blogPost.Title));
                Navigation.GoToRssFeed();
            }
        }
Exemplo n.º 3
0
        public void Atom_Feed_Is_Working()
        {
            Footer.GoToAbout();
            AboutPage.GoToAtomFeed();

            foreach (var blogPost in DataToValidate.BlogPosts.Reverse().Take(10))
            {
                AtomFeed.GoToArticle(blogPost.Title);
                Assert.IsTrue(BlogPostPage.IsAt(blogPost.Title));
                Footer.GoToAbout();
                AboutPage.GoToAtomFeed();
            }
        }
Exemplo n.º 4
0
        public void Archive_Shows_All_Posts_and_Links_Are_Working()
        {
            Navigation.GoToArchive();

            var allBlogPostsInArchive = ArchivePage.GetAllBlogPosts();

            Assert.AreEqual(DataToValidate.BlogPosts.Count(), allBlogPostsInArchive.Count());

            foreach (var blogPost in DataToValidate.BlogPosts)
            {
                ArchivePage.GoToBlogPost(blogPost.Title);
                Assert.IsTrue(BlogPostPage.IsAt(blogPost.Title));
                Navigation.GoToArchive();
            }
        }
Exemplo n.º 5
0
        public void All_BlogPosts_Are_Available()
        {
            foreach (var blogPost in DataToValidate.BlogPosts)
            {
                var url = $"{AppConfig.RootUrl}{blogPost.PermalinkId}";
                Navigation.GoToUrl(url);

                Assert.IsTrue(BlogPostPage.IsAt(blogPost.Title));

                if (blogPost.Tags == null || !blogPost.Tags.Any())
                {
                    continue;
                }

                var tags = BlogPostPage.GetTags();
                Assert.IsTrue(blogPost.Tags.SequenceEqual(tags));
            }
        }
Exemplo n.º 6
0
        public void All_BlogPosts_Are_Available()
        {
            foreach (var blogPost in DataToValidate.BlogPosts)
            {
                var url = $"{AppConfig.RootUrl}{blogPost.PermalinkId}";
                Navigation.GoToUrl(url);

                Assert.IsTrue(BlogPostPage.IsAt(blogPost.Title), $"Blog post not found: {blogPost.Title}");

                if (blogPost.Tags == null || !blogPost.Tags.Any())
                {
                    continue;
                }

                var tags = BlogPostPage.GetTags().ToList();

                Assert.IsTrue(blogPost.Tags.SequenceEqual(tags),
                              $"Tags did not match for blog post: {blogPost.Title}, Tags: {string.Join(" ", tags)}");
            }
        }