+ fileHasBeenUploaded = fileListView.getFileElement().isDisplayed());
+ }
+
+ @Test
+ @Category({NoIgnoreTestCategory.class, SmokeTestCategory.class, InProgressCategory.class})
+ public void testUploadBigFile () throws Exception {
+
+ FileListView fileListView = Actions.login(Config.URL, Config.user,
+ Config.password, Config.isTrusted, driver);
+ common.assertIsInFileListView();
+
+ //check if the file already exists and if true, delete it
+ Actions.deleteElement(BIG_FILE_NAME, fileListView, driver);
+
+ FileListView fileListViewAfterUploadFile = Actions
+ .uploadFile(BIG_FILE_NAME, fileListView);
+
+ fileListViewAfterUploadFile.scrollTillFindElement(BIG_FILE_NAME);
+ driver.openNotifications();
+ NotificationView notificationView = new NotificationView(driver);
+
+ try{
+ if(notificationView.getUploadingNotification().isDisplayed()){
+ Common.waitTillElementIsPresent(
+ notificationView.getUploadSucceededNotification(),1000);
+ }
+ } catch (NoSuchElementException e) {
+ try{
+ if(notificationView.getClearAllNotificationButton().isDisplayed()){
+ notificationView.tapOnClearAllNotification();
+ }
+ } catch (NoSuchElementException e2) {
+ notificationView.tapOnBottomNotificationArea();
+ }
+ }
+
+
+
+
+ //fileListViewAfterUploadFile.pulldownToSeeNotification();
+
+ assertTrue(fileListViewAfterUploadFile.getFileElement().isDisplayed());
+ Common.waitTillElementIsNotPresentWithoutTimeout(
+ fileListViewAfterUploadFile.getProgressCircular(), 1000);
+ common.wait.until(ExpectedConditions.visibilityOf(
+ fileListViewAfterUploadFile.getFileElementLayout()
+ .findElement(By.id(FileListView.getLocalFileIndicator()))));
+ assertTrue(fileListViewAfterUploadFile.getFileElementLayout()
+ .findElement(By.id(FileListView.getLocalFileIndicator()))
+ .isDisplayed());
+ fileListView = new FileListView(driver);
+ fileListView.scrollTillFindElement(BIG_FILE_NAME);
+ assertTrue(
+ fileHasBeenUploaded = fileListView.getFileElement().isDisplayed());