@Test(groups = "EnterpriseOnly") public void Enterprise40x_13863() throws Exception { /** Start Test */ testName = getTestName(); /** Test Data Setup */ String siteName = getSiteName(testName); String testUser = getUserNameFreeDomain(testName); String fileName = getFileName(testName) + getRandomStringWithNumders(3) + ".txt"; DocumentLibraryPage documentLibraryPage; // Login ShareUser.login(drone, testUser, DEFAULT_PASSWORD); documentLibraryPage = ShareUser.openSitesDocumentLibrary(drone, siteName); // Upload File String[] fileInfo = {fileName, DOCLIB}; ShareUser.uploadFileInFolder(drone, fileInfo); DocumentDetailsPage detailsPage = documentLibraryPage.selectFile(fileName); // Click "Edit Properties" in Actions section; EditDocumentPropertiesPage editPropertiesPage = detailsPage.selectEditProperties().render(); editPropertiesPage.selectMimeType(MimeType.XML); detailsPage = editPropertiesPage.selectSave().render(); detailsPage.render(); Map<String, Object> properties = detailsPage.getProperties(); Assert.assertEquals(properties.get("Mimetype"), "XML"); }
/** * Test - AONE-13004: CRM property validation * * <ul> * <li>Login * <li>Access the document details page for the account content created Via SF * <li>Verify that document details page should be displayed. * <li>Access the document details page for the contract content created Via SF. * <li>Verify that document details page should be displayed correctly * <li>Access the document details page for the oppor content created Via SF. * <li>Verify that document details page should be displayed correctly * <li>Access the document details page for the case content created Via SF. * <li>Verify that document details page should be displayed correctly * </ul> */ @Test public void AONE_13885() throws PageException, Exception { // Login ShareUser.login(drone, salesforceUserName, salesforcePassword); // Opening Site Document library page ShareUser.openSitesDocumentLibrary(drone, siteName); // Account content details page DocumentLibraryPage docLibPage = ShareUserSitePage.navigateToFolder(drone, attachments_Folder + SLASH + accountName); DocumentDetailsPage detailsPage = ShareUser.openDocumentDetailPage(drone, account_Content); // Get the properties from details page Map<String, Object> properties = detailsPage.getProperties(); Assert.assertNotNull(properties); Assert.assertFalse(properties.isEmpty()); Assert.assertTrue( ((String) properties.get("AccountIdentifier")).equalsIgnoreCase(accountIdentifier)); Assert.assertTrue(((String) properties.get("AccountName")).equalsIgnoreCase(accountName)); // Opening Site Document library page ShareUser.openDocumentLibrary(drone); // Contract content details page docLibPage = ShareUserSitePage.navigateToFolder( drone, attachments_Folder + SLASH + contractNameOrNumber); detailsPage = ShareUser.openDocumentDetailPage(drone, contract_Content); // Get the properties from details page properties.clear(); properties = detailsPage.getProperties(); Assert.assertNotNull(properties); Assert.assertFalse(properties.isEmpty()); Assert.assertTrue( ((String) properties.get("AccountIdentifier")).equalsIgnoreCase(accountIdentifier)); Assert.assertTrue( ((String) properties.get("ContractNumber")).equalsIgnoreCase(contractNameOrNumber)); Assert.assertTrue( ((String) properties.get("ContractName")).equalsIgnoreCase(contractNameOrNumber)); // Opening Site Document library page ShareUser.openDocumentLibrary(drone); // Opportunity content details page docLibPage = ShareUserSitePage.navigateToFolder(drone, attachments_Folder + SLASH + oppName); detailsPage = ShareUser.openDocumentDetailPage(drone, oppo_Content); // Get the properties from details page properties.clear(); properties = detailsPage.getProperties(); Assert.assertNotNull(properties); Assert.assertFalse(properties.isEmpty()); Assert.assertTrue( ((String) properties.get("AccountIdentifier")).equalsIgnoreCase(accountIdentifier)); Assert.assertTrue(((String) properties.get("OpportunityName")).equalsIgnoreCase(oppName)); // Opening Site Document library page ShareUser.openDocumentLibrary(drone); // Case content details page docLibPage = ShareUserSitePage.navigateToFolder(drone, attachments_Folder + SLASH + caseNameOrNumber); detailsPage = ShareUser.openDocumentDetailPage(drone, case_Content); // Get the properties from details page properties.clear(); properties = detailsPage.getProperties(); Assert.assertNotNull(properties); Assert.assertFalse(properties.isEmpty()); Assert.assertTrue( ((String) properties.get("AccountIdentifier")).equalsIgnoreCase(accountIdentifier)); Assert.assertTrue(((String) properties.get("CaseNumber")).equalsIgnoreCase(caseNameOrNumber)); Assert.assertTrue(((String) properties.get("CaseName")).equalsIgnoreCase(caseNameOrNumber)); }