@Test( groups = {"alfresco-one"}, priority = 16) public void test116IsDeleteLinkPresent() { FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(file.getName()); assertTrue(thisRow.isDeletePresent()); }
@Test( groups = {"alfresco-one"}, priority = 17) public void test117SelectThumbnailForFile() throws Exception { // Get File FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(file.getName()); SitePage sitePage = thisRow.selectThumbnail().render(); Assert.assertTrue(sitePage instanceof DocumentDetailsPage); }
@Test( expectedExceptions = PageOperationException.class, groups = {"Enterprise4.2"}, priority = 21) public void test121SelectDownloadFolderAsZipForFile() throws Exception { // Get File FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(file.getName()); thisRow.selectDownloadFolderAsZip(); }
@Test( groups = {"alfresco-one"}, priority = 15) public void test115SelectDownloadForFile() throws Exception { // Get File FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(file.getName()); thisRow.selectDownload(); Assert.assertNotNull(documentLibPage); }
@Test( groups = {"alfresco-one"}, priority = 3) public void test103NodeRefForFolder() throws Exception { // Get folder FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(folderName); // NodeRef Assert.assertNotNull(thisRow.getContentNodeRef(), "Node Reference is null"); }
@Test(enabled = true, groups = "alfresco-one", priority = 32) public void testSelectViewInBrowser() { documentLibPage = resolvePage(driver).render(); FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(file.getName()); String mainWinHandle = driver.getWindowHandle(); thisRow.selectViewInBrowser(); assertTrue(driver.getCurrentUrl().toLowerCase().contains(file.getName().toLowerCase())); driver.close(); driver.switchTo().window(mainWinHandle); }
@Test(enabled = true, groups = "Enterprise4.2", priority = 29) public void renameContentTest() { documentLibPage = resolvePage(driver).render(); FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(folderName); folderName = folderName + " updated"; thisRow.renameContent(folderName); // State of page changed documentLibPage.render(); Assert.assertEquals(documentLibPage.getFileDirectoryInfo(folderName).getName(), folderName); }
@Test( groups = {"alfresco-one"}, priority = 4) public void test104ContentEditInfoForFolder() throws Exception { // Get folder FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(folderName); // Get ContentEditInfo Assert.assertNotNull(thisRow.getContentEditInfo()); Assert.assertTrue(thisRow.getContentEditInfo().contains("Created")); }
@Test( groups = {"alfresco-one"}, priority = 5) public void test105LikeMethodsForFolder() throws Exception { // Get folder FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(folderName); // Like Assert.assertFalse(thisRow.isLiked()); Assert.assertEquals(thisRow.getLikeCount(), "0"); thisRow.selectLike(); }
@Test( groups = {"alfresco-one", "TestBug"}, priority = 11) public void test111ContentEditInfoForFile() throws Exception { // Get File FileDirectoryInfo thisRow = getFile(); // Get ContentEditInfo Assert.assertNotNull(thisRow.getContentEditInfo()); Assert.assertTrue(thisRow.getContentEditInfo().contains("Created")); }
@Test( groups = {"alfresco-one"}, priority = 1) public void test101SelectManageRules() { // Get folder FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(folderName); FolderRulesPage page = thisRow.selectManageRules().render(); Assert.assertNotNull(page); driver.navigate().to(doclibUrl); documentLibPage = (DocumentLibraryPage) resolvePage(driver); documentLibPage.render(); }
@Test( expectedExceptions = UnsupportedOperationException.class, groups = {"alfresco-one"}, priority = 32) public void testGetContentNameFromInfoMenu() throws Exception { documentLibPage = resolvePage(driver).render(); documentLibPage = documentLibPage.getSiteNav().selectDocumentLibrary().render(); // Get File FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(file.getName()); thisRow.getContentNameFromInfoMenu(); }
@Test( expectedExceptions = UnsupportedOperationException.class, groups = {"alfresco-one"}, priority = 8) public void test108SelectDownloadForFolderWithExpection() throws Exception { // Get folder FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(folderName); if (thisRow.isFolder()) { thisRow.selectDownload(); } }
@Test( groups = {"alfresco-one"}, priority = 13) public void test113FavouriteMethodsForFile() throws Exception { documentLibPage = documentLibPage.render(); // Get File FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(file.getName()); // Favorite Assert.assertFalse(thisRow.isFavourite()); thisRow.selectFavourite(); Assert.assertTrue(thisRow.isFavourite()); }
@Test( groups = {"Enterprise4.2"}, priority = 24) public void test124SelectStartWorkFlow() throws Exception { // Select SyncToCloud FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(file.getName()); StartWorkFlowPage startWorkFlowPage = thisRow.selectStartWorkFlow().render(); Assert.assertTrue(startWorkFlowPage.getTitle().contains("Start Workflow")); SiteFinderPage siteFinder = startWorkFlowPage.getNav().selectSearchForSites().render(); siteFinder = siteFinder.searchForSite(siteName).render(); SiteDashboardPage siteDash = siteFinder.selectSite(siteName).render(); documentLibPage = siteDash.getSiteNav().selectDocumentLibrary().render(); Assert.assertNotNull(documentLibPage); }
@Test( groups = {"alfresco-one"}, priority = 18) public void test118SelectThumbnailForFolder() throws Exception { SitePage page = resolvePage(driver).render(); try { assertNotNull(page); documentLibPage = page.getSiteNav().selectDocumentLibrary().render(); // Get File FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(folderName); SitePage sitePage = thisRow.selectThumbnail().render(); Assert.assertTrue(sitePage instanceof DocumentLibraryPage); } catch (Throwable e) { saveScreenShot("ShareContentRowTest.testSelectThumbnailForFile"); throw new Exception(e); } finally { documentLibPage = page.getSiteNav().selectDocumentLibrary().render(); } }
@Test(enabled = true, groups = "Enterprise4.2", priority = 30) public void cancelRenameContentTest() { documentLibPage = resolvePage(driver).render(); FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(folderName); assertFalse(thisRow.isSaveLinkVisible()); assertFalse(thisRow.isCancelLinkVisible()); thisRow.contentNameEnableEdit(); assertTrue(thisRow.isSaveLinkVisible()); assertTrue(thisRow.isCancelLinkVisible()); thisRow.contentNameEnter(folderName + " not updated"); thisRow.contentNameClickCancel(); driver.navigate().refresh(); documentLibPage = resolvePage(driver).render(); Assert.assertEquals(documentLibPage.getFileDirectoryInfo(folderName).getName(), folderName); }
@Test( groups = {"alfresco-one"}, priority = 2) public void test102ContentCheckBoxForFolder() throws Exception { // Get folder row FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(folderName); String thisRowName = thisRow.getName(); Assert.assertEquals(thisRowName, folderName); // Content CheckBox Assert.assertFalse(thisRow.isCheckboxSelected()); thisRow.selectCheckbox(); Assert.assertTrue(thisRow.isCheckboxSelected()); // UnSelect thisRow.selectCheckbox(); Assert.assertFalse(thisRow.isCheckboxSelected()); }
@Test( groups = {"alfresco-one"}, priority = 10) public void test110NodeRefForFile() throws Exception { // Get File FileDirectoryInfo thisRow = documentLibPage.getFileDirectoryInfo(file.getName()); // NodeRef Assert.assertNotNull(thisRow.getContentNodeRef(), "Node Reference is null"); logger.info("NodeRef:" + thisRow.getContentNodeRef()); Assert.assertFalse(thisRow.isVersionVisible()); Assert.assertTrue(thisRow.isCheckBoxVisible()); Assert.assertTrue(thisRow.getVersionInfo().equalsIgnoreCase("1.0")); }