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 + "']"))); }
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 Test009_Search(string folderName, string pattern, int results) { Trace.WriteLine(BasePage.RunningTestKeyWord + "'SEARCH:'"); var adminFileManagementPage = new AdminFileManagementPage(_driver); adminFileManagementPage.OpenUsingButtons(_baseUrl); adminFileManagementPage.SelectFolderFromTreeView("Root", folderName); adminFileManagementPage.SearchForFile(pattern); Trace.WriteLine(BasePage.TraceLevelPage + "Verify the results"); Assert.That(adminFileManagementPage.FindElements(By.XPath(FileManagementPage.FileViewItems + "[contains(@style, 'visibility: visible;')]")).Count, Is.EqualTo(results), "The number of results is not correct"); }