Пример #1
0
            public void Editor_Article_FullFlow()
            {
                Auth0LoginPage loginPage    = new Auth0LoginPage(_browser);
                NewsRoomPage   newsRoomPage = loginPage.LoginNewsRoom(_config.ConfigObject.Users.AdminUser);
                EditorPage     editorPage   = newsRoomPage.ClickOnEditorBtn();
                BsonArray      tagExValue   = _params["Tags"].AsBsonArray;
                string         body         = _params["Body"].ToString();
                ArticleBase    articleBase  = editorPage.ClickOnArticle();

                articleBase.WriteTitle("VIDEO:test article template");
                articleBase.SearchImage("cats");
                CropImagePopUp cropImagePopUp = articleBase.DragImage(0);

                cropImagePopUp.ClickOnCropImageBtn();
                cropImagePopUp.ClickOnEditokBtn();
                articleBase.WriteDec(body);
                articleBase.WriteTags(tagExValue);
                PreviewPage previewPage = articleBase.ClickOnPreviewBtn();
                PostPage    postPage    = previewPage.ClickOnPublishBtn();

                Assert.True(postPage.ValidatePostCreated("VIDEO:test article template"));
                var errors = postPage.ValidateComponents(_params["Components"].AsBsonArray);

                Assert.True(string.IsNullOrEmpty(errors), errors);
            }
Пример #2
0
        public string CreatePost()
        {
            EchoPage   echoPage   = new EchoPage(_browser);
            EditorPage editorPage = echoPage.ClickOnEditorBtn();

            ArticleBase articleBase = editorPage.ClickOnArticle();

            articleBase.WriteTitle(_title);
            articleBase.SearchImage("cats");
            CropImagePopUp cropImagePopUp = articleBase.DragImage(0);

            cropImagePopUp.ClickOnCropImageBtn();
            cropImagePopUp.ClickOnEditokBtn();
            articleBase.WriteDec(CreateRendomText());
            _browser.BrowserHelper.WaitUntillTrue(() =>
            {
                _browserHelper.WaitUntillTrue(() => {
                    articleBase.WriteTags(new BsonArray(new List <string>()
                    {
                        "Atest", "BTest", "CTest"
                    }));
                    return(articleBase.GetTagsValue().Count >= 3);
                });

                return(articleBase.GetTagsValue().Count > 0);
            }, "Failed to add tags");
            PreviewPage previewPage = articleBase.ClickOnPreviewBtn();
            PostPage    postPage    = previewPage.ClickOnPublishBtn();

            return(_title);
        }
Пример #3
0
            public void ValidateBodyTextfieled()
            {
                var bodyExValue = _params["bodyExValue"].ToString();

                HomePage            homePage            = new HomePage(_browser);
                FaceBookconnectPage faceBookconnectPage = homePage.ClickOnConnectBtn();
                HomePage            homePageConnected   = faceBookconnectPage.Login(_config.ConfigObject.Users.AdminUser);

                homePageConnected.ValidateUserProfilePic();
                EditorPage  editorPage  = homePageConnected.ClickOnAddArticle();
                ArticleBase articleBase = editorPage.ClickOnArticle();

                articleBase.WriteDec(bodyExValue);
                var bodyAcValue = articleBase.GetBodyValue();

                Assert.AreEqual(bodyExValue, bodyAcValue);
            }