Esempio n. 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);
            }
Esempio n. 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);
        }
Esempio n. 3
0
            public void DragAndDropAcoverImage()
            {
                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();
                CropImagePopUp cropImagePopUp = articleBase.DragImage(0);

                cropImagePopUp.ClickOnCropImageBtn();
                cropImagePopUp.ClickOnEditokBtn();

                Assert.IsTrue(articleBase.ValidateContainerImage(), "Container image was not exsists on image fieled after dragging.");
                Assert.IsTrue(articleBase.ValidateDeleteButtonCoverimage(), "Delete button on cover image was not exsist.");
            }