/** * == Not update File activity after creating a new folder == Test case ID: 76991 Step 1: - * Connect to Intranet - Open Sites Explorer - Create a new folder - Back to the Home page */ @Test public void test01_NotUpdateFileActivityAfterCreatingANewFolder() { // Declare variable String folder = "folder01"; By elementFolder = By.linkText(folder); // Open Sites Explorer info("-- Open Sites Explorer --"); navToolBar.goToSiteExplorer(); // Create a new folder info("-- Create parent folder --"); cTemplate.createNewFolder(folder, folderType.None); // Back to the Home page info("-- Back to the Home page --"); navToolBar.goToHomePage(); // No activity is displayed in the activity stream info("-- Check activity after adding a folder --"); waitForElementNotPresent(activity.ELEMENT_CONTENT_NAME.replace("@{fileName}", folder)); /*Clear data*/ info("-- Clear data --"); info("-- Open Sites Explorer --"); navToolBar.goToSiteExplorer(); cMenu.deleteData(elementFolder); }
/** * == Remove the File activity after deleting a file in Content explorer == Test case ID: 77000 * Step 1: Create file activity Step 2: Delete File */ @Test public void test06_RemoveTheFileActivityAfterDeletingAFileInContentExplorer() { // Declare variable String file = "KS_Wiki_Attachment_pdffile.pdf"; By elementfile = By.linkText(file); /*Step 1: Create file activity*/ // Go to SE navToolBar.goToSiteExplorer(); // Upload a file ecms.uploadFile("TestData/" + file); // Back to the Home page info("-- Back to the Home page --"); navToolBar.goToHomePage(); // - The File activity is displayed in the activity stream info("-- A File activity is added to the activity stream --"); activity.checkInforAfterAddingDocument(file, "", "File", "1 MB", "", "", "", ""); /*Step 2: Delete File*/ // Delete the file navToolBar.goToSiteExplorer(); cMenu.deleteData(elementfile); // Back to the Homepage info("-- Back to the Home page --"); navToolBar.goToHomePage(); // - The File activity is removed from the activity stream info("-- The File activity is removed from the activity stream --"); waitForElementNotPresent(activity.ELEMENT_CONTENT_NAME.replace("@{fileName}", file)); }
/** * == Remove the File activity after deleting a file in Space document == Test case ID: 77326 Step * 1: Create file activity Step 2: Delete File */ @Test public void test10_RemoveTheFileActivityAfterDeletingAFileInSpaceDocument() { // Declare variable String file = "KS_Wiki_Attachment_pdffile.pdf"; By elementfile = By.linkText(file); String spacename = "Space10"; String spacedesc = "Description Of Space10"; /*Step 1: Create file activity*/ // Add new space magMember.goToMySpacePage(); magMember.addNewSpace(spacename, spacedesc); // Open Documents in this space waitForAndGetElement(magMember.ELEMENT_DOCUMENTS_TAB); click(magMember.ELEMENT_DOCUMENTS_TAB); // Upload a file ecms.uploadFile("TestData/" + file); // Back to the Home page info("-- Back to the Home page --"); navToolBar.goToHomePage(); // - The File activity is displayed in the activity stream info("-- A File activity is added to the activity stream --"); activity.checkInforAfterAddingDocument(file, "", "File", "1 MB", "", "", "", ""); /*Step 2: Delete File*/ // Delete file from space magMember.goToMySpacePage(); magMember.doAction("Edit", spacename); waitForAndGetElement(magMember.ELEMENT_DOCUMENTS_TAB); click(magMember.ELEMENT_DOCUMENTS_TAB); cMenu.deleteData(elementfile); // Back to the Home page info("-- Back to the Home page --"); navToolBar.goToHomePage(); // The File activity is removed from the activity stream info("-- The File activity is removed from the activity stream --"); waitForElementNotPresent(activity.ELEMENT_CONTENT_NAME.replace("@{fileName}", file)); /*Clear data*/ info("-- Clear data --"); magMember.goToMySpacePage(); magMember.deleteSpace(spacename); }
/** * == Delete a File activity from intranet activity stream by owner == Test case ID: 77027 Step 1: * Create file activity Step 2: See delete activity icon Step 3: Delete activity */ @Test public void test07_DeleteAFileActivityFromIntranetActivityStreamByOwner() { // Declare variable String file = "KS_Wiki_Attachment_pdffile.pdf"; By elementfile = By.linkText(file); /*Step 1: Create file activity*/ // Go to SE navToolBar.goToSiteExplorer(); // Upload a file ecms.uploadFile("TestData/" + file); // Back to the Home page info("-- Back to the Home page --"); navToolBar.goToHomePage(); // - The File activity is displayed in the activity stream info("-- A File activity is added to the activity stream --"); activity.checkInforAfterAddingDocument(file, "", "File", "1 MB", "", "", "", ""); /*Step 2: See delete activity icon*/ /*Step 3: Delete activity*/ activity.deleteActivity(file); // The File activity is removed from the activity stream info("-- The File activity is removed from the activity stream --"); waitForElementNotPresent(activity.ELEMENT_CONTENT_NAME.replace("@{fileName}", file)); /*Clear data*/ info("-- Clear data --"); navToolBar.goToSiteExplorer(); cMenu.deleteData(elementfile); // *[contains(text(), 'KS_Wiki_Attachment_pdffile.pdf')]/../../../../../..//*[contains(@id, // 'DeleteActivityButton')] }