public void Test_CreateFolder(string folderType, string folderName)
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Create Folder:'");

			var adminFileManagementPage = new AdminFileManagementPage(_driver);
			adminFileManagementPage.OpenUsingButtons(_baseUrl);

			adminFileManagementPage.CreateFolder(folderType, folderName);

			Trace.WriteLine(BasePage.TraceLevelPage + "Verify the folder is present in the list");
			Assert.IsTrue(adminFileManagementPage.ElementPresent(By.XPath(FileManagementPage.FolderTreeView + "//li/div/span[text() = '" + folderName + "']")),
						"The Folder is not created correctly");
		}
Example #2
0
		public void Test001_UploadFileUnder12MB()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Upload file under 12 MB'");

			var fileUploadPage = new FileUploadPage(_driver);
			fileUploadPage.OpenUsingControlPanel(_baseUrl);

			fileUploadPage.UploadFile(_smallFileToUpload, _folderName);

			var adminFileManagementPage = new AdminFileManagementPage(_driver);
			adminFileManagementPage.OpenUsingButtons(_baseUrl);
			adminFileManagementPage.SearchForFile(_smallFileToUpload);

			Assert.IsTrue(
				adminFileManagementPage.ElementPresent(
					By.XPath("//div[contains(@class, 'dnnModuleDigitalAssetItemName')]//span/font[text() = '" + _smallFileToUpload + "']")));
		}
Example #3
0
		public void Test002_UploadFileOver12MB()
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Upload file over 12 MB'");

			var fileUploadPage = new FileUploadPage(_driver);
			fileUploadPage.OpenUsingControlPanel(_baseUrl);

			fileUploadPage.UploadFile(_largeFileToUpload, _folderName);

			var adminFileManagementPage = new AdminFileManagementPage(_driver);
			adminFileManagementPage.OpenUsingButtons(_baseUrl);
			adminFileManagementPage.SearchForFile(_largeFileToUpload);

			Assert.IsFalse(
				adminFileManagementPage.ElementPresent(
					By.XPath("//div[contains(@id, 'dnnModuleDigitalAssetsListViewItem')]/span/font[text() = '" + _largeFileToUpload +
					         "']")));
		}
		public void Test_RenameFolderUsingToolBar(string folderName, string nameToEdit, string newName)
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Rename Folder:'");

			var adminFileManagementPage = new AdminFileManagementPage(_driver);
			adminFileManagementPage.OpenUsingButtons(_baseUrl);
			adminFileManagementPage.SelectFolderFromTreeView("Root", folderName);

			adminFileManagementPage.RenameUsingToolBar(folderName, nameToEdit, newName);

			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 + "//tr/td/div[@title = '" + nameToEdit + "']")),
						"The Folder is not renamed correctly");
		}
		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 Test0205_CopyFile(
			[ValuesAttribute("StandardFolder",
							"SecureFolder",
							"DatabaseFolder")] string folderFrom,
			[ValuesAttribute("SecureFolder",
							"StandardFolder",
							"DatabaseFolder")] string prefix,
			[ValuesAttribute("Birds.jpg",
							"Birds.pdf",
							"Birds.zip")] string fileToMove)
		{
			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Copy File to Folder:'" + prefix + fileToMove);

			var folderTo = folderFrom + "CopyTo" + prefix;

			var adminFileManagementPage = new AdminFileManagementPage(_driver);
			adminFileManagementPage.OpenUsingButtons(_baseUrl);
			adminFileManagementPage.SelectFolderFromTreeView("Root", folderFrom);

			adminFileManagementPage.CopyFile(folderFrom, folderTo, prefix + fileToMove);

			adminFileManagementPage.SelectFolderFromTreeView("Root", folderTo);
			Trace.WriteLine(BasePage.TraceLevelPage + "Verify the File is  present in the list");
			Assert.IsTrue(adminFileManagementPage.ElementPresent(By.XPath(FileManagementPage.FileView + "//tr/td/div[@title = '" + prefix + fileToMove + "']")),
						"The File is not copied correctly");

			adminFileManagementPage.SelectFolderFromTreeView("Root", folderFrom);
			Trace.WriteLine(BasePage.TraceLevelPage + "Verify the File is NOT present in the list");
			Assert.IsTrue(adminFileManagementPage.ElementPresent(By.XPath(FileManagementPage.FileView + "//tr/td/div[@title = '" + prefix + fileToMove + "']")),
						"The File is not copied correctly");
		}
		public void Test0305_MoveFile(
			[ValuesAttribute("StandardFolder",
							"SecureFolder",
							"DatabaseFolder")] string folderFrom,
			[ValuesAttribute("SecureFolder",
							"StandardFolder",
							"DatabaseFolder")] string prefix,
			[ValuesAttribute("Birds.jpg",
							"Birds.pdf",
							"Birds.zip")] string fileToMove)
		{
		
			var folderTo = folderFrom + "MoveTo" + prefix;
			var fullFileNameToMove = prefix + fileToMove;

			Trace.WriteLine(BasePage.RunningTestKeyWord + "'Move File to Folder:'" + fullFileNameToMove);

			var adminFileManagementPage = new AdminFileManagementPage(_driver);
			adminFileManagementPage.OpenUsingButtons(_baseUrl);
			adminFileManagementPage.SelectFolderFromTreeView("Root", folderFrom);

			adminFileManagementPage.MoveFile(folderFrom, folderTo, fullFileNameToMove);

			adminFileManagementPage.SelectFolderFromTreeView("Root", folderTo);
			Trace.WriteLine(BasePage.TraceLevelPage + "Verify the File is present in the list");
			Assert.IsTrue(adminFileManagementPage.ElementPresent(By.XPath(FileManagementPage.FileView + "//tr/td/div[@title = '" + fullFileNameToMove + "']")),
						"The File is not moved correctly");

			adminFileManagementPage.SelectFolderFromTreeView("Root", folderFrom);
			Trace.WriteLine(BasePage.TraceLevelPage + "Verify the File is NOT present in the list");
			Assert.IsFalse(adminFileManagementPage.ElementPresent(By.XPath(FileManagementPage.FileView + "//tr[contains(@style, 'visibility: visible;')]/td/div[@title = '" + fullFileNameToMove + "']")),
						"The File is not moved correctly");
		}
		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");
		}