public void Test_DeleteFolderUsingToolBar(string folderName, string nameToDelete) { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Delete Folder:'"); var adminFileManagementPage = new AdminFileManagementPage(_driver); adminFileManagementPage.OpenUsingButtons(_baseUrl); adminFileManagementPage.SelectFolderFromTreeView("Root", folderName); adminFileManagementPage.SetItemsPerPage("All"); adminFileManagementPage.DeleteUsingToolBar(folderName, nameToDelete); adminFileManagementPage.SelectFolderFromTreeView("Root", folderName); Trace.WriteLine(BasePage.TraceLevelPage + "Verify the Folder is NOT present in the list"); Assert.IsFalse(adminFileManagementPage.ElementPresent(By.XPath(FileManagementPage.FileView + "//trtr[contains(@style, 'visibility: visible;')]/td/div[@title = '" + nameToDelete + "']")), "The Folder is not deleted correctly"); }
public void Test0204_CopyFile_PreconditionsUploadZipFile( [ValuesAttribute("StandardFolder", "SecureFolder", "DatabaseFolder")] string folderName, [ValuesAttribute("StandardFolder", "SecureFolder", "DatabaseFolder")] string prefix, [ValuesAttribute("Birds.zip")] string fileToUpload) { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Upload File to Folder:'"); var adminFileManagementPage = new AdminFileManagementPage(_driver); adminFileManagementPage.OpenUsingButtons(_baseUrl); adminFileManagementPage.SelectFolderFromTreeView("Root", folderName); adminFileManagementPage.SetItemsPerPage("All"); adminFileManagementPage.UploadZipFileToFolder(folderName, prefix + fileToUpload, By.XPath(FileManagementPage.KeepCompressedButton)); }
public void Test010_DeleteFileUsingToolBar( [ValuesAttribute("StandardFolder")] string folderName, [ValuesAttribute("Birds_files.bmp", "Birds_files.docx", "Birds_files.gif", "Birds_files.jpg", "Birds_files.mp3", "Birds_files.pdf", "Birds_files.png", "Birds_files.pptx", "Birds_files.rar", "Birds_files.swf", "Birds_files.txt", "Birds_files.xlsx", "Birds_files.xml")] string nameToDelete) { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Delete File:'"); var adminFileManagementPage = new AdminFileManagementPage(_driver); adminFileManagementPage.OpenUsingButtons(_baseUrl); adminFileManagementPage.SelectFolderFromTreeView("Root", folderName); adminFileManagementPage.SetItemsPerPage("All"); adminFileManagementPage.DeleteUsingToolBar(folderName, nameToDelete); Trace.WriteLine(BasePage.TraceLevelPage + "Verify the File is NOT present in the list"); Assert.IsFalse(adminFileManagementPage.ElementPresent(By.XPath(FileManagementPage.FileView + "//tr/td/div[@title = '" + nameToDelete + "']")), "The File is not deleted correctly"); }
public void Test_UploadNotAllowedToFolder(string folderName, string fileToUpload) { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Upload Not Allowed File type to Folder:'"); var adminFileManagementPage = new AdminFileManagementPage(_driver); adminFileManagementPage.OpenUsingButtons(_baseUrl); adminFileManagementPage.SelectFolderFromTreeView("Root", folderName); adminFileManagementPage.SetItemsPerPage("All"); adminFileManagementPage.UploadNotAllowedFileType(folderName, fileToUpload); Trace.WriteLine(BasePage.TraceLevelPage + "Verify the warning message is displayed"); Assert.That(adminFileManagementPage.WaitForElement( By.XPath("//span[@class = 'dnnModuleDigitalAssetsErrorMessage']")).Text, Is.EqualTo("File extension not allowed"), "The warning message is not displayed"); }
public void Test_UploadDecompressedZipFileToFolder(string folderName, string fileToUpload) { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Upload decompressed ZIP File to Folder:'"); var adminFileManagementPage = new AdminFileManagementPage(_driver); adminFileManagementPage.OpenUsingButtons(_baseUrl); adminFileManagementPage.SelectFolderFromTreeView("Root", folderName); adminFileManagementPage.SetItemsPerPage("All"); adminFileManagementPage.UploadZipFileToFolder(folderName, fileToUpload, By.XPath(FileManagementPage.ExpandButton)); adminFileManagementPage.SelectFolderFromTreeView("Root", folderName); Trace.WriteLine(BasePage.TraceLevelPage + "Verify the subfolder is present in the list"); Assert.That(adminFileManagementPage.WaitForElement( By.XPath(FileManagementPage.FileView + "/span[span[text() = '" + fileToUpload.Replace(".zip", "") + "']]/img")).GetAttribute("src"), Is.StringContaining("/Folder"), "The Subfolder is not created correctly"); adminFileManagementPage.SelectSubFolderFromTreeView(folderName, fileToUpload.Replace(".zip", "")); Trace.WriteLine(BasePage.TraceLevelPage + "Verify the size of uploaded file is correct"); Assert.That(adminFileManagementPage.WaitForElement( By.XPath(FileManagementPage.FileView + "//tr[td/div[@title = '" + "Owl.jpg" + "']]/td[@class = 'dnnModuleDigitalAssetsGrid-SizeColumn']")).Text, Is.Not.EqualTo("0.0 KB"), "The File is not loaded correctly"); Trace.WriteLine(BasePage.TraceLevelPage + "Verify the size of uploaded file is correct"); Assert.That(adminFileManagementPage.WaitForElement( By.XPath(FileManagementPage.FileView + "//tr[td/div[@title = '" + "Owls.jpg" + "']]/td[@class = 'dnnModuleDigitalAssetsGrid-SizeColumn']")).Text, Is.Not.EqualTo("0.0 KB"), "The File is not loaded correctly"); Trace.WriteLine(BasePage.TraceLevelPage + "Verify the size of uploaded file is correct"); Assert.That(adminFileManagementPage.WaitForElement( By.XPath(FileManagementPage.FileView + "//tr[td/div[@title = '" + "OwlToo.jpg" + "']]/td[@class = 'dnnModuleDigitalAssetsGrid-SizeColumn']")).Text, Is.Not.EqualTo("0.0 KB"), "The File is not loaded correctly"); adminFileManagementPage.SelectSubFolderFromTreeView(fileToUpload.Replace(".zip", ""), fileToUpload.Replace("Folder.zip", "") + "SubFolder"); Trace.WriteLine(BasePage.TraceLevelPage + "Verify the size of uploaded file is correct"); Assert.That(adminFileManagementPage.WaitForElement( By.XPath(FileManagementPage.FileView + "//tr[td/div[@title = '" + "bird01.jpg" + "']]/td[@class = 'dnnModuleDigitalAssetsGrid-SizeColumn']")).Text, Is.Not.EqualTo("0.0 KB"), "The File is not loaded correctly"); Trace.WriteLine(BasePage.TraceLevelPage + "Verify the size of uploaded file is correct"); Assert.That(adminFileManagementPage.WaitForElement( By.XPath(FileManagementPage.FileView + "//tr[td/div[@title = '" + "bird02.jpg" + "']]/td[@class = 'dnnModuleDigitalAssetsGrid-SizeColumn']")).Text, Is.Not.EqualTo("0.0 KB"), "The File is not loaded correctly"); Trace.WriteLine(BasePage.TraceLevelPage + "Verify the size of uploaded file is correct"); Assert.That(adminFileManagementPage.WaitForElement( By.XPath(FileManagementPage.FileView + "//tr[td/div[@title = '" + "bird03.jpg" + "']]/td[@class = 'dnnModuleDigitalAssetsGrid-SizeColumn']")).Text, Is.Not.EqualTo("0.0 KB"), "The File is not loaded correctly"); }
public void Test_UploadZipFileToSubfolder(string folderName, string subFolderName, string fileToUpload) { Trace.WriteLine(BasePage.RunningTestKeyWord + "'Upload ZIP File to Folder:'"); var adminFileManagementPage = new AdminFileManagementPage(_driver); adminFileManagementPage.OpenUsingButtons(_baseUrl); adminFileManagementPage.SelectSubFolderFromTreeView(folderName, subFolderName); adminFileManagementPage.SetItemsPerPage("All"); adminFileManagementPage.UploadZipFileToFolder(folderName, fileToUpload, By.XPath(FileManagementPage.KeepCompressedButton)); adminFileManagementPage.OpenUsingButtons(_baseUrl); adminFileManagementPage.SelectSubFolderFromTreeView(folderName, subFolderName); Trace.WriteLine(BasePage.TraceLevelPage + "Verify the size of uploaded file is correct"); Assert.That(adminFileManagementPage.WaitForElement( By.XPath(FileManagementPage.FileView + "//tr[td/div[@title = '" + fileToUpload + "']]/td[@class = 'dnnModuleDigitalAssetsGrid-SizeColumn']")).Text, Is.Not.EqualTo("0.0 KB"), "The File is not loaded correctly"); }