use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject in project selenium-tests by Wikia.
the class MiniEditorComponentObject method addVideoMiniEditor.
public void addVideoMiniEditor(String url) {
wait.forElementClickable(addVideoButton);
scrollAndClick(addVideoButton);
VetAddVideoComponentObject vetAddingVideo = new VetAddVideoComponentObject(driver);
VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
vetOptions.submit();
verifyVideoMiniEditor();
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject in project selenium-tests by Wikia.
the class VetAddingVideoTests method VetAddVideo_002_MessageWallLibrary.
@Test(groups = { "VetAddVideo_002" })
@RelatedIssue(issueID = "QAART-889")
@Execute(asUser = User.USER)
public void VetAddVideo_002_MessageWallLibrary() {
MessageWall wall = new MessageWall(driver).open(credentials.userName);
String message = PageContent.MESSAGE_WALL_MESSAGE_PREFIX + wall.getTimeStamp();
String title = PageContent.MESSAGE_WALL_TITLE_PREFIX + wall.getTimeStamp();
MiniEditorComponentObject mini = wall.triggerMessageArea();
wall.clickBoldButton();
mini.switchAndWrite(message);
wall.setTitle(title);
VetAddVideoComponentObject vetAddingVideo = mini.clickAddVideo();
VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByQuery(VideoContent.WIKIA_VIDEO_QUERY, 0);
vetOptions.setCaption(PageContent.CAPTION);
vetOptions.submit();
mini.verifyVideoMiniEditor();
wall.submit();
wall.verifyPostedMessageVideo(title);
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject in project selenium-tests by Wikia.
the class VetArticleCommentsTests method RegularUserCanAddVideoInArticleCommentEditorByProvidingYoutubeVideoUrl.
@Test(groups = { "VetArticleComments_001" })
@Execute(asUser = User.USER)
@RelatedIssue(issueID = "SUS-758", comment = "This issue is related to API call and should not cause permanent " + "test failure. Otherwise the failure must be caused by other issue")
public void RegularUserCanAddVideoInArticleCommentEditorByProvidingYoutubeVideoUrl() {
new ArticleContent().clear();
ArticlePageObject article = new ArticlePageObject().open();
MiniEditorComponentObject editor = article.triggerCommentArea();
VetAddVideoComponentObject vetAddingVideo = editor.clickAddVideo();
YoutubeVideo video = YoutubeVideoProvider.getLatestVideoForQuery("microsoft");
String expectedCaption = PageContent.CAPTION + article.getTimeStamp();
vetAddingVideo.addVideoByUrl(video.getUrl()).setCaption(expectedCaption).submit();
Assertion.assertTrue(article.getArticleComment().isVideoVisible());
article.submitComment();
Assertion.assertEquals(article.getArticleComment().getLatestCommentCaption(), expectedCaption, "Latest comment caption doesn't equal to expected caption");
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject in project selenium-tests by Wikia.
the class VetModalAlignmentTests method Vet_Modal_001_leftOnPage.
/**
* 1. Verify left alignment in visual mode, source mode, preview, and published page, 2. Verify
* left alignment in vet modal when page edited, 3. Verify right alignment in visual mode, source
* mode, preview, and published page, 4. Verify right alignment in vet modal when page edited, 5.
* Verify center alignment in visual mode, source mode, preview, and published page, 6. Verify
* center alignment in vet modal when page edited,
*/
@Test(groups = { "VetModalAlignment_001" })
@Execute(asUser = User.USER_VET_MODAL)
public void Vet_Modal_001_leftOnPage() {
new ArticleContent().push("");
VisualEditModePageObject visualEditMode = new ArticlePageObject().open().navigateToArticleEditPage();
VetAddVideoComponentObject vetAddingVideo = visualEditMode.clickVideoButton();
VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
vetOptions.adjustPosition(PositionsVideo.LEFT);
vetOptions.submit();
visualEditMode.verifyVideoPosition(PositionsVideo.LEFT);
SourceEditModePageObject sourceEditMode = visualEditMode.clickSourceButton();
sourceEditMode.verifySourceModeEnabled();
sourceEditMode.verifyVideoAlignment(PositionsVideo.LEFT);
PreviewEditModePageObject previewMode = sourceEditMode.previewArticle();
previewMode.verifyVideoAlignment(PositionsVideo.LEFT);
previewMode.closePreviewModal();
ArticlePageObject article = sourceEditMode.submitArticle();
article.verifyVideoAlignment(PositionsVideo.LEFT);
}
use of com.wikia.webdriver.pageobjectsfactory.componentobject.vet.VetAddVideoComponentObject in project selenium-tests by Wikia.
the class VetModalAlignmentTests method Vet_Modal_003_centerOnPage.
@Test(groups = { "VetModalAlignment_003" })
@Execute(asUser = User.USER_VET_MODAL)
public void Vet_Modal_003_centerOnPage() {
new ArticleContent().push();
VisualEditModePageObject visualEditMode = new ArticlePageObject().open().navigateToArticleEditPage();
VetAddVideoComponentObject vetAddingVideo = visualEditMode.clickVideoButton();
VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByUrl(VideoContent.YOUTUBE_VIDEO_URL);
vetOptions.adjustPosition(PositionsVideo.CENTER);
vetOptions.submit();
visualEditMode.verifyVideoPosition(PositionsVideo.CENTER);
SourceEditModePageObject sourceEditMode = visualEditMode.clickSourceButton();
sourceEditMode.verifySourceModeEnabled();
sourceEditMode.verifyVideoAlignment(PositionsVideo.CENTER);
PreviewEditModePageObject previewMode = sourceEditMode.previewArticle();
previewMode.verifyVideoAlignment(PositionsVideo.CENTER);
previewMode.closePreviewModal();
ArticlePageObject article = sourceEditMode.submitArticle();
article.verifyVideoAlignment(PositionsVideo.CENTER);
}
Aggregations