Compare commits

..
Author SHA1 Message Date
Tobias Kaminsky fe28ce3190 daily dev 20220125
Bump versions for fastlane and plugins
Update Nextcloud Android library
Update 3rd-party dependencies
2022-01-25 06:53:02 +01:00
Tobias Kaminsky dc6ea6cd0e Merge remote-tracking branch 'origin/master' into dev 2022-01-25 05:37:54 +01:00
Tobias Kaminsky 2476be69ba Merge pull request #9737 from nextcloud/chore/bump-fastlane
Bump versions for fastlane and plugins
2022-01-24 14:51:09 +01:00
Álvaro Brey Vilas 93f973cdc2 Bump versions for fastlane and plugins
Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-24 12:09:29 +01:00
Álvaro Brey dd94e20045 Merge pull request #9734 from nextcloud/dependabot/gradle/com.github.spotbugs.snom-spotbugs-gradle-plugin-5.0.5
Bump spotbugs-gradle-plugin from 5.0.4 to 5.0.5
2022-01-24 09:53:05 +01:00
dependabot[bot] f0ea41a56b Bump spotbugs-gradle-plugin from 5.0.4 to 5.0.5
Bumps [spotbugs-gradle-plugin](https://github.com/spotbugs/spotbugs-gradle-plugin) from 5.0.4 to 5.0.5.
- [Release notes](https://github.com/spotbugs/spotbugs-gradle-plugin/releases)
- [Commits](https://github.com/spotbugs/spotbugs-gradle-plugin/compare/5.0.4...5.0.5)

---
updated-dependencies:
- dependency-name: com.github.spotbugs.snom:spotbugs-gradle-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-01-24 08:13:52 +00:00
Tobias Kaminsky 21e756cf88 daily dev 20220124
Update translations
Update Nextcloud Android library
2022-01-24 06:48:45 +01:00
Tobias Kaminsky f7e53a17c0 Merge remote-tracking branch 'origin/master' into dev 2022-01-24 05:35:13 +01:00
Nextcloud bot 43610aedba [tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <[email protected]>
2022-01-24 03:52:57 +00:00
Tobias Kaminsky 975ee12cc0 daily dev 20220122
Bump version to 3.20.0 on master
2022-01-22 05:37:41 +01:00
Tobias Kaminsky c2cd8e2486 Merge remote-tracking branch 'origin/master' into dev 2022-01-22 05:30:57 +01:00
Tobias Kaminsky 70b93ed89c Merge pull request #9723 from nextcloud/bump-minor-version
Bump version to 3.20.0 on master
2022-01-21 08:58:47 +01:00
Tobias Kaminsky add4b08802 Merge pull request #9721 from nextcloud/chore/temurin
workflows: Use temurin JDK instead of adopt
2022-01-21 08:33:12 +01:00
Tobias Kaminsky e0d2670a5e daily dev 20220121
Restore library version
Use capability in SearchRemoteOperation
Clear DNS cache on network changes
Update translations
Update Nextcloud Android library
2022-01-21 06:44:26 +01:00
Tobias Kaminsky 68b08163b7 Merge remote-tracking branch 'origin/master' into dev 2022-01-21 05:33:52 +01:00
Nextcloud bot d8cbde9105 [tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <[email protected]>
2022-01-21 03:52:14 +00:00
Álvaro Brey Vilas f4e979a385 Bump version to 3.20.0 on master
Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-20 15:00:46 +01:00
Álvaro Brey Vilas 417dee2535 workflows: Use temurin JDK instead of adopt
Ref: https://blog.adoptopenjdk.net/2021/08/goodbye-adoptopenjdk-hello-adoptium/

tl;dr: AdoptOpenJDK is discontinued and recommendation is to use Eclipse Temurin instead

Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-20 11:01:09 +01:00
Álvaro Brey 717ad59140 Merge pull request #9651 from nextcloud/gallerySearch
Use capability in SearchRemoteOperation
2022-01-20 10:59:29 +01:00
Tobias Kaminsky 84507a39aa Merge pull request #9719 from nextcloud/fix/ipv4-cache
Clear DNS cache on network changes
2022-01-20 09:42:56 +01:00
Álvaro Brey Vilas 7d58967517 Restore library version
Required PR has been merged on library

Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-20 09:34:32 +01:00
tobiasKaminsky a9cec44b1f Use capability in SearchRemoteOperation
Signed-off-by: tobiasKaminsky <[email protected]>
2022-01-20 09:10:33 +01:00
Tobias Kaminsky 7b30483a52 Create scorecards-analysis.yml 2022-01-20 07:14:36 +01:00
Tobias Kaminsky 2d603b1cfd daily dev 20220120
Remove IRC info from app and docs
Update translations
Update Nextcloud Android library
2022-01-20 06:45:11 +01:00
Tobias Kaminsky ec33e5591d Merge remote-tracking branch 'origin/master' into dev 2022-01-20 05:33:39 +01:00
Nextcloud bot 2956fafabc [tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <[email protected]>
2022-01-20 03:54:30 +00:00
Álvaro Brey Vilas 7299b598d4 Clear DNS cache on network changes
Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-19 16:34:09 +01:00
Álvaro Brey 648c104cd9 Merge pull request #9121 from redgloboli/redgloboli-no-more-freenode
Update README.md
2022-01-19 11:11:39 +01:00
Tobias Kaminsky 4a65a7c434 daily dev 20220119
remove not used videos drawer entry (#9708)
SessionMixin: set currentAccount to null when no accounts are available
FileContentProvider: make projection map unmodifiable
FileContentProvider: fix formatting
FileContentProvider: make projection arrays and map static
FileContentProvider: use projections for queries
2022-01-19 05:37:47 +01:00
Tobias Kaminsky 1e3a4a4a38 Merge remote-tracking branch 'origin/master' into dev 2022-01-19 05:31:07 +01:00
Álvaro Brey Vilas ea0bc503e0 Update CommunityActivity screenshot
Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-18 18:20:17 +01:00
redgloboli 0f62399615 Remove IRC info from app and docs
Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-18 16:26:58 +01:00
Álvaro Brey c6b9da0ee3 Merge pull request #9694 from nextcloud/fix/sqlite-row-too-big
FileContentProvider: use projections for helper queries
2022-01-18 14:48:40 +01:00
Álvaro Brey VilasandTobias Kaminsky 2d544486d3 Add integration test for folders with large amounts of files
This test reproduces the SQLiteCursor crashes.

Co-authored-by: Tobias Kaminsky <[email protected]>
Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-18 14:14:11 +01:00
Tobias KaminskyandÁlvaro Brey Vilas b80baef535 remove not used videos drawer entry (#9708)
* remove not used videos drawer entry

Signed-off-by: tobiasKaminsky <[email protected]>

* Remove unused resource

Signed-off-by: Álvaro Brey Vilas <[email protected]>

Co-authored-by: Álvaro Brey Vilas <[email protected]>
2022-01-18 09:05:02 +01:00
Tobias Kaminsky ae7fb23a6b Merge pull request #9711 from nextcloud/chore/codecov-improvements
Codecov: don't annotate diffs
2022-01-18 08:39:45 +01:00
Tobias Kaminsky e091a15089 Merge pull request #9710 from nextcloud/fix/crash-on-remove-all-accounts
SessionMixin: set currentAccount to null when no accounts are available
2022-01-18 08:38:29 +01:00
Tobias Kaminsky 602005d51a daily dev 20220118
ConflictsResolveActivity: remove upload is KEEP_SERVER and shouldDeleteLocal
removed a check in KEEP_SERVER switch clause. 1) The check prevents solving file conflicts (keep server) correctly. 2) The check involves FileUploader.LOCAL_BEHAVIOUR_DELETE, intended use is for media file uploads.
:Conflict files are removed from the upload storage manager after downloaded successfully.
Fix NPE in BackupFragment when fragment exits while refresh is happening
Screenshot tests: Improve Activities activity tests
Update translations
Update 3rd-party dependencies
2022-01-18 05:37:37 +01:00
Tobias Kaminsky c6f6f15720 Merge remote-tracking branch 'origin/master' into dev 2022-01-18 05:31:01 +01:00
Nextcloud bot 8d868c3fff [tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <[email protected]>
2022-01-18 04:11:52 +00:00
Álvaro Brey Vilas 2cb028eaee Codecov: don't annotate diffs
It makes it really annoying to read diffs when our coverage isn't that good yet.

Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-17 20:08:45 +01:00
Álvaro Brey 92f3b6df87 Merge pull request #9691 from nextcloud/fix/sync-conflict
Improvements in sync conflict resolution
2022-01-17 20:03:24 +01:00
Álvaro Brey Vilas 107dcd35c4 SessionMixin: set currentAccount to null when no accounts are available
Prevents a crash when removing the last account

Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-17 16:02:05 +01:00
Álvaro Brey 641b09cd4f Merge pull request #9706 from nextcloud/dependabot/gradle/byteBuddyVersion-1.12.7
Bump byteBuddyVersion from 1.12.6 to 1.12.7
2022-01-17 15:16:32 +01:00
Álvaro Brey 1419406cd2 Merge pull request #9606 from nextcloud/fix/backup-fragment-crash
Fix NPE in BackupFragment when fragment exits while refresh is happening
2022-01-17 14:53:35 +01:00
Álvaro Brey Vilas c5b75f68b0 ConflictsResolveActivity: remove upload is KEEP_SERVER and shouldDeleteLocal
Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-17 13:30:47 +00:00
wknds b4c1620aed removed a check in KEEP_SERVER switch clause. 1) The check prevents solving file conflicts (keep server) correctly. 2) The check involves FileUploader.LOCAL_BEHAVIOUR_DELETE, intended use is for media file uploads. 2022-01-17 13:30:47 +00:00
wknds 8ce7733563 revert Project.xml 2022-01-17 13:30:47 +00:00
wknds e6b6c6ff56 :Conflict files are removed from the upload storage manager after downloaded successfully. 2022-01-17 13:30:47 +00:00
Álvaro Brey 60e44986a0 Merge pull request #9692 from nextcloud/chore/screenshot-test-activities
Screenshot tests: Improve Activities activity tests
2022-01-17 14:29:31 +01:00
Tobias Kaminsky fd22f9f04d Merge pull request #9590 from nextcloud/it-timeout
DocumentsStorageProviderIT: add timeout to testServerChangedFileContent()
2022-01-17 10:30:56 +01:00
Álvaro Brey 46f253f515 Merge pull request #9707 from nextcloud/dependabot/gradle/pl.droidsonroids.gif-android-gif-drawable-1.2.24
Bump android-gif-drawable from 1.2.23 to 1.2.24
2022-01-17 10:25:27 +01:00
Álvaro Brey Vilas 6f1d434e80 DocumentsStorageProviderIT: add timeout to testServerChangedFileContent()
This test sometimes hangs forever, resulting in (for example) CI builds being killed.
This way, only this test fails and the rest of the suite continues.

Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-17 08:57:45 +00:00
Tobias Kaminsky 0c14bb9e15 daily dev 20220117
Update translations
Update Nextcloud Android library
2022-01-17 06:44:48 +01:00
Tobias Kaminsky 0b2755fc73 Merge remote-tracking branch 'origin/master' into dev 2022-01-17 05:33:54 +01:00
Nextcloud bot e13dc5db81 [tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <[email protected]>
2022-01-17 03:49:57 +00:00
dependabot[bot] e14e91e0c1 Bump android-gif-drawable from 1.2.23 to 1.2.24
Bumps [android-gif-drawable](https://github.com/koral--/android-gif-drawable) from 1.2.23 to 1.2.24.
- [Release notes](https://github.com/koral--/android-gif-drawable/releases)
- [Changelog](https://github.com/koral--/android-gif-drawable/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/koral--/android-gif-drawable/compare/v1.2.23...v1.2.24)

---
updated-dependencies:
- dependency-name: pl.droidsonroids.gif:android-gif-drawable
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-01-17 02:06:28 +00:00
dependabot[bot] adb4edbafe Bump byteBuddyVersion from 1.12.6 to 1.12.7
Bumps `byteBuddyVersion` from 1.12.6 to 1.12.7.

Updates `byte-buddy` from 1.12.6 to 1.12.7
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.12.6...byte-buddy-1.12.7)

Updates `byte-buddy-android` from 1.12.6 to 1.12.7
- [Release notes](https://github.com/raphw/byte-buddy/releases)
- [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md)
- [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.12.6...byte-buddy-1.12.7)

---
updated-dependencies:
- dependency-name: net.bytebuddy:byte-buddy
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: net.bytebuddy:byte-buddy-android
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-01-17 02:06:23 +00:00
Nextcloud bot 1b948c35e0 [tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <[email protected]>
2022-01-16 03:53:38 +00:00
Tobias Kaminsky d12a3762c8 daily dev 20220115
remove unused test automation
Update translations
Update Nextcloud Android library
Update 3rd-party dependencies
2022-01-15 06:45:44 +01:00
Tobias Kaminsky 3d99c8f561 Merge remote-tracking branch 'origin/master' into dev 2022-01-15 05:33:25 +01:00
Nextcloud bot 2623be496d [tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <[email protected]>
2022-01-15 03:52:25 +00:00
Álvaro Brey da9d60f2c0 Merge pull request #9699 from nextcloud/bugfix/noid/unusedTestAutomationRemoval
Remove unused test automation
2022-01-14 14:22:25 +01:00
Álvaro Brey d2de4006ef Merge pull request #9697 from nextcloud/dependabot/gradle/androidx.constraintlayout-constraintlayout-2.1.3
Bump constraintlayout from 2.1.2 to 2.1.3
2022-01-14 13:23:51 +01:00
Álvaro Brey Vilas 33a2043d3f Analysis workflow: correct head ref for branch
Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-14 13:08:21 +01:00
Álvaro Brey Vilas f83ccb781d Fix NPE in BackupFragment when fragment exits while refresh is happening
Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-14 10:48:16 +00:00
Andy Scherzinger fd2f8f23ed remove unused test automation
Signed-off-by: Andy Scherzinger <[email protected]>
2022-01-14 10:52:21 +01:00
Álvaro Brey Vilas 23a67aea4a FileContentProvider: make projection map unmodifiable
Just in case

Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-14 08:54:33 +01:00
Álvaro Brey Vilas 94533fd8aa FileContentProvider: fix formatting
Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-14 08:51:54 +01:00
Álvaro Brey f116328dfa Merge pull request #9696 from nextcloud/dependabot/gradle/com.google.android.material-material-1.5.0
Bump material from 1.4.0 to 1.5.0
2022-01-14 08:44:28 +01:00
dependabot[bot] 483da75e1d Bump constraintlayout from 2.1.2 to 2.1.3
Bumps [constraintlayout](https://github.com/androidx/constraintlayout) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/androidx/constraintlayout/releases)
- [Commits](https://github.com/androidx/constraintlayout/commits)

---
updated-dependencies:
- dependency-name: androidx.constraintlayout:constraintlayout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-01-14 07:44:11 +00:00
Tobias Kaminsky af6f65b47a Merge pull request #9698 from nextcloud/allscreenshots
All screenshots: use newer image
2022-01-14 07:18:16 +01:00
tobiasKaminsky 25f7d7c3c0 All screenshots: use newer image
Signed-off-by: tobiasKaminsky <[email protected]>
2022-01-14 07:17:20 +01:00
Tobias Kaminsky 97cec8931d daily dev 20220114
SendFilesDialog: Show error if no app can send multiple files
IntentUtil: fix sending multiple files
Update 3rd-party dependencies
2022-01-14 05:38:13 +01:00
Tobias Kaminsky a84f3f02b8 Merge remote-tracking branch 'origin/master' into dev 2022-01-14 05:30:56 +01:00
dependabot[bot] 9b2a92f585 Bump material from 1.4.0 to 1.5.0
Bumps [material](https://github.com/material-components/material-components-android) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/material-components/material-components-android/releases)
- [Commits](https://github.com/material-components/material-components-android/compare/1.4.0...1.5.0)

---
updated-dependencies:
- dependency-name: com.google.android.material:material
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-01-14 02:59:44 +00:00
Álvaro Brey Vilas 45b7c222e6 FileContentProvider: make projection arrays and map static
This improves performance as they aren't created on every call

Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-13 16:12:03 +01:00
Álvaro Brey Vilas 405789dc9b FileContentProvider: use projections for queries
This limits the amount of data in the resulting cursor and helps prevent CursorTooBig exceptions.

Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-13 15:47:40 +01:00
Álvaro Brey c39f479981 Merge pull request #9657 from nextcloud/dependabot/github_actions/actions/stale-4.1.0
Bump actions/stale from 3 to 4.1.0
2022-01-13 14:37:34 +01:00
dependabot[bot] 43638ed5e2 Bump actions/stale from 3 to 4.1.0
Bumps [actions/stale](https://github.com/actions/stale) from 3 to 4.1.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v3...v4.1.0)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-01-13 13:11:37 +00:00
Álvaro Brey Vilas d7d029b6ad ActivitiesActivityIT: add waitForIdleSync() after sleeps
Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-13 12:48:16 +01:00
Álvaro Brey Vilas 5631d79b41 Screenshot tests: Improve Activities activity tests
Force-close snackbar to not have the timing break tests

Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-13 11:07:47 +01:00
Álvaro Brey acf575e762 Merge pull request #9688 from nextcloud/chore/analysis-gh-actions
Run analysis workflow in github actions
2022-01-13 10:27:59 +01:00
Álvaro Brey 49b6d0c2ef Merge pull request #9662 from nextcloud/dependabot/gradle/pl.droidsonroids.gif-android-gif-drawable-1.2.23
Bump android-gif-drawable from 1.2.21 to 1.2.23
2022-01-13 10:06:33 +01:00
Álvaro Brey 010942f0a2 Merge pull request #9677 from nextcloud/fix/send-multiple-files
Fix sending multiple files
2022-01-13 09:34:04 +01:00
Álvaro Brey b9f6fdf19e Codecov: wait for CI (#9687)
Now that we don't have a permanently broken CI setup, this makes sense again, so we don't get coverage results based on partial tests

Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-13 09:33:25 +01:00
Álvaro Brey Vilas 9fa63c7547 Run analysis workflow in github actions
Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-13 09:29:43 +01:00
Álvaro Brey Vilas 53feb14714 SendFilesDialogTest: assert adapter is not null
Just in case

Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-13 09:06:09 +01:00
dependabot[bot] 2363292084 Bump appcompat from 1.4.0 to 1.4.1 (#9690)
Bumps appcompat from 1.4.0 to 1.4.1.

---
updated-dependencies:
- dependency-name: androidx.appcompat:appcompat
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-13 09:02:19 +01:00
Tobias Kaminsky f004ce8e5d daily dev 20220113
Merge pull request #9043 from nextcloud/updateScreenshotsTests
Update translations
2022-01-13 05:37:52 +01:00
Tobias Kaminsky 2d9cc06165 Merge remote-tracking branch 'origin/master' into dev 2022-01-13 05:30:59 +01:00
Nextcloud bot ab23c04def [tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <[email protected]>
2022-01-13 03:53:34 +00:00
Álvaro Brey Vilas 9d856da33a Improve testing for SendFilesDialog
* Add tests for mixed type files
 * Add integration tests, not only screenshot

Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-12 15:50:20 +01:00
dependabot[bot] 6891a90821 Bump android-gif-drawable from 1.2.21 to 1.2.23
Bumps [android-gif-drawable](https://github.com/koral--/android-gif-drawable) from 1.2.21 to 1.2.23.
- [Release notes](https://github.com/koral--/android-gif-drawable/releases)
- [Changelog](https://github.com/koral--/android-gif-drawable/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/koral--/android-gif-drawable/compare/v1.2.21...v1.2.23)

---
updated-dependencies:
- dependency-name: pl.droidsonroids.gif:android-gif-drawable
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-01-12 14:20:11 +00:00
Álvaro Brey Vilas 447f2401a5 Codecov: wait for CI
Now that we don't have a permanently broken CI setup, this makes sense again, so we don't get coverage results based on partial tests

Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-12 15:16:55 +01:00
Tobias Kaminsky eaf1230d2e Merge pull request #9686 from nextcloud/droneCrone
only cron trigger is allowed
2022-01-12 14:47:37 +01:00
tobiasKaminsky 8e28921113 only cron trigger is allowed
Signed-off-by: tobiasKaminsky <[email protected]>
2022-01-12 14:45:58 +01:00
Álvaro Brey Vilas 61f8115d79 SendFilesDialog: Show error if no app can send multiple files
Otherwise an empty bottom fragment shows up, which is not good UX

Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-12 13:08:48 +01:00
Álvaro Brey Vilas 93d7c7f9f7 IntentUtil: fix sending multiple files
- Use `ACTION_SEND_MULTIPLE`
 - Set type to `*/*` if not all files share a type
 - Use use a `ParcelableArrayListExtra` for `EXTRA_STREAM`

Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-12 13:08:42 +01:00
Tobias Kaminsky a639e8441c Merge pull request #9043 from nextcloud/updateScreenshotsTests
Update screenshots tests
2022-01-12 08:57:22 +01:00
Tobias Kaminsky 311e7fcd62 daily dev 20220112
removed redundant changes
removed redundant changes
made all the suggested changes - removed xml unnecessary lines
made all the suggested changes
fixed the visibility of slider of dark theme issue# 9170
Update translations
2022-01-12 05:37:28 +01:00
Tobias Kaminsky 8d1f889594 Merge remote-tracking branch 'origin/master' into dev 2022-01-12 05:31:01 +01:00
Nextcloud bot ae9bd40427 [tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <[email protected]>
2022-01-12 03:52:57 +00:00
Álvaro Brey 0d46d951e7 Merge pull request #9622 from sandeep021/sandeepBranch
Fix sliders theming for calendar backup settings
2022-01-11 10:13:55 +01:00
Tobias Kaminsky 860558c294 Merge pull request #9680 from nextcloud/cron
drone cron is daily instead of nightly
2022-01-11 08:52:58 +01:00
tobiasKaminsky f91550c1b2 drone cron is daily instead of nightly
Signed-off-by: tobiasKaminsky <[email protected]>
2022-01-11 08:52:26 +01:00
Tobias Kaminsky 72abd7ba3a daily dev 20220111
l10n: fixed grammar
FileOperationsHelper: fix aliasing when toggling favorite files
Manually bump lib
ChooseTemplateDialog: Fix crash on prefillFilenameIfEmpty
Update translations
Update Nextcloud Android library
Update 3rd-party dependencies
2022-01-11 06:45:17 +01:00
Tobias Kaminsky 890090e3f8 Merge remote-tracking branch 'origin/master' into dev 2022-01-11 05:34:25 +01:00
Nextcloud bot e4d26e44d4 [tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <[email protected]>
2022-01-11 03:53:46 +00:00
sandeepyadav 8567559cd1 Merge remote-tracking branch 'origin/sandeepBranch' into sandeepBranch
# Conflicts:
#	src/main/java/com/owncloud/android/ui/dialog/SyncedFolderPreferencesDialogFragment.java
#	src/main/java/com/owncloud/android/ui/fragment/contactsbackup/BackupFragment.java
#	src/main/java/com/owncloud/android/utils/theme/ThemeCheckableUtils.java
2022-01-10 23:23:59 +05:30
sandeepyadav 333b844878 removed redundant changes
Signed-off-by: sandeepyadav <[email protected]>
2022-01-10 23:10:54 +05:30
sandeepyadav ce11af238f removed redundant changes
Signed-off-by: sandeepyadav <[email protected]>
2022-01-10 23:10:54 +05:30
sandeepyadav 10d44368db made all the suggested changes - removed xml unnecessary lines
Signed-off-by: sandeepyadav <[email protected]>
2022-01-10 23:10:54 +05:30
sandeepyadav fb26ddd88f made all the suggested changes
Signed-off-by: sandeepyadav <[email protected]>
2022-01-10 23:10:54 +05:30
Álvaro Brey fd8aae8e40 Merge pull request #9658 from nextcloud/dependabot/github_actions/hmarr/auto-approve-action-2.1.0
Bump hmarr/auto-approve-action from 2.0.0 to 2.1.0
2022-01-10 16:05:00 +01:00
Tobias Kaminsky e8ce558a4e Merge pull request #9642 from nextcloud/fix/9640
ChooseTemplateDialog: Fix crash on prefillFilenameIfEmpty
2022-01-10 12:03:51 +01:00
Álvaro Brey c9246210de Merge pull request #9674 from nextcloud/fixUploadingFailingScreenshots
Fix failing username/password upon uploading failing screenshots
2022-01-10 11:30:26 +01:00
tobiasKaminsky 719551505e Fix DialogFragmentIT test
Signed-off-by: tobiasKaminsky <[email protected]>
2022-01-10 10:12:44 +01:00
Álvaro Brey a037786328 Merge pull request #9667 from nextcloud/rakekniven-patch-2
l10n: fixed grammar
2022-01-10 10:04:46 +01:00
Tobias Kaminsky 195703a527 Merge pull request #9672 from nextcloud/dependabot/gradle/com.github.albfernandez-juniversalchardet-2.3.2
Bump juniversalchardet from 2.0.3 to 2.3.2
2022-01-10 09:45:55 +01:00
Tobias Kaminsky a24e6e9cfc Merge pull request #9579 from nextcloud/dependabot/gradle/org.mnode.ical4j-ical4j-1.0.8
Bump ical4j from 1.0.6 to 1.0.8
2022-01-10 09:45:25 +01:00
tobiasKaminsky 503d6685a2 Fix failing username/password
Signed-off-by: tobiasKaminsky <[email protected]>
2022-01-10 09:31:11 +01:00
Tobias Kaminsky 22c916e6db Merge pull request #9665 from nextcloud/bumpWebDavLib
Manually bump lib
2022-01-10 09:21:43 +01:00
Tobias Kaminsky 879286d05f Merge pull request #9666 from nextcloud/fix/favorites-selection-breaking
FileOperationsHelper: fix aliasing when toggling favorite files
2022-01-10 07:44:54 +01:00
dependabot[bot] 9e33a11930 Bump juniversalchardet from 2.0.3 to 2.3.2
Bumps [juniversalchardet](https://github.com/albfernandez/juniversalchardet) from 2.0.3 to 2.3.2.
- [Release notes](https://github.com/albfernandez/juniversalchardet/releases)
- [Commits](https://github.com/albfernandez/juniversalchardet/compare/v2.0.3...v2.3.2)

---
updated-dependencies:
- dependency-name: com.github.albfernandez:juniversalchardet
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-01-10 02:07:17 +00:00
rakekniven 065d19163f l10n: fixed grammar
Reported at Transifex.

Signed-off-by: rakekniven <[email protected]>
2022-01-07 21:33:51 +01:00
Álvaro Brey Vilas 0f9e4feb79 FileOperationsHelper: fix aliasing when toggling favorite files
Don't modify the original collection of files. Instead filter a clone.

Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-07 18:27:55 +01:00
tobiasKaminsky 9f7699835e Manually bump lib
Signed-off-by: tobiasKaminsky <[email protected]>
2022-01-07 11:30:51 +01:00
dependabot[bot] f2c14abccb Bump hmarr/auto-approve-action from 2.0.0 to 2.1.0
Bumps [hmarr/auto-approve-action](https://github.com/hmarr/auto-approve-action) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/hmarr/auto-approve-action/releases)
- [Commits](https://github.com/hmarr/auto-approve-action/compare/v2.0.0...v2.1.0)

---
updated-dependencies:
- dependency-name: hmarr/auto-approve-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-01-07 08:42:37 +00:00
sandeepyadav 6c5c055855 removed redundant changes 2022-01-04 23:30:00 +05:30
sandeepyadav 3256b459e7 made all the suggested changes - removed xml unnecessary lines 2022-01-04 00:53:37 +05:30
sandeepyadav e8488b773c made all the suggested changes 2022-01-04 00:24:23 +05:30
Álvaro Brey Vilas 1a7ee3e179 ChooseTemplateDialog: Fix crash on prefillFilenameIfEmpty
Don't do anything if the filename is not empty.

Signed-off-by: Álvaro Brey Vilas <[email protected]>
2022-01-03 09:43:24 +01:00
sandeepyadav eaf605b2be fixed the visibility of slider of dark theme
issue# 9170
2021-12-27 13:35:40 +05:30
dependabot[bot] b3fa1e3262 Bump ical4j from 1.0.6 to 1.0.8
Bumps [ical4j](https://github.com/ical4j/ical4j) from 1.0.6 to 1.0.8.
- [Release notes](https://github.com/ical4j/ical4j/releases)
- [Changelog](https://github.com/ical4j/ical4j/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/ical4j/ical4j/compare/ical4j-1.0.6...ical4j-1.0.8)

---
updated-dependencies:
- dependency-name: org.mnode.ical4j:ical4j
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2021-12-17 02:05:30 +00:00
278 changed files with 1039 additions and 4990 deletions

No files matched your search

+3 -1
View File
@@ -2,7 +2,6 @@ codecov:
branch: master
ci:
- drone.nextcloud.com
require_ci_to_pass: false
coverage:
precision: 2
@@ -17,6 +16,9 @@ comment:
layout: "header, diff, changes, uncovered, tree"
behavior: default
github_checks:
annotations: false
ignore:
- "src/main/res/values*/*"
+2 -55
View File
@@ -163,58 +163,7 @@ trigger:
event:
- push
- pull_request
---
kind: pipeline
type: docker
name: analysis
steps:
- name: analysis
image: ghcr.io/nextcloud/continuous-integration-android8:2
environment:
GIT_USERNAME:
from_secret: GIT_USERNAME
GIT_TOKEN:
from_secret: GIT_TOKEN
LOG_USERNAME:
from_secret: LOG_USERNAME
LOG_PASSWORD:
from_secret: LOG_PASSWORD
commands:
- scripts/checkIfRunDrone.sh $GIT_USERNAME $GIT_TOKEN $DRONE_PULL_REQUEST || exit 0
- export BRANCH=$(scripts/analysis/getBranchName.sh $GIT_USERNAME $GIT_TOKEN $DRONE_PULL_REQUEST)
- scripts/analysis/analysis-wrapper.sh $GIT_USERNAME $GIT_TOKEN $BRANCH $LOG_USERNAME $LOG_PASSWORD $DRONE_BUILD_NUMBER $DRONE_PULL_REQUEST
- name: notify
image: drillster/drone-email
settings:
port: 587
from: [email protected]
recipients_only: true
username:
from_secret: EMAIL_USERNAME
password:
from_secret: EMAIL_PASSWORD
recipients:
from_secret: EMAIL_RECIPIENTS
host:
from_secret: EMAIL_HOST
when:
event:
- push
status:
- failure
branch:
- master
- stable-*
trigger:
branch:
- master
- stable-*
event:
- push
- pull_request
---
kind: pipeline
type: docker
@@ -222,7 +171,7 @@ name: allScreenshots
steps:
- name: runAllScreenshots
image: nextcloudci/android8:android-61
image: ghcr.io/nextcloud/continuous-integration-android8:2
privileged: true
environment:
GIT_USERNAME:
@@ -263,9 +212,7 @@ steps:
- master
- stable-*
trigger:
branch:
- master
event:
- cron
cron:
- nightly
- allscreenshots
+21
View File
@@ -0,0 +1,21 @@
name: "Analysis"
on:
pull_request:
branches: [ master, stable-* ]
jobs:
analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: 11
- name: Run analysis wrapper
run: |
mkdir -p $HOME/.gradle
echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > $HOME/.gradle/gradle.properties
scripts/analysis/analysis-wrapper.sh ${{ secrets.GIT_USERNAME }} ${{ secrets.GIT_TOKEN }} ${{ github.head_ref }} ${{ secrets.LOG_USERNAME }} ${{ secrets.LOG_PASSWORD }} $GITHUB_RUN_NUMBER ${{ github.event.pull_request.number }}
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
- name: set up JDK 11
uses: actions/setup-java@v2
with:
distribution: "adopt"
distribution: "temurin"
java-version: 11
- name: Build ${{ matrix.flavor }}
run: |
+1 -1
View File
@@ -7,7 +7,7 @@ jobs:
auto-approve:
runs-on: ubuntu-latest
steps:
- uses: hmarr/auto-approve-action@v2.0.0
- uses: hmarr/auto-approve-action@v2.1.0
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: "adopt"
distribution: "temurin"
java-version: 11
- name: Check ${{ matrix.task }}
run: ./gradlew ${{ matrix.task }}
+31 -31
View File
@@ -6,41 +6,41 @@
name: Rebase command
on:
issue_comment:
types: created
issue_comment:
types: created
jobs:
rebase:
runs-on: ubuntu-latest
rebase:
runs-on: ubuntu-latest
# On pull requests and if the comment starts with `/rebase`
if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase')
# On pull requests and if the comment starts with `/rebase`
if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase')
steps:
- name: Add reaction on start
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
repository: ${{ github.event.repository.full_name }}
comment-id: ${{ github.event.comment.id }}
reaction-type: "+1"
steps:
- name: Add reaction on start
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
repository: ${{ github.event.repository.full_name }}
comment-id: ${{ github.event.comment.id }}
reaction-type: "+1"
- name: Checkout the latest code
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.COMMAND_BOT_PAT }}
- name: Checkout the latest code
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.COMMAND_BOT_PAT }}
- name: Automatic Rebase
uses: cirrus-actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
- name: Automatic Rebase
uses: cirrus-actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
- name: Add reaction on failure
uses: peter-evans/create-or-update-comment@v1
if: failure()
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
repository: ${{ github.event.repository.full_name }}
comment-id: ${{ github.event.comment.id }}
reaction-type: "-1"
- name: Add reaction on failure
uses: peter-evans/create-or-update-comment@v1
if: failure()
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
repository: ${{ github.event.repository.full_name }}
comment-id: ${{ github.event.comment.id }}
reaction-type: "-1"
File renamed without changes.
+1 -1
View File
@@ -17,7 +17,7 @@ jobs:
if: ${{ steps.check-secrets.outputs.ok == 'true' }}
uses: actions/setup-java@v2
with:
distribution: "adopt"
distribution: "temurin"
java-version: 11
- name: Build QA
if: ${{ steps.check-secrets.outputs.ok == 'true' }}
+55
View File
@@ -0,0 +1,55 @@
name: Scorecards supply-chain security
on:
# Only the default branch is supported.
branch_protection_rule:
schedule:
- cron: '33 1 * * 5'
push:
branches: [ master ]
# Declare default permissions as read only.
permissions: read-all
jobs:
analysis:
name: Scorecards analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
actions: read
contents: read
steps:
- name: "Checkout code"
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2.4.0
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@e3e75cf2ffbf9364bbff86cdbdf52b23176fe492 # v1.0.1
with:
results_file: results.sarif
results_format: sarif
# Read-only PAT token. To create it,
# follow the steps in https://github.com/ossf/scorecard-action#pat-token-creation.
repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
# Publish the results to enable scorecard badges. For more details, see
# https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories, `publish_results` will automatically be set to `false`,
# regardless of the value entered here.
publish_results: false
# Upload the results as artifacts (optional).
- name: "Upload artifact"
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # v2.3.1
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@5f532563584d71fdef14ee64d17bafb34f751ce5 # v1.0.26
with:
sarif_file: results.sarif
+47 -11
View File
@@ -12,34 +12,70 @@ jobs:
matrix:
scheme: [ Light ]
color: [ blue ]
api-level: [ 27 ]
steps:
- uses: actions/checkout@v2
- name: set up JDK 11
uses: actions/setup-java@v2
- name: Gradle cache
uses: actions/cache@v2
with:
distribution: "adopt"
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: AVD cache
uses: actions/cache@v2
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.api-level }}
- uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: 11
- name: Build gplay
- name: create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
force-avd-creation: false
arch: x86
sdcard-path-or-size: 100M
target: google_apis
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -skin 500x833
script: echo "Generated AVD snapshot for caching."
- name: Configure gradle daemon
run: |
mkdir -p $HOME/.gradle
echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > $HOME/.gradle/gradle.properties
./gradlew assembleGplayDebug
echo "org.gradle.caching=true" >> $HOME/.gradle/gradle.properties
- name: Build gplay
run: ./gradlew assembleGplayDebug
- name: Delete old comments
if: ${{ always() }}
run: scripts/deleteOldComments.sh "${{ matrix.color }}-${{ matrix.scheme }}" "Screenshot" ${{github.event.number}} ${{ secrets.GITHUB_TOKEN }}
- name: run tests
- name: Run screenshot tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 27
api-level: ${{ matrix.api-level }}
force-avd-creation: false
arch: x86
sdcard-path-or-size: 100M
target: google_apis
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -skin 500x833
script: ./gradlew gplayDebugExecuteScreenshotTests -Pandroid.testInstrumentationRunnerArguments.annotation=com.owncloud.android.utils.ScreenshotTest -Pandroid.testInstrumentationRunnerArguments.COLOR=${{ matrix.color }} -Pandroid.testInstrumentationRunnerArguments.DARKMODE=${{ matrix.scheme }}
- name: upload failing results
if: ${{ failure() }}
env:
LOG_USERNAME: ${{ secrets.LOG_USERNAME }}
LOG_PASSWORD: ${{ secrets.LOG_PASSWORD }}
run:
scripts/uploadReport.sh "$LOG_USERNAME" "$LOG_PASSWORD" ${{github.event.number}} "${{ matrix.color }}-${{ matrix.scheme }}" "Screenshot" ${{github.event.number}} ${{ secrets.GITHUB_TOKEN }}
scripts/uploadReport.sh "${{ secrets.LOG_USERNAME }}" "${{ secrets.LOG_PASSWORD }}" ${{github.event.number}} "${{ matrix.color }}-${{ matrix.scheme }}" "Screenshot" ${{github.event.number}} ${{ secrets.GITHUB_TOKEN }}
- name: Archive Espresso results
uses: actions/upload-artifact@v2
if: ${{ always() }}
+1 -1
View File
@@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
- uses: actions/stale@v4.1.0
with:
days-before-stale: 28
days-before-close: 14
-4
View File
@@ -1,9 +1,5 @@
# [Nextcloud](https://nextcloud.com) Android app
[![irc](https://img.shields.io/badge/IRC-%23nextcloud%20on%20freenode-orange.svg)](https://webchat.freenode.net/?channels=nextcloud)
[![irc](https://img.shields.io/badge/IRC-%23nextcloud--mobile%20on%20freenode-blue.svg)](https://webchat.freenode.net/?channels=nextcloud-mobile)
# Index
1. [Guidelines](#guidelines)
1. [Issue reporting](#issue-reporting)
+26 -22
View File
@@ -8,23 +8,23 @@ GEM
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.2.0)
aws-partitions (1.541.0)
aws-sdk-core (3.124.0)
aws-partitions (1.549.0)
aws-sdk-core (3.125.5)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.52.0)
aws-sdk-core (~> 3, >= 3.122.0)
aws-sdk-kms (1.53.0)
aws-sdk-core (~> 3, >= 3.125.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.109.0)
aws-sdk-core (~> 3, >= 3.122.0)
aws-sdk-s3 (1.111.2)
aws-sdk-core (~> 3, >= 3.125.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.4.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.0.3)
claide (1.1.0)
colored (1.2)
colored2 (3.1.2)
commander (4.6.0)
@@ -36,17 +36,18 @@ GEM
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.6)
emoji_regex (3.2.3)
excon (0.89.0)
faraday (1.8.0)
excon (0.90.0)
faraday (1.9.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
multipart-post (>= 1.2, < 3)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
@@ -55,14 +56,17 @@ GEM
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.3)
multipart-post (>= 1.2, < 3)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.2.5)
fastlane (2.199.0)
fastimage (2.2.6)
fastlane (2.201.1)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
@@ -101,11 +105,11 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-huawei_appgallery_connect (1.0.17)
fastlane-plugin-huawei_appgallery_connect (1.0.18)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.14.0)
google-apis-androidpublisher_v3 (0.15.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-core (0.4.1)
google-apis-core (0.4.2)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
@@ -114,11 +118,11 @@ GEM
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-iamcredentials_v1 (0.9.0)
google-apis-iamcredentials_v1 (0.10.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-playcustomapp_v1 (0.6.0)
google-apis-playcustomapp_v1 (0.7.0)
google-apis-core (>= 0.4, < 2.a)
google-apis-storage_v1 (0.10.0)
google-apis-storage_v1 (0.11.0)
google-apis-core (>= 0.4, < 2.a)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
@@ -126,7 +130,7 @@ GEM
google-cloud-env (1.5.0)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.2.0)
google-cloud-storage (1.35.0)
google-cloud-storage (1.36.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
@@ -145,7 +149,7 @@ GEM
http-cookie (1.0.4)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.4.0)
jmespath (1.5.0)
json (2.6.1)
jwt (2.3.0)
memoist (0.16.2)
+2 -3
View File
@@ -1,6 +1,6 @@
# [Nextcloud](https://nextcloud.com) Android app :iphone:
[![Build Status](https://drone.nextcloud.com/api/badges/nextcloud/android/status.svg)](https://drone.nextcloud.com/nextcloud/android) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/80401cb343854343b4d94acbfb72d3ec)](https://www.codacy.com/app/Nextcloud/android?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=nextcloud/android&amp;utm_campaign=Badge_Grade) [![Releases](https://img.shields.io/github/release/nextcloud/android.svg)](https://github.com/nextcloud/android/releases/latest) [![irc](https://img.shields.io/badge/IRC-%23nextcloud--mobile%20on%20freenode-blue.svg)](https://webchat.freenode.net/?channels=nextcloud-mobile)
[![Build Status](https://drone.nextcloud.com/api/badges/nextcloud/android/status.svg)](https://drone.nextcloud.com/nextcloud/android) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/80401cb343854343b4d94acbfb72d3ec)](https://www.codacy.com/app/Nextcloud/android?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=nextcloud/android&amp;utm_campaign=Badge_Grade) [![Releases](https://img.shields.io/github/release/nextcloud/android.svg)](https://github.com/nextcloud/android/releases/latest)
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png"
alt="Download from Google Play"
@@ -16,7 +16,6 @@
## How to contribute :rocket:
If you want to [contribute](https://nextcloud.com/contribute/) to Nextcloud, you are very welcome:
- on our IRC channels [![irc](https://img.shields.io/badge/IRC-%23nextcloud%20on%20freenode-orange.svg)](https://webchat.freenode.net/?channels=nextcloud) and [![irc](https://img.shields.io/badge/IRC-%23nextcloud--mobile%20on%20freenode-blue.svg)](https://webchat.freenode.net/?channels=nextcloud-mobile) on freenode
- our forum at https://help.nextcloud.com
- for translations of the app on [Transifex](https://www.transifex.com/nextcloud/nextcloud/android/)
- opening issues and PRs (including a corresponding issue)
@@ -75,7 +74,7 @@ or
## Support :rescue_worker_helmet:
If you need assistance or want to ask a question about the Android app, you are welcome to [ask for support](https://help.nextcloud.com/c/clients/android) in our Forums or the [IRC-Channel](https://webchat.freenode.net/?channels=nextcloud-mobile). If you have found a bug, feel free to [open a new Issue on GitHub](https://github.com/nextcloud/android/issues). Keep in mind, that this repository only manages the Android app. If you find bugs or have problems with the server/backend, you should ask the [Nextcloud server team](https://github.com/nextcloud/server) for help!
If you need assistance or want to ask a question about the Android app, you are welcome to [ask for support](https://help.nextcloud.com/c/clients/android) in our Forums. If you have found a bug, feel free to [open a new Issue on GitHub](https://github.com/nextcloud/android/issues). Keep in mind, that this repository only manages the Android app. If you find bugs or have problems with the server/backend, you should ask the [Nextcloud server team](https://github.com/nextcloud/server) for help!
## Remarks :scroll:
-32
View File
@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="resources"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
-5
View File
@@ -1,5 +0,0 @@
target/
ScreenShots/
.DS_Store
Users/
-23
View File
@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>androidtest</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
@@ -1,12 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7
@@ -1,4 +0,0 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
-20
View File
@@ -1,20 +0,0 @@
** Work in progress
This project contains a set of automatic tests operating in the UI level.
Tests are to be run with the tool Appium. Check [here][0] to install it and all its dependencies (including Maven).
You will need to modify the constants in automationTest/src/test/java/com/owncloud/android/test/ui/testSuites/Config.java to assign appropriate values for your test server and accounts.
You will need to include the ownCloud.apk to test in automationTest/src/test/resources/.
To run the tests from command line, plug a device to your computer or start and emulator. Then type
mvn clean tests
To run only one category of the test
mvn clean -Dtest=RunSmokeTests test
The project may also be imported in Eclipse, with the appropriate plug-ins, and run from it.
[0]: http://appium.io/slate/en/master/?java#about-appium
-78
View File
@@ -1,78 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.owncloud</groupId>
<artifactId>androidtest</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<includes>
<include>**/*Test**.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.45.0</version>
</dependency>
<dependency>
<groupId>io.selendroid</groupId>
<version>0.9.0</version>
<artifactId>selendroid-standalone</artifactId>
</dependency>
<dependency>
<groupId>io.selendroid</groupId>
<version>0.9.0</version>
<artifactId>selendroid-client</artifactId>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
-4
View File
@@ -1,4 +0,0 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
@@ -1,244 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.actions;
import java.util.HashMap;
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.ScreenOrientation;
import org.openqa.selenium.remote.RemoteWebElement;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import com.owncloud.android.test.ui.models.CertificatePopUp;
import com.owncloud.android.test.ui.models.ElementMenuOptions;
import com.owncloud.android.test.ui.models.GmailSendMailView;
import com.owncloud.android.test.ui.models.ShareView;
import com.owncloud.android.test.ui.models.UploadFilesView;
import com.owncloud.android.test.ui.models.LoginForm;
import com.owncloud.android.test.ui.models.FileListView;
import com.owncloud.android.test.ui.models.MenuList;
import com.owncloud.android.test.ui.models.NewFolderPopUp;
import com.owncloud.android.test.ui.models.RemoveConfirmationView;
import com.owncloud.android.test.ui.models.SettingsView;
import com.owncloud.android.test.ui.models.WaitAMomentPopUp;
import com.owncloud.android.test.ui.testSuites.Common;
import com.owncloud.android.test.ui.testSuites.Config;
public class Actions {
public static FileListView login(String url, String user, String password,
Boolean isTrusted, AndroidDriver driver)
throws InterruptedException {
LoginForm loginForm = new LoginForm(driver);
CertificatePopUp certificatePopUp = loginForm.typeHostUrl(url);
if(!isTrusted){
WebDriverWait wait = new WebDriverWait(driver, 30);
//sometimes the certificate has been already accept
//and it doesn't appear again
try {
wait.until(ExpectedConditions
.visibilityOf(certificatePopUp.getOkButtonElement()));
//we need to repaint the screen
//because of some element are misplaced
driver.rotate(ScreenOrientation.LANDSCAPE);
driver.rotate(ScreenOrientation.PORTRAIT);
certificatePopUp.clickOnOkButton();
}catch (NoSuchElementException e) {
}
}
loginForm.typeUserName(user);
loginForm.typePassword(password);
//TODO. Assert related to check the connection?
return loginForm.clickOnConnectButton();
}
public static WaitAMomentPopUp createFolder(String folderName,
FileListView fileListView){
NewFolderPopUp newFolderPopUp = fileListView.clickOnNewFolderButton();
newFolderPopUp.typeNewFolderName(folderName);
WaitAMomentPopUp waitAMomentPopUp = newFolderPopUp
.clickOnNewFolderOkButton();
//TODO. assert here
return waitAMomentPopUp;
}
public static AndroidElement scrollTillFindElement (String elementName,
AndroidElement element, AndroidDriver driver) {
AndroidElement fileElement;
if(element.getAttribute("scrollable").equals("true")){
HashMap<String, String> scrollObject = new HashMap<String,String>();
scrollObject.put("text", elementName);
scrollObject.put("element", ( (RemoteWebElement) element).getId());
driver.executeScript("mobile: scrollTo", scrollObject);
}
try {
fileElement = (AndroidElement) driver
.findElementByName(elementName);
} catch (NoSuchElementException e) {
fileElement = null;
}
return fileElement;
}
public static void deleteAccount (int accountPosition,FileListView fileListView) {
MenuList menulist = fileListView.clickOnMenuButton();
SettingsView settingView = menulist.clickOnSettingsButton();
deleteAccount(accountPosition,settingView);
}
public static void deleteAccount (int accountPosition, SettingsView settingsView) {
settingsView.tapOnAccountElement(accountPosition,1, 1000);
settingsView.clickOnDeleteAccountElement();
}
public static void clickOnMainLayout(AndroidDriver driver){
driver.tap(1, 0, 0, 1);
}
public static AndroidElement deleteElement(String elementName,
FileListView fileListView, AndroidDriver driver) throws Exception{
AndroidElement fileElement;
WaitAMomentPopUp waitAMomentPopUp;
try{
//To open directly the "file list view" and
//we don't need to know in which view we are
driver.startActivity("com.owncloud.android",
".ui.activity.FileDisplayActivity");
fileElement = (AndroidElement) driver
.findElementByName(elementName);
ElementMenuOptions menuOptions = fileListView
.longPressOnElement(elementName);
RemoveConfirmationView removeConfirmationView = menuOptions
.clickOnRemove();;
waitAMomentPopUp = removeConfirmationView
.clickOnRemoteAndLocalButton();
Common.waitTillElementIsNotPresent(
waitAMomentPopUp.getWaitAMomentTextElement(), 100);
}catch(NoSuchElementException e){
fileElement=null;
}
return fileElement;
}
public static AndroidElement shareLinkElementByGmail(String elementName,
FileListView fileListView, AndroidDriver driver, Common common)
throws Exception{
try{
//To open directly the "file list view" and
//we don't need to know in which view we are
driver.startActivity("com.owncloud.android",
".ui.activity.FileDisplayActivity");
ElementMenuOptions menuOptions = fileListView
.longPressOnElement(elementName);
ShareView shareView = menuOptions.clickOnShareLinkElement();
Actions.scrollTillFindElement("Gmail", shareView
.getListViewLayout(), driver).click();
GmailSendMailView gmailSendMailView = new GmailSendMailView(driver);
gmailSendMailView.typeToEmailAdress(Config.gmailAccount);
gmailSendMailView.clickOnSendButton();
Common.waitTillElementIsNotPresentWithoutTimeout(fileListView
.getProgressCircular(), 1000);
common.wait.until(ExpectedConditions.visibilityOf(
fileListView.getFileElementLayout()
.findElement(By.id(FileListView
.getSharedElementIndicator()))));
}catch(NoSuchElementException e){
return null;
}
return (AndroidElement) fileListView.getFileElementLayout()
.findElement(By.id(FileListView.getSharedElementIndicator()));
}
public static AndroidElement shareLinkElementByCopyLink(String elementName,
FileListView fileListView, AndroidDriver driver, Common common)
throws Exception{
try{
//To open directly the "file list view" and
//we don't need to know in which view we are
driver.startActivity("com.owncloud.android",
".ui.activity.FileDisplayActivity");
ElementMenuOptions menuOptions = fileListView
.longPressOnElement(elementName);
ShareView shareView = menuOptions.clickOnShareLinkElement();
Actions.scrollTillFindElement("Copy link", shareView.getListViewLayout(),
driver).click();
WaitAMomentPopUp waitAMomentPopUp = new WaitAMomentPopUp(driver);
Common.waitTillElementIsNotPresentWithoutTimeout(waitAMomentPopUp
.getWaitAMomentTextElement(), 100);
common.wait.until(ExpectedConditions.visibilityOf(
fileListView.getFileElementLayout()
.findElement(By.id(FileListView.getSharedElementIndicator()))));
}catch(NoSuchElementException e){
return null;
}
return (AndroidElement) fileListView.getFileElementLayout()
.findElement(By.id(FileListView.getSharedElementIndicator()));
}
public static void unshareLinkElement(String elementName,
FileListView fileListView, AndroidDriver driver, Common common)
throws Exception{
try{
//To open directly the "file list view" and
//we don't need to know in which view we are
driver.startActivity("com.owncloud.android",
".ui.activity.FileDisplayActivity");
ElementMenuOptions menuOptions = fileListView
.longPressOnElement(elementName);
WaitAMomentPopUp waitAMomentPopUp = menuOptions
.clickOnUnshareLinkElement();
Common.waitTillElementIsNotPresentWithoutTimeout(waitAMomentPopUp
.getWaitAMomentTextElement(), 100);
Common.waitTillElementIsNotPresent((AndroidElement) fileListView
.getFileElementLayout()
.findElement(By.id(FileListView.getSharedElementIndicator())
),100);
}catch(NoSuchElementException e){
}
}
public static FileListView uploadFile(String elementName,
FileListView fileListView) throws InterruptedException{
fileListView.clickOnUploadButton();
UploadFilesView uploadFilesView = fileListView
.clickOnFilesElementUploadFile();
uploadFilesView.clickOnFileName(elementName);
FileListView fileListViewAfterUploadFile = uploadFilesView
.clickOnUploadButton();
//TO DO. detect when the file is successfully uploaded
Thread.sleep(15000);
return fileListViewAfterUploadFile;
}
}
@@ -1,22 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.groups;
public interface FailingTestCategory extends IgnoreTestCategory {}
@@ -1,138 +0,0 @@
package com.owncloud.android.test.ui.groups;
import java.lang.annotation.Annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import org.junit.Test;
import org.junit.experimental.categories.Categories.CategoryFilter;
import org.junit.experimental.categories.Categories.ExcludeCategory;
import org.junit.experimental.categories.Categories.IncludeCategory;
import org.junit.experimental.categories.Category;
import org.junit.runner.Description;
import org.junit.runner.manipulation.NoTestsRemainException;
import org.junit.runners.Suite;
import org.junit.runners.model.InitializationError;
import org.junit.runners.model.RunnerBuilder;
/**
* This class is based on org.junit.experimental.categories.Categories from JUnit 4.10.
*
* All anotations and inner classes from the original class Categories are removed,
* since they will be re-used.
* Unfortunately sub-classing Categories did not work.
*/
public class FlexibleCategories extends Suite {
/**
* Specifies the package which should be scanned for test classes (e.g. @TestScanPackage("my.package")).
* This annotation is required.
*/
@Retention(RetentionPolicy.RUNTIME)
public @interface TestScanPackage {
public String value();
}
/**
* Specifies the prefix of matching class names (e.g. @TestClassPrefix("Test")).
* This annotation is optional (default: "").
*/
@Retention(RetentionPolicy.RUNTIME)
public @interface TestClassPrefix {
public String value();
}
/**
* Specifies the suffix of matching class names (e.g. @TestClassSuffix("Test")).
* This annotation is optional (default: "Test").
*/
@Retention(RetentionPolicy.RUNTIME)
public @interface TestClassSuffix {
public String value();
}
/**
* Specifies an annotation for methods which must be present in a matching class (e.g. @TestMethodAnnotationFilter(Test.class)).
* This annotation is optional (default: org.junit.Test.class).
*/
@Retention(RetentionPolicy.RUNTIME)
public @interface TestMethodAnnotation {
public Class<? extends Annotation> value();
}
public FlexibleCategories(Class<?> clazz, RunnerBuilder builder)
throws InitializationError {
this(builder, clazz, PatternClasspathClassesFinder.getSuiteClasses(
getTestScanPackage(clazz), getTestClassPrefix(clazz), getTestClassSuffix(clazz),
getTestMethodAnnotation(clazz)));
try {
filter(new CategoryFilter(getIncludedCategory(clazz),
getExcludedCategory(clazz)));
} catch (NoTestsRemainException e) {
// Ignore all classes with no matching tests.
}
assertNoCategorizedDescendentsOfUncategorizeableParents(getDescription());
}
public FlexibleCategories(RunnerBuilder builder, Class<?> clazz,
Class<?>[] suiteClasses) throws InitializationError {
super(builder, clazz, suiteClasses);
}
private static String getTestScanPackage(Class<?> clazz) throws InitializationError {
TestScanPackage annotation = clazz.getAnnotation(TestScanPackage.class);
if (annotation == null) {
throw new InitializationError("No package given to scan for tests!\nUse the annotation @TestScanPackage(\"my.package\") on the test suite " + clazz + ".");
}
return annotation.value();
}
private static String getTestClassPrefix(Class<?> clazz) {
TestClassPrefix annotation = clazz.getAnnotation(TestClassPrefix.class);
return annotation == null ? "" : annotation.value();
}
private static String getTestClassSuffix(Class<?> clazz) {
TestClassSuffix annotation = clazz.getAnnotation(TestClassSuffix.class);
return annotation == null ? "Test" : annotation.value();
}
private static Class<? extends Annotation> getTestMethodAnnotation(Class<?> clazz) {
TestMethodAnnotation annotation = clazz.getAnnotation(TestMethodAnnotation.class);
return annotation == null ? Test.class : annotation.value();
}
private Class<?> getIncludedCategory(Class<?> clazz) {
IncludeCategory annotation= clazz.getAnnotation(IncludeCategory.class);
return annotation == null ? null : annotation.value();
}
private Class<?> getExcludedCategory(Class<?> clazz) {
ExcludeCategory annotation= clazz.getAnnotation(ExcludeCategory.class);
return annotation == null ? null : annotation.value();
}
private void assertNoCategorizedDescendentsOfUncategorizeableParents(Description description) throws InitializationError {
if (!canHaveCategorizedChildren(description))
assertNoDescendantsHaveCategoryAnnotations(description);
for (Description each : description.getChildren())
assertNoCategorizedDescendentsOfUncategorizeableParents(each);
}
private void assertNoDescendantsHaveCategoryAnnotations(Description description) throws InitializationError {
for (Description each : description.getChildren()) {
if (each.getAnnotation(Category.class) != null)
throw new InitializationError("Category annotations on Parameterized classes are not supported on individual methods.");
assertNoDescendantsHaveCategoryAnnotations(each);
}
}
// If children have names like [0], our current magical category code can't determine their
// parentage.
private static boolean canHaveCategorizedChildren(Description description) {
for (Description each : description.getChildren())
if (each.getTestClass() == null)
return false;
return true;
}
}
@@ -1,24 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.groups;
public interface IgnoreTestCategory {}
@@ -1,5 +0,0 @@
package com.owncloud.android.test.ui.groups;
public interface InProgressCategory extends IgnoreTestCategory{
}
@@ -1,25 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.groups;
public interface NoIgnoreTestCategory {
}
@@ -1,23 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.groups;
public interface OtherTestCategory extends IgnoreTestCategory {}
@@ -1,141 +0,0 @@
package com.owncloud.android.test.ui.groups;
import java.io.File;
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.net.URL;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
/**
*
* Modified version of ClasspathClassesFinder from:
* http://linsolas.free.fr/wordpress/index.php/2011/02/how-to-categorize-junit-tests-with-maven/
*
* The difference is, that it does not search for annotated classes but for classes with a certain
* class name prefix and suffix.
*/
public final class PatternClasspathClassesFinder {
/**
* Get the list of classes of a given package name, and that are annotated
* by a given annotation.
*
* @param packageName
* The package name of the classes.
* @param classPrefix
* The prefix of the class name.
* @param classSuffix
* The suffix of the class name.
* @param methodAnnotation
* Only return classes containing methods annotated with methodAnnotation.
* @return The List of classes that matches the requirements.
*/
public static Class<?>[] getSuiteClasses(String packageName,
String classPrefix, String classSuffix,
Class<? extends Annotation> methodAnnotation) {
try {
return getClasses(packageName, classPrefix, classSuffix, methodAnnotation);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* Get the list of classes of a given package name, and that are annotated
* by a given annotation.
*
* @param packageName
* The package name of the classes.
* @param classPrefix
* The prefix of the class name.
* @param classSuffix
* The suffix of the class name.
* @param methodAnnotation
* Only return classes containing methods annotated with methodAnnotation.
* @return The List of classes that matches the requirements.
* @throws ClassNotFoundException
* If something goes wrong...
* @throws IOException
* If something goes wrong...
*/
private static Class<?>[] getClasses(String packageName,
String classPrefix, String classSuffix,
Class<? extends Annotation> methodAnnotation)
throws ClassNotFoundException, IOException {
ClassLoader classLoader = Thread.currentThread()
.getContextClassLoader();
String path = packageName.replace('.', '/');
// Get classpath
Enumeration<URL> resources = classLoader.getResources(path);
List<File> dirs = new ArrayList<File>();
while (resources.hasMoreElements()) {
URL resource = resources.nextElement();
dirs.add(new File(resource.getFile()));
}
// For each classpath, get the classes.
ArrayList<Class<?>> classes = new ArrayList<Class<?>>();
for (File directory : dirs) {
classes.addAll(findClasses(directory, packageName, classPrefix, classSuffix, methodAnnotation));
}
return classes.toArray(new Class[classes.size()]);
}
/**
* Find classes, in a given directory (recursively), for a given package
* name, that are annotated by a given annotation.
*
* @param directory
* The directory where to look for.
* @param packageName
* The package name of the classes.
* @param classPrefix
* The prefix of the class name.
* @param classSuffix
* The suffix of the class name.
* @param methodAnnotation
* Only return classes containing methods annotated with methodAnnotation.
* @return The List of classes that matches the requirements.
* @throws ClassNotFoundException
* If something goes wrong...
*/
private static List<Class<?>> findClasses(File directory,
String packageName, String classPrefix, String classSuffix,
Class<? extends Annotation> methodAnnotation)
throws ClassNotFoundException {
List<Class<?>> classes = new ArrayList<Class<?>>();
if (!directory.exists()) {
return classes;
}
File[] files = directory.listFiles();
for (File file : files) {
if (file.isDirectory()) {
classes.addAll(findClasses(file,
packageName + "." + file.getName(), classPrefix, classSuffix, methodAnnotation));
} else if (file.getName().startsWith(classPrefix) && file.getName().endsWith(classSuffix + ".class")) {
// We remove the .class at the end of the filename to get the
// class name...
Class<?> clazz = Class.forName(packageName
+ '.'
+ file.getName().substring(0,
file.getName().length() - 6));
// Check, if class contains test methods (prevent "No runnable methods" exception):
boolean classHasTest = false;
for (Method method : clazz.getMethods()) {
if (method.getAnnotation(methodAnnotation) != null) {
classHasTest = true;
break;
}
}
if (classHasTest) {
classes.add(clazz);
}
}
}
return classes;
}
}
@@ -1,25 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.groups;
public interface SmokeTestCategory {
}
@@ -1,25 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.groups;
public interface UnfinishedTestCategory extends IgnoreTestCategory{
}
@@ -1,49 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.support.PageFactory;
public class CertificatePopUp {
final AndroidDriver driver;
@AndroidFindBy(name = "OK")
private AndroidElement okButton;
public CertificatePopUp (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public void clickOnOkButton () {
okButton.click();
}
public AndroidElement getOkButtonElement () {
return okButton;
}
}
@@ -1,94 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.support.PageFactory;
public class ElementMenuOptions {
final AndroidDriver driver;
@AndroidFindBy(name = "Share link")
private AndroidElement shareLinkElement;
@AndroidFindBy(name = "Unshare link")
private AndroidElement unshareLinkElement;
@AndroidFindBy(name = "Details")
private AndroidElement detailsFileElement;
@AndroidFindBy(name = "Rename")
private AndroidElement renameFileElement;
@AndroidFindBy(name = "Remove")
private AndroidElement removeFileElement;
@AndroidFindBy(name = "Move")
private AndroidElement moveElement;
public ElementMenuOptions (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public FileDetailsView clickOnDetails () {
detailsFileElement.click();
FileDetailsView fileDetailsView = new FileDetailsView(driver);
return fileDetailsView;
}
public RemoveConfirmationView clickOnRemove () {
removeFileElement.click();
RemoveConfirmationView removeConfirmationView =
new RemoveConfirmationView(driver);
return removeConfirmationView;
}
public MoveView clickOnMove () {
moveElement.click();
MoveView moveView = new MoveView(driver);
return moveView;
}
public NewFolderPopUp clickOnRename () {
renameFileElement.click();
NewFolderPopUp newFolderPopUp = new NewFolderPopUp(driver);
return newFolderPopUp;
}
public ShareView clickOnShareLinkElement () {
shareLinkElement.click();
ShareView shareView = new ShareView(driver);
return shareView;
}
public WaitAMomentPopUp clickOnUnshareLinkElement () {
unshareLinkElement.click();
WaitAMomentPopUp waitAMomentPopUp = new WaitAMomentPopUp(driver);
return waitAMomentPopUp;
}
}
@@ -1,61 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.support.CacheLookup;
import org.openqa.selenium.support.PageFactory;
public class FileDetailsView {
final AndroidDriver driver;
@CacheLookup
@AndroidFindBy(name = "Keep file up to date")
private AndroidElement keepFileUpToDateCheckbox;
@AndroidFindBy(id = "com.owncloud.android:id/fdProgressBar")
private AndroidElement progressBar;
public FileDetailsView (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public void checkKeepFileUpToDateCheckbox () {
if(keepFileUpToDateCheckbox.getAttribute("checked").equals("false")){
keepFileUpToDateCheckbox.click();
}
}
public void unCheckKeepFileUpToDateCheckbox () {
if(keepFileUpToDateCheckbox.getAttribute("checked").equals("true")){
keepFileUpToDateCheckbox.click();
}
}
public AndroidElement getProgressBar (){
return progressBar;
}
}
@@ -1,211 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import java.util.List;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.android.AndroidKeyCode;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.support.CacheLookup;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.Point;
import com.owncloud.android.test.ui.actions.Actions;
public class FileListView {
final AndroidDriver driver;
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".description(\"More options\")")
private AndroidElement menuButton;
@CacheLookup
@AndroidFindBy(id = "com.owncloud.android:id/list_root")
private AndroidElement filesLayout;
@CacheLookup
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".resourceId(\"android:id/action_bar_title\")")
private AndroidElement titleText;
@AndroidFindBy(id = "android:id/progress_circular")
private AndroidElement progressCircular;
@CacheLookup
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".description(\"New folder\")")
private AndroidElement newFolderButton;
@CacheLookup
@AndroidFindBy(uiAutomator = "new UiSelector().description(\"Upload\")")
private AndroidElement uploadButton;
private AndroidElement waitAMomentText;
@AndroidFindBy(id = "com.owncloud.android:id/ListItemLayout")
private List<AndroidElement> listItemLayout;
@AndroidFindBy(id = "com.owncloud.android:id/list_root")
private AndroidElement listRootLayout;
@AndroidFindBy(name = "Files")
private AndroidElement filesElementUploadFile;
@CacheLookup
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".description(\"List Layout\")")
private AndroidElement listLayout;
@AndroidFindBy(uiAutomator = "new UiSelector().className(\"android.widget.FrameLayout\").index(0)")
private AndroidElement deviceScreen;
private AndroidElement fileElement;
private AndroidElement fileElementLayout;
private static String localFileIndicator =
"com.owncloud.android:id/localFileIndicator";
private static String favoriteFileIndicator =
"com.owncloud.android:id/keptOfflineIcon";
private static String sharedElementIndicator =
"com.owncloud.android:id/sharedIcon";
public FileListView (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public MenuList clickOnMenuButton () {
//if the menu option is not in the actionBar, it is opening again
try {
menuButton.click();
} catch (NoSuchElementException e){
driver.sendKeyEvent(AndroidKeyCode.MENU);
}
MenuList menuList = new MenuList (driver);
return menuList;
}
public SettingsView getSettingsView () {
SettingsView settingsView = new SettingsView(driver);
return settingsView;
}
public NewFolderPopUp clickOnNewFolderButton () {
newFolderButton.click();
NewFolderPopUp newFolderPopUp = new NewFolderPopUp(driver);
return newFolderPopUp;
}
public void clickOnUploadButton () {
uploadButton.click();
}
public UploadFilesView clickOnFilesElementUploadFile () {
filesElementUploadFile.click();
UploadFilesView uploadFilesView = new UploadFilesView(driver);
return uploadFilesView;
}
public AndroidElement getTitleTextElement () {
return titleText;
}
public AndroidElement getUploadButton () {
return uploadButton;
}
public AndroidElement getWaitAMomentTextElement () {
return waitAMomentText;
}
public AndroidElement getListRootElement () {
return listRootLayout;
}
public List<AndroidElement> getListItemLayout () {
return listItemLayout;
}
public AndroidElement getFileElement () {
return fileElement;
}
public ElementMenuOptions longPressOnElement (String elementName) {
scrollTillFindElement(elementName).tap(1, 1000);
//fileElement.tap(1, 1000);
ElementMenuOptions menuOptions = new ElementMenuOptions(driver);
return menuOptions;
}
public AndroidElement scrollTillFindElement (String elementName) {
fileElement = Actions
.scrollTillFindElement (elementName,filesLayout,driver);
try {
fileElementLayout = (AndroidElement) driver
.findElementByAndroidUIAutomator("new UiSelector()"
+ ".description(\"LinearLayout-"+ elementName +"\")");
} catch (NoSuchElementException e) {
fileElementLayout = null;
}
return fileElement;
}
public AndroidElement getFileElementLayout () {
return fileElementLayout;
}
public AndroidElement getProgressCircular () {
return progressCircular;
}
public static String getLocalFileIndicator() {
return localFileIndicator;
}
public static String getFavoriteFileIndicator() {
return favoriteFileIndicator;
}
public static String getSharedElementIndicator() {
return sharedElementIndicator;
}
public void pulldownToRefresh () throws InterruptedException {
Point listLocation = listLayout.getLocation();
driver.swipe(listLocation.getX(),listLocation.getY(),
listLocation.getX(),listLocation.getY()+1000, 5000);
}
public void pulldownToSeeNotification () throws InterruptedException {
Point listLocation = deviceScreen.getLocation();
driver.swipe(listLocation.getX(),listLocation.getY(),
listLocation.getX(),listLocation.getY()+1000, 5000);
}
}
@@ -1,58 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.support.PageFactory;
public class GmailEmailListView {
final AndroidDriver driver;
@AndroidFindBy(uiAutomator = "new UiSelector().description(\""
+ "me about UploadFile, on May 11, conversation read\")")
private AndroidElement emailAmericanFormatDate;
@AndroidFindBy(uiAutomator = "new UiSelector().description(\""
+ "me about UploadFile, on 11 May, conversation read\")")
private AndroidElement emailEuropeanFormatDate;
public GmailEmailListView (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public GmailEmailView clickOnEmail (){
try{
emailAmericanFormatDate.click();
}catch (NoSuchElementException e) {
emailEuropeanFormatDate.click();
}
GmailEmailView gmailEmailView = new GmailEmailView(driver);
return gmailEmailView;
}
}
@@ -1,50 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.support.CacheLookup;
import org.openqa.selenium.support.PageFactory;
import com.owncloud.android.test.ui.testSuites.Config;
public class GmailEmailView {
final AndroidDriver driver;
@CacheLookup
@AndroidFindBy(name = Config.fileToTestSendByEmailName)
private AndroidElement fileButton;
public GmailEmailView (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public ImageView clickOnfileButton (){
fileButton.click();
ImageView imageView = new ImageView(driver);
return imageView;
}
}
@@ -1,63 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.support.CacheLookup;
import org.openqa.selenium.support.PageFactory;
public class GmailSendMailView {
final AndroidDriver driver;
@CacheLookup
@AndroidFindBy(uiAutomator = "new UiSelector().description(\"To\")")
private AndroidElement toTextField;
@CacheLookup
@AndroidFindBy(name = "Subject")
private AndroidElement subjectTextField;
@CacheLookup
@AndroidFindBy(uiAutomator = "new UiSelector().description(\"Send\")")
private AndroidElement sendButton;
public GmailSendMailView (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public void typeToEmailAdress (String email) {
toTextField.sendKeys(email + "\n");
}
public void clickOnSendButton () {
sendButton.click();
}
public void typeSubject (String subject) {
subjectTextField.clear();
subjectTextField.sendKeys(subject);
}
}
@@ -1,80 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.support.CacheLookup;
import org.openqa.selenium.support.PageFactory;
import com.owncloud.android.test.ui.actions.Actions;
import com.owncloud.android.test.ui.testSuites.Common;
public class ImageView {
final AndroidDriver driver;
@CacheLookup
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".description(\"More options\")")
private AndroidElement optionsButton;
@AndroidFindBy(name = "Share")
private AndroidElement shareButton;
@AndroidFindBy(name = "ownCloud")
private AndroidElement ownCloudButton;
@AndroidFindBy(name = "Share with ownCloud")
private AndroidElement shareWithOwnCloudButton;
@AndroidFindBy(name = "Just once")
private AndroidElement justOnceButton;
@AndroidFindBy(id = "android:id/resolver_list")
private AndroidElement sharingAppsLayout;
public ImageView (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public void clickOnOptionsButton(){
optionsButton.click();
}
public void clickOnShareButton(){
shareButton.click();
}
public void clickOnOwnCloudButton(){
if(Common.isElementPresent(ownCloudButton)){
Actions.scrollTillFindElement("ownCloud",sharingAppsLayout,driver);
ownCloudButton.click();
}else if(Common.isElementPresent(shareWithOwnCloudButton)){}
}
public void clickOnJustOnceButton(){
justOnceButton.click();
}
}
@@ -1,115 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import org.openqa.selenium.support.CacheLookup;
import org.openqa.selenium.support.PageFactory;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
public class LoginForm {
final AndroidDriver driver;
@CacheLookup
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".description(\"Server address\")")
private AndroidElement hostUrlInput;
@CacheLookup
@AndroidFindBy(uiAutomator = "new UiSelector().description(\"Username\")")
private AndroidElement userNameInput;
@CacheLookup
@AndroidFindBy(uiAutomator = "new UiSelector().description(\"Password\")")
private AndroidElement passwordInput;
@CacheLookup
@AndroidFindBy(uiAutomator = "new UiSelector().description(\"Connect\")")
private AndroidElement connectButton;
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".description(\"Testing connection\")")
private AndroidElement serverStatusText;
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".description(\"Wrong username or password\")")
private AndroidElement authStatusText;
public LoginForm (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public CertificatePopUp typeHostUrl (String hostUrl) {
hostUrlInput.clear();
hostUrlInput.sendKeys(hostUrl + "\n");
CertificatePopUp certificatePopUp = new CertificatePopUp(driver);
return certificatePopUp;
}
public void clickOnUserName () {
userNameInput.click();
}
public void typeUserName (String userName) {
userNameInput.clear();
//using the \n , it not need to hide the keyboard
//which sometimes gives problems
userNameInput.sendKeys(userName + "\n");
//driver.hideKeyboard();
}
public void typePassword (String password) {
passwordInput.clear();
passwordInput.sendKeys(password + "\n");
//driver.hideKeyboard();
}
public FileListView clickOnConnectButton () {
connectButton.click();
FileListView fileListView = new FileListView(driver);
return fileListView;
}
public AndroidElement gethostUrlInput () {
return hostUrlInput;
}
public AndroidElement getUserNameInput () {
return userNameInput;
}
public AndroidElement getPasswordInput () {
return passwordInput;
}
public AndroidElement getServerStatusTextElement () {
return serverStatusText;
}
public AndroidElement getAuthStatusText () {
return authStatusText;
}
}
@@ -1,47 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import org.openqa.selenium.support.PageFactory;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
public class MenuList {
final AndroidDriver driver;
@AndroidFindBy(name = "Settings")
private AndroidElement settingsButton;
public MenuList (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public SettingsView clickOnSettingsButton () {
settingsButton.click();
SettingsView settingsView = new SettingsView(driver);
return settingsView;
}
}
@@ -1,57 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.support.CacheLookup;
import org.openqa.selenium.support.PageFactory;
import com.owncloud.android.test.ui.actions.Actions;
public class MoveView {
final AndroidDriver driver;
@CacheLookup
@AndroidFindBy(id = "com.owncloud.android:id/list_root")
private AndroidElement filesLayout;
@AndroidFindBy(name = "Choose")
private AndroidElement chooseButton;
public MoveView (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public WaitAMomentPopUp clickOnChoose () {
chooseButton.click();
WaitAMomentPopUp waitAMomentPopUp = new WaitAMomentPopUp(driver);
return waitAMomentPopUp;
}
public AndroidElement scrollTillFindElement (String elementName) {
return Actions.scrollTillFindElement (elementName,filesLayout,driver);
}
}
@@ -1,58 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import org.openqa.selenium.support.PageFactory;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
public class NewFolderPopUp {
final AndroidDriver driver;
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".resourceId(\"android:id/button1\")")
private AndroidElement newFolderOkButton;
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".resourceId(\"com.owncloud.android:id/user_input\")")
private AndroidElement newFolderNameField;
public NewFolderPopUp (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public void typeNewFolderName (String newFolderName) {
newFolderNameField.clear();
newFolderNameField.sendKeys(newFolderName + "\n");
//driver.hideKeyboard();
}
public WaitAMomentPopUp clickOnNewFolderOkButton () {
newFolderOkButton.click();
WaitAMomentPopUp waitAMomentPopUp = new WaitAMomentPopUp(driver);
return waitAMomentPopUp;
}
}
@@ -1,54 +0,0 @@
package com.owncloud.android.test.ui.models;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.support.PageFactory;
public class NotificationView {
final AndroidDriver driver;
@AndroidFindBy(name = "Upload succeeded")
private static AndroidElement uploadSucceededNotification;
@AndroidFindBy(name = "Uploading ?")
private static AndroidElement uploadingNotification;
@AndroidFindBy(uiAutomator = "new UiSelector().description(\"Clear all notifications.\")")
private AndroidElement clearAllNotificationButton;
@AndroidFindBy(uiAutomator = "new UiSelector().className(\"android.widget.FrameLayout\").index(0)")
private AndroidElement notificationArea;
public NotificationView (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public AndroidElement getUploadSucceededNotification() {
return uploadSucceededNotification;
}
public AndroidElement getUploadingNotification() {
return uploadingNotification;
}
public AndroidElement getClearAllNotificationButton() {
return clearAllNotificationButton;
}
public void tapOnClearAllNotification () {
clearAllNotificationButton.tap(1, 1000);
}
public void tapOnBottomNotificationArea(){
//TODO. it is not working
notificationArea.getSize();
notificationArea.tap(1, 1000);
}
}
@@ -1,60 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import org.openqa.selenium.support.PageFactory;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
public class PassCodeRequestView {
final AndroidDriver driver;
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".className(\"android.widget.EditText\").index(0)")
private AndroidElement codeElement1;
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".className(\"android.widget.EditText\").index(1)")
private AndroidElement codeElement2;
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".className(\"android.widget.EditText\").index(2)")
private AndroidElement codeElement3;
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".className(\"android.widget.EditText\").index(3)")
private AndroidElement codeElement4;
public PassCodeRequestView (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public void enterPasscode(String codeNumber1, String codeNumber2,
String codeNumber3, String codeNumber4){
codeElement1
.sendKeys(codeNumber1 + codeNumber1 + codeNumber1 + codeNumber1);
}
}
@@ -1,71 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.support.PageFactory;
public class PassCodeView {
final AndroidDriver driver;
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".className(\"android.widget.EditText\").index(0)")
private AndroidElement codeElement1;
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".className(\"android.widget.EditText\").index(1)")
private AndroidElement codeElement2;
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".className(\"android.widget.EditText\").index(2)")
private AndroidElement codeElement3;
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".className(\"android.widget.EditText\").index(3)")
private AndroidElement codeElement4;
@AndroidFindBy(name = "Cancel")
private AndroidElement cancelButton;
public PassCodeView (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public PassCodeView enterPasscode(String codeNumber1, String codeNumber2,
String codeNumber3, String codeNumber4){
codeElement1
.sendKeys(codeNumber1 + codeNumber1 + codeNumber1 + codeNumber1);
return this;
}
public SettingsView reenterPasscode(String codeNumber1,
String codeNumber2, String codeNumber3, String codeNumber4){
codeElement1
.sendKeys(codeNumber1 + codeNumber1 + codeNumber1 + codeNumber1);
SettingsView settingsView = new SettingsView(driver);
return settingsView;
}
}
@@ -1,46 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.support.PageFactory;
public class RemoveConfirmationView {
final AndroidDriver driver;
@AndroidFindBy(name = "Remote and local")
private AndroidElement remoteAndLocalButton;
public RemoveConfirmationView (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public WaitAMomentPopUp clickOnRemoteAndLocalButton () {
remoteAndLocalButton.click();
WaitAMomentPopUp waitAMomentPopUp = new WaitAMomentPopUp(driver);
return waitAMomentPopUp;
}
}
@@ -1,101 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.support.CacheLookup;
import org.openqa.selenium.support.PageFactory;
import com.owncloud.android.test.ui.testSuites.Config;
public class SettingsView {
final AndroidDriver driver;
@CacheLookup
@AndroidFindBy(name = Config.userAccount)
private AndroidElement accountElement;
@CacheLookup
@AndroidFindBy(name = Config.userAccount2)
private AndroidElement accountElement2;
@AndroidFindBy(name = "Delete account")
private AndroidElement deleteAccountElement;
@AndroidFindBy(name = "Change password")
private AndroidElement changePasswordElement;
@AndroidFindBy(name = "Add account")
private AndroidElement addAccountElement;
@AndroidFindBy(uiAutomator = "new UiSelector()"
+ ".className(\"android.widget.CheckBox\").index(0)")
private AndroidElement passcodeCheckbox;
public SettingsView (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public void tapOnAccountElement (int accountPosition, int fingers, int milliSeconds) {
if(accountPosition==1)
accountElement.tap(fingers, milliSeconds);
else
accountElement2.tap(fingers, milliSeconds);
}
public void tapOnAddAccount (int fingers, int milliSeconds) {
addAccountElement.tap(fingers, milliSeconds);
}
public LoginForm clickOnDeleteAccountElement () {
deleteAccountElement.click();
LoginForm loginForm = new LoginForm(driver);
return loginForm;
}
public LoginForm clickOnChangePasswordElement () {
changePasswordElement.click();
LoginForm loginForm = new LoginForm(driver);
return loginForm;
}
public PassCodeView EnablePassCode(){
if(!passcodeCheckbox.isSelected()){
passcodeCheckbox.click();
}
PassCodeView passcodeview = new PassCodeView(driver);
return passcodeview;
}
public PassCodeView DisablePassCode(){
if(passcodeCheckbox.isSelected()){
passcodeCheckbox.click();
}
PassCodeView passcodeview = new PassCodeView(driver);
return passcodeview;
}
}
@@ -1,48 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.support.CacheLookup;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
public class ShareView {
final AndroidDriver driver;
@CacheLookup
@FindBy(id = "android:id/select_dialog_listview")
private AndroidElement listViewLayout;
public ShareView (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public AndroidElement getListViewLayout () {
return listViewLayout;
}
}
@@ -1,67 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.support.CacheLookup;
import org.openqa.selenium.support.PageFactory;
import com.owncloud.android.test.ui.actions.Actions;
public class UploadFilesView{
final AndroidDriver driver;
@CacheLookup
@AndroidFindBy(id = "com.owncloud.android:id/list_root")
private AndroidElement filesLayout;
@CacheLookup
@AndroidFindBy(id = "com.owncloud.android:id/upload_files_btn_upload")
private AndroidElement uploadButton;
private AndroidElement fileElement;
public UploadFilesView (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public FileListView clickOnUploadButton () {
uploadButton.click();
FileListView fileListView = new FileListView (driver);
return fileListView;
}
//change to scrollTillFindElement
public void scrollTillFindFile (String fileName) {
fileElement = Actions
.scrollTillFindElement(fileName,filesLayout,driver);
}
public void clickOnFileName (String fileName) {
scrollTillFindFile(fileName);
fileElement.click();
}
}
@@ -1,46 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.support.CacheLookup;
import org.openqa.selenium.support.PageFactory;
public class UploadView {
final AndroidDriver driver;
@CacheLookup
@AndroidFindBy(name = "Upload")
private AndroidElement uploadButton;
public UploadView (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public void clickOUploadButton () {
uploadButton.click();
}
}
@@ -1,44 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.models;
import org.openqa.selenium.support.PageFactory;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
public class WaitAMomentPopUp {
final AndroidDriver driver;
@AndroidFindBy(name = "Wait a moment")
private AndroidElement waitAMomentText;
public WaitAMomentPopUp (AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}
public AndroidElement getWaitAMomentTextElement () {
return waitAMomentText;
}
}
@@ -1 +0,0 @@
Config.java
@@ -1,203 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.testSuites;
import static org.junit.Assert.*;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.concurrent.TimeUnit;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TimeoutException;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.support.ui.WebDriverWait;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
public class Common{
AndroidDriver driver;
static int waitingTime = 30;
public WebDriverWait wait;
protected AndroidDriver setUpCommonDriver () throws Exception {
File rootPath = new File(System.getProperty("user.dir"));
File appDir = new File(rootPath,"src/test/resources");
File app = new File(appDir,"ownCloud.apk");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("deviceName", "test");
capabilities.setCapability("app", app.getAbsolutePath());
capabilities.setCapability("appPackage", "com.owncloud.android");
capabilities.setCapability("appActivity",
".ui.activity.FileDisplayActivity");
capabilities.setCapability("appWaitActivity",
".authentication.AuthenticatorActivity");
driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),
capabilities);
driver.manage().timeouts().implicitlyWait(waitingTime,
TimeUnit.SECONDS);
wait = new WebDriverWait(driver, waitingTime, 50);
return driver;
}
protected boolean waitForTextPresent(String text, AndroidElement element)
throws InterruptedException{
for (int second = 0;;second++){
if (second >= waitingTime)
return false;
try{
if (text.equals(element.getText()))
break;
} catch (Exception e){
}
Thread.sleep(1000);
}
return true;
}
protected boolean isElementPresent(AndroidElement element, By by) {
try {
element.findElement(by);
return true;
} catch (NoSuchElementException e) {
return false;
}
}
public static boolean isElementPresent(AndroidElement element) {
try{
element.isDisplayed();
} catch (NoSuchElementException e){
return false;
}
return true;
}
//pollingTime in milliseconds
public static void waitTillElementIsNotPresent (AndroidElement element,
int pollingTime) throws Exception {
for (int time = 0;time <= waitingTime * 1000;time += pollingTime){
try{
element.isDisplayed();
} catch (NoSuchElementException e){
return;
}
Thread.sleep(pollingTime);
}
throw new TimeoutException();
}
public static void waitTillElementIsNotPresentWithoutTimeout (
AndroidElement element,int pollingTime)
throws InterruptedException {
for (int time = 0;time <= waitingTime * 1000;time += pollingTime){
try{
element.isDisplayed();
} catch (NoSuchElementException e){
return;
}
Thread.sleep(pollingTime);
}
}
public static void waitTillElementIsPresent (
AndroidElement element,int pollingTime)
throws InterruptedException {
for (int time = 0;time <= waitingTime * 1000;time += pollingTime){
try{
if(element.isDisplayed()){
return;
}
} catch (NoSuchElementException e){
}
Thread.sleep(pollingTime);
}
}
protected void takeScreenShotOnFailed (String testName)
throws IOException {
File file = ((RemoteWebDriver) driver)
.getScreenshotAs(OutputType.FILE);
SimpleDateFormat dt1 = new SimpleDateFormat("yyyy-MM-dd");
Date today = Calendar.getInstance().getTime();
String screenShotName = "ScreenShots/" + dt1.format(today) + "/"
+ testName + ".png";
FileUtils.copyFile(file, new File(screenShotName));
}
protected void assertIsInFileListView() throws InterruptedException {
//waitForTextPresent("Wrong username or password",
// changePasswordForm.getAuthStatusText());
Thread.sleep(2000);
assertTrue(waitForTextPresent("ownCloud", (AndroidElement) driver
.findElementByAndroidUIAutomator("new UiSelector()"
+ ".resourceId(\"android:id/action_bar_title\")")));
assertTrue(isElementPresent((AndroidElement) driver
.findElementByAndroidUIAutomator("new UiSelector()"
+ ".description(\"Upload\")")));
}
protected void assertIsNotInFileListView() throws InterruptedException {
AndroidElement fileElement;
assertTrue(waitForTextPresent("ownCloud", (AndroidElement) driver
.findElementByAndroidUIAutomator("new UiSelector()"
+ ".resourceId(\"android:id/action_bar_title\")")));
try {
fileElement = (AndroidElement) driver
.findElementByAndroidUIAutomator("new UiSelector()"
+ ".description(\"Upload\")");
} catch (NoSuchElementException e) {
fileElement = null;
}
assertNull(fileElement);
}
protected void assertIsPasscodeRequestView() throws InterruptedException {
assertTrue(waitForTextPresent("ownCloud", (AndroidElement) driver
.findElementByAndroidUIAutomator("new UiSelector()"
+ ".resourceId(\"android:id/action_bar_title\")")));
assertTrue(((AndroidElement) driver.findElementByAndroidUIAutomator(
"new UiSelector().text(\"Please, insert your pass code\")"))
.isDisplayed());
}
protected void assertIsInSettingsView() throws InterruptedException {
assertTrue(waitForTextPresent("Settings", (AndroidElement) driver
.findElementByAndroidUIAutomator("new UiSelector()"
+ ".resourceId(\"android:id/action_bar_title\")")));
}
}
@@ -1,54 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.testSuites;
public final class Config {
//without http or https
public static final String URL = "owncloudServerVar";
public static boolean isTrusted = true;
//without http or https
public static final String URL2 = "owncloudServer2Var";
public static boolean isTrusted2 = true;
public static final String user = "owncloudUserVar";
public static final String password = "owncloudPasswordVar";
public static final String user2 = "owncloudUser2Var";
public static final String password2 = "owncloudPassword2Var";
public static final String userAccount = user + "@"+ URL;
public static final String userAccount2 = user2 + "@"+ URL2;
public static final String gmailAccount = "gmailAccountVar";
public static final String fileWhichIsInTheServer1 ="test";
public static final String fileWhichIsInTheServer2 ="test";
public static final String fileToTestName = "test";
public static final String fileToTestSendByEmailName = "test";
public static final String bigFileToTestName = "test";
public static final String passcode1 = "passcode1";
public static final String passcode2 = "passcode2";
public static final String passcode3 = "passcode3";
public static final String passcode4 = "passcode4";
}
@@ -1,94 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.testSuites;
import static org.junit.Assert.*;
import io.appium.java_client.android.AndroidDriver;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
import org.junit.runners.MethodSorters;
import org.junit.FixMethodOrder;
import org.junit.Test;
import com.owncloud.android.test.ui.actions.Actions;
import com.owncloud.android.test.ui.groups.NoIgnoreTestCategory;
import com.owncloud.android.test.ui.groups.SmokeTestCategory;
import com.owncloud.android.test.ui.models.FileListView;
import com.owncloud.android.test.ui.models.WaitAMomentPopUp;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class CreateFolderTestSuite{
AndroidDriver driver;
Common common;
private Boolean folderHasBeenCreated = false;
private final String FOLDER_NAME = "testCreateFolder";
private String CurrentCreatedFolder = "";
@Rule public TestName name = new TestName();
@Before
public void setUp() throws Exception {
common=new Common();
driver=common.setUpCommonDriver();
}
@Test
@Category({NoIgnoreTestCategory.class, SmokeTestCategory.class})
public void testCreateNewFolder () throws Exception {
String NEW_FOLDER_NAME = "testCreateFolder";
FileListView fileListView = Actions.login(Config.URL,
Config.user,Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
//check if the folder already exists and if true, delete them
Actions.deleteElement(NEW_FOLDER_NAME, fileListView, driver);
WaitAMomentPopUp waitAMomentPopUp = Actions
.createFolder(NEW_FOLDER_NAME, fileListView);
Common.waitTillElementIsNotPresentWithoutTimeout(waitAMomentPopUp
.getWaitAMomentTextElement(), 100);
fileListView.scrollTillFindElement(FOLDER_NAME);
assertNotNull(fileListView.getFileElement());
assertTrue(
folderHasBeenCreated=fileListView.getFileElement().isDisplayed());
CurrentCreatedFolder = FOLDER_NAME;
assertEquals(FOLDER_NAME , fileListView.getFileElement().getText());
}
@After
public void tearDown() throws Exception {
common.takeScreenShotOnFailed(name.getMethodName());
if (folderHasBeenCreated) {
FileListView fileListView = new FileListView(driver);
Actions.deleteElement(CurrentCreatedFolder, fileListView, driver);
}
driver.removeApp("com.owncloud.android");
driver.quit();
}
}
@@ -1,87 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.testSuites;
import static org.junit.Assert.*;
import io.appium.java_client.android.AndroidDriver;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
import org.junit.runners.MethodSorters;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.support.ui.ExpectedConditions;
import com.owncloud.android.test.ui.actions.Actions;
import com.owncloud.android.test.ui.groups.NoIgnoreTestCategory;
import com.owncloud.android.test.ui.groups.SmokeTestCategory;
import com.owncloud.android.test.ui.models.FileListView;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class DeleteFileTestSuite{
AndroidDriver driver;
Common common;
private final String FILE_NAME = Config.fileToTestName;
@Rule public TestName name = new TestName();
@Before
public void setUp() throws Exception {
common=new Common();
driver=common.setUpCommonDriver();
}
@Test
@Category({NoIgnoreTestCategory.class, SmokeTestCategory.class})
public void testDeleteFile () throws Exception {
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
//TODO. if the file already exists, do not upload
FileListView fileListViewAfterUploadFile = Actions
.uploadFile(FILE_NAME, fileListView);
fileListViewAfterUploadFile.scrollTillFindElement(FILE_NAME);
Common.waitTillElementIsNotPresentWithoutTimeout(
fileListViewAfterUploadFile.getProgressCircular(), 1000);
common.wait.until(ExpectedConditions.visibilityOf(
fileListViewAfterUploadFile.getFileElementLayout()
.findElement(By.id(FileListView.getLocalFileIndicator()))));
Actions.deleteElement(FILE_NAME,fileListViewAfterUploadFile, driver);
assertFalse(fileListViewAfterUploadFile.getFileElement().isDisplayed());
}
@After
public void tearDown() throws Exception {
common.takeScreenShotOnFailed(name.getMethodName());
driver.removeApp("com.owncloud.android");
driver.quit();
}
}
@@ -1,92 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.testSuites;
import static org.junit.Assert.*;
import io.appium.java_client.android.AndroidDriver;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
import org.junit.runners.MethodSorters;
import org.junit.FixMethodOrder;
import org.junit.Test;
import com.owncloud.android.test.ui.actions.Actions;
import com.owncloud.android.test.ui.groups.NoIgnoreTestCategory;
import com.owncloud.android.test.ui.groups.SmokeTestCategory;
import com.owncloud.android.test.ui.models.FileListView;
import com.owncloud.android.test.ui.models.WaitAMomentPopUp;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class DeleteFolderTestSuite{
AndroidDriver driver;
Common common;
private Boolean folderHasBeenCreated = false;
private final String FOLDER_NAME = "testCreateFolder";
@Rule public TestName name = new TestName();
@Before
public void setUp() throws Exception {
common=new Common();
driver=common.setUpCommonDriver();
}
@Test
@Category({NoIgnoreTestCategory.class, SmokeTestCategory.class})
public void testDeleteFolder () throws Exception {
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
//TODO. if the folder already exists, do no created
//create the folder
WaitAMomentPopUp waitAMomentPopUp = Actions
.createFolder(FOLDER_NAME, fileListView);
Common.waitTillElementIsNotPresentWithoutTimeout(
waitAMomentPopUp.getWaitAMomentTextElement(), 100);
fileListView.scrollTillFindElement(FOLDER_NAME);
assertTrue(
folderHasBeenCreated = fileListView.getFileElement().isDisplayed());
//delete the folder
Actions.deleteElement(FOLDER_NAME, fileListView, driver);
assertFalse(
folderHasBeenCreated =fileListView.getFileElement().isDisplayed());
}
@After
public void tearDown() throws Exception {
common.takeScreenShotOnFailed(name.getMethodName());
if(folderHasBeenCreated){
FileListView fileListView = new FileListView(driver);
Actions.deleteElement(FOLDER_NAME, fileListView, driver);
}
driver.removeApp("com.owncloud.android");
driver.quit();
}
}
@@ -1,181 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.testSuites;
import static org.junit.Assert.*;
import io.appium.java_client.android.AndroidDriver;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
import org.junit.runners.MethodSorters;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.openqa.selenium.ScreenOrientation;
import com.owncloud.android.test.ui.actions.Actions;
import com.owncloud.android.test.ui.groups.*;
import com.owncloud.android.test.ui.models.LoginForm;
import com.owncloud.android.test.ui.models.FileListView;
import com.owncloud.android.test.ui.models.MenuList;
import com.owncloud.android.test.ui.models.SettingsView;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class LoginTestSuite{
AndroidDriver driver;
Common common;
@Rule public TestName name = new TestName();
@Before
public void setUp() throws Exception {
common=new Common();
driver=common.setUpCommonDriver();
}
@Test
@Category({NoIgnoreTestCategory.class})
public void test1LoginPortrait () throws Exception {
driver.rotate(ScreenOrientation.PORTRAIT);
Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
}
@Test
@Category({NoIgnoreTestCategory.class})
public void test2LoginLandscape () throws Exception {
driver.rotate(ScreenOrientation.LANDSCAPE);
Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
}
@Test
@Category({NoIgnoreTestCategory.class, SmokeTestCategory.class})
public void testLoginAndShowFiles () throws Exception {
driver.rotate(ScreenOrientation.PORTRAIT);
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
fileListView.scrollTillFindElement(Config.fileWhichIsInTheServer1);
assertTrue(fileListView.getFileElement().isDisplayed());
}
@Test
@Category({NoIgnoreTestCategory.class, SmokeTestCategory.class})
public void test3MultiAccountRotate () throws Exception {
driver.rotate(ScreenOrientation.LANDSCAPE);
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
driver.rotate(ScreenOrientation.PORTRAIT);
MenuList menu = fileListView.clickOnMenuButton();
SettingsView settingsView = menu.clickOnSettingsButton();
settingsView.tapOnAddAccount(1, 1000);
fileListView = Actions.login(Config.URL2, Config.user2,
Config.password2, Config.isTrusted2, driver);
common.assertIsInSettingsView();
}
@Test
@Category({NoIgnoreTestCategory.class, SmokeTestCategory.class})
public void testMultiAccountAndShowFiles () throws Exception {
driver.rotate(ScreenOrientation.LANDSCAPE);
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
fileListView.scrollTillFindElement(Config.fileWhichIsInTheServer1);
assertTrue(fileListView.getFileElement().isDisplayed());
driver.rotate(ScreenOrientation.PORTRAIT);
MenuList menu = fileListView.clickOnMenuButton();
SettingsView settingsView = menu.clickOnSettingsButton();
settingsView.tapOnAddAccount(1, 1000);
fileListView = Actions.login(Config.URL2, Config.user2,
Config.password2, Config.isTrusted2, driver);
common.assertIsInSettingsView();
settingsView.tapOnAccountElement(2,1, 100);
common.assertIsInFileListView();
fileListView.scrollTillFindElement(Config.fileWhichIsInTheServer2);
assertTrue(fileListView.getFileElement().isDisplayed());
}
@Test
@Category({NoIgnoreTestCategory.class})
public void test4ExistingAccountRotate () throws Exception {
driver.rotate(ScreenOrientation.PORTRAIT);
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
driver.rotate(ScreenOrientation.LANDSCAPE);
MenuList menu = fileListView.clickOnMenuButton();
SettingsView settingsView = menu.clickOnSettingsButton();
settingsView.tapOnAddAccount(1, 1000);
LoginForm loginForm = new LoginForm(driver);
fileListView = Actions.login(Config.URL, Config.user,Config.password,
Config.isTrusted, driver);
assertTrue(common.waitForTextPresent("An account for the same user and"
+ " server already exists in the device",
loginForm.getAuthStatusText()));
}
@Test
@Category({NoIgnoreTestCategory.class})
public void test5ChangePasswordWrong () throws Exception {
driver.rotate(ScreenOrientation.PORTRAIT);
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
MenuList menu = fileListView.clickOnMenuButton();
SettingsView settingsView = menu.clickOnSettingsButton();
settingsView.tapOnAccountElement(1,1, 1000);
LoginForm changePasswordForm = settingsView
.clickOnChangePasswordElement();
changePasswordForm.typePassword("WrongPassword");
changePasswordForm.clickOnConnectButton();
assertTrue(common.waitForTextPresent("Wrong username or password",
changePasswordForm.getAuthStatusText()));
}
@After
public void tearDown() throws Exception {
common.takeScreenShotOnFailed(name.getMethodName());
driver.removeApp("com.owncloud.android");
driver.quit();
}
}
@@ -1,77 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.testSuites;
import static org.junit.Assert.*;
import io.appium.java_client.android.AndroidDriver;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
import com.owncloud.android.test.ui.actions.Actions;
import com.owncloud.android.test.ui.groups.NoIgnoreTestCategory;
import com.owncloud.android.test.ui.groups.SmokeTestCategory;
import com.owncloud.android.test.ui.models.LoginForm;
import com.owncloud.android.test.ui.models.FileListView;
import com.owncloud.android.test.ui.models.MenuList;
import com.owncloud.android.test.ui.models.SettingsView;
public class LogoutTestSuite{
AndroidDriver driver;
Common common;
@Rule public TestName name = new TestName();
@Before
public void setUp() throws Exception {
common=new Common();
driver=common.setUpCommonDriver();
}
@Test
@Category({NoIgnoreTestCategory.class, SmokeTestCategory.class})
public void testLogout () throws Exception {
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
MenuList menulist = fileListView.clickOnMenuButton();
SettingsView settingsView = menulist.clickOnSettingsButton();
settingsView.tapOnAccountElement(1,1, 1000);
LoginForm loginForm = settingsView.clickOnDeleteAccountElement();
assertEquals("Server address https://…",
loginForm.gethostUrlInput().getText());
assertEquals("Username", loginForm.getUserNameInput().getText());
assertEquals("", loginForm.getPasswordInput().getText());
}
@After
public void tearDown() throws Exception {
common.takeScreenShotOnFailed(name.getMethodName());
//driver.removeApp("com.owncloud.android");
driver.quit();
}
}
@@ -1,120 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.testSuites;
import static org.junit.Assert.*;
import io.appium.java_client.android.AndroidDriver;
import org.junit.After;
import org.junit.Before;
import org.junit.FixMethodOrder;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
import org.junit.runners.MethodSorters;
import com.owncloud.android.test.ui.actions.Actions;
import com.owncloud.android.test.ui.groups.NoIgnoreTestCategory;
import com.owncloud.android.test.ui.groups.SmokeTestCategory;
import com.owncloud.android.test.ui.models.ElementMenuOptions;
import com.owncloud.android.test.ui.models.FileListView;
import com.owncloud.android.test.ui.models.MoveView;
import com.owncloud.android.test.ui.models.WaitAMomentPopUp;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class MoveFileTestSuite{
AndroidDriver driver;
Common common;
private String FOLDER_WHERE_MOVE = "folderWhereMove";
private String FILE_NAME = Config.fileToTestName;
@Rule public TestName name = new TestName();
@Before
public void setUp() throws Exception {
common=new Common();
driver=common.setUpCommonDriver();
}
@Test
@Category({NoIgnoreTestCategory.class, SmokeTestCategory.class})
public void testMoveFile () throws Exception {
WaitAMomentPopUp waitAMomentPopUp;
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
//Common.waitTillElementIsNotPresentWithoutTimeout(
//fileListView.getProgressCircular(), 1000);
//check if the folder already exists and if true, delete them
Actions.deleteElement(FOLDER_WHERE_MOVE, fileListView, driver);
Actions.deleteElement(FILE_NAME, fileListView, driver);
//Create the folder where the other is gone to be moved
waitAMomentPopUp = Actions
.createFolder(FOLDER_WHERE_MOVE, fileListView);
Common.waitTillElementIsNotPresentWithoutTimeout(
waitAMomentPopUp.getWaitAMomentTextElement(), 100);
fileListView.scrollTillFindElement(FOLDER_WHERE_MOVE);
assertTrue(fileListView.getFileElement().isDisplayed());
FileListView fileListViewAfterUploadFile = Actions
.uploadFile(FILE_NAME, fileListView);
fileListViewAfterUploadFile.scrollTillFindElement(FILE_NAME);
assertTrue(fileListViewAfterUploadFile.getFileElement().isDisplayed());
//select to move the file
ElementMenuOptions menuOptions = fileListView
.longPressOnElement(FILE_NAME);
MoveView moveView = menuOptions.clickOnMove();
//to move to a folder
moveView.scrollTillFindElement(FOLDER_WHERE_MOVE).tap(1,1);
waitAMomentPopUp = moveView.clickOnChoose();
Common.waitTillElementIsNotPresentWithoutTimeout(
waitAMomentPopUp.getWaitAMomentTextElement(), 100);
//check that the folder moved is inside the other
fileListView.scrollTillFindElement(FOLDER_WHERE_MOVE).tap(1,1);
Common.waitTillElementIsNotPresentWithoutTimeout(fileListView.getProgressCircular(),
1000);
Thread.sleep(1000);
fileListView.scrollTillFindElement(FILE_NAME);
assertEquals(FILE_NAME , fileListView.getFileElement().getText());
}
@After
public void tearDown() throws Exception {
common.takeScreenShotOnFailed(name.getMethodName());
FileListView fileListView = new FileListView(driver);
driver.sendKeyEvent(android.view.KeyEvent.KEYCODE_BACK);
Actions.deleteElement(FOLDER_WHERE_MOVE, fileListView, driver);
Actions.deleteElement(FILE_NAME, fileListView, driver);
driver.removeApp("com.owncloud.android");
driver.quit();
}
}
@@ -1,122 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.testSuites;
import static org.junit.Assert.*;
import io.appium.java_client.android.AndroidDriver;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
import org.junit.runners.MethodSorters;
import org.junit.FixMethodOrder;
import org.junit.Test;
import com.owncloud.android.test.ui.actions.Actions;
import com.owncloud.android.test.ui.groups.NoIgnoreTestCategory;
import com.owncloud.android.test.ui.groups.SmokeTestCategory;
import com.owncloud.android.test.ui.models.ElementMenuOptions;
import com.owncloud.android.test.ui.models.FileListView;
import com.owncloud.android.test.ui.models.MoveView;
import com.owncloud.android.test.ui.models.WaitAMomentPopUp;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class MoveFolderTestSuite{
AndroidDriver driver;
Common common;
private String FOLDER_TO_MOVE = "folderToMove";
private String FOLDER_WHERE_MOVE = "folderWhereMove";
@Rule public TestName name = new TestName();
@Before
public void setUp() throws Exception {
common=new Common();
driver=common.setUpCommonDriver();
}
@Test
@Category({NoIgnoreTestCategory.class, SmokeTestCategory.class})
public void testMoveFolder () throws Exception {
WaitAMomentPopUp waitAMomentPopUp;
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
//Common.waitTillElementIsNotPresentWithoutTimeout(
//fileListView.getProgressCircular(), 1000);
//check if the folder already exists and if true, delete them
Actions.deleteElement(FOLDER_WHERE_MOVE, fileListView, driver);
Actions.deleteElement(FOLDER_TO_MOVE, fileListView, driver);
//Create the folder where the other is gone to be moved
waitAMomentPopUp = Actions
.createFolder(FOLDER_WHERE_MOVE, fileListView);
Common.waitTillElementIsNotPresentWithoutTimeout(
waitAMomentPopUp.getWaitAMomentTextElement(), 100);
fileListView.scrollTillFindElement(FOLDER_WHERE_MOVE);
assertTrue(fileListView.getFileElement().isDisplayed());
//Create the folder which is going to be moved
waitAMomentPopUp = Actions.createFolder(FOLDER_TO_MOVE, fileListView);
Common.waitTillElementIsNotPresent(
waitAMomentPopUp.getWaitAMomentTextElement(), 100);
fileListView.scrollTillFindElement(FOLDER_TO_MOVE);
assertTrue(fileListView.getFileElement().isDisplayed());
//select to move the folder
ElementMenuOptions menuOptions = fileListView
.longPressOnElement(FOLDER_TO_MOVE);
MoveView moveView = menuOptions.clickOnMove();
//to move to a folder
moveView.scrollTillFindElement(FOLDER_WHERE_MOVE).tap(1,1);
waitAMomentPopUp = moveView.clickOnChoose();
Common.waitTillElementIsNotPresentWithoutTimeout(waitAMomentPopUp
.getWaitAMomentTextElement(), 100);
//check that the folder moved is inside the other
fileListView.scrollTillFindElement(FOLDER_WHERE_MOVE).tap(1,1);
Common.waitTillElementIsNotPresentWithoutTimeout(fileListView.getProgressCircular(),
1000);
Thread.sleep(1000);
fileListView.scrollTillFindElement(FOLDER_TO_MOVE);
assertEquals(FOLDER_TO_MOVE , fileListView.getFileElement().getText());
}
@After
public void tearDown() throws Exception {
common.takeScreenShotOnFailed(name.getMethodName());
FileListView fileListView = new FileListView(driver);
driver.sendKeyEvent(android.view.KeyEvent.KEYCODE_BACK);
Actions.deleteElement(FOLDER_WHERE_MOVE, fileListView, driver);
Actions.deleteElement(FOLDER_TO_MOVE, fileListView, driver);
driver.removeApp("com.owncloud.android");
driver.quit();
}
}
@@ -1,98 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.testSuites;
import io.appium.java_client.android.AndroidDriver;
import org.junit.After;
import org.junit.Before;
import org.junit.FixMethodOrder;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
import org.junit.runners.MethodSorters;
import org.openqa.selenium.ScreenOrientation;
import com.owncloud.android.test.ui.actions.Actions;
import com.owncloud.android.test.ui.groups.NoIgnoreTestCategory;
import com.owncloud.android.test.ui.models.FileListView;
import com.owncloud.android.test.ui.models.MenuList;
import com.owncloud.android.test.ui.models.PassCodeRequestView;
import com.owncloud.android.test.ui.models.PassCodeView;
import com.owncloud.android.test.ui.models.SettingsView;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class PasscodeTestSuite {
AndroidDriver driver;
Common common;
@Rule public TestName name = new TestName();
@Before
public void setUp() throws Exception {
common=new Common();
driver=common.setUpCommonDriver();
}
@Test
@Category({NoIgnoreTestCategory.class})
public void testPincodeEnable () throws Exception {
driver.rotate(ScreenOrientation.PORTRAIT);
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
MenuList menu = fileListView.clickOnMenuButton();
SettingsView settingsView = menu.clickOnSettingsButton();
PassCodeView passCodeview = settingsView.EnablePassCode();
PassCodeView passCodeview2 = passCodeview.enterPasscode(
Config.passcode1, Config.passcode2, Config.passcode3,
Config.passcode4);
passCodeview2.reenterPasscode(Config.passcode1, Config.passcode2,
Config.passcode3, Config.passcode4);
driver.sendKeyEvent(android.view.KeyEvent.KEYCODE_HOME);
//TO DO. Open the app instead of start an activity
driver.startActivity("com.owncloud.android",
".ui.activity.FileDisplayActivity");
//here we check that we are not in the fileDisplayActivity,
//because pincode is asked
common.assertIsNotInFileListView();
common.assertIsPasscodeRequestView();
PassCodeRequestView passCodeReequestView = new
PassCodeRequestView(driver);
passCodeReequestView.enterPasscode(Config.passcode1, Config.passcode2,
Config.passcode3, Config.passcode4);
common.assertIsInFileListView();
}
@After
public void tearDown() throws Exception {
common.takeScreenShotOnFailed(name.getMethodName());
driver.removeApp("com.owncloud.android");
driver.quit();
}
}
@@ -1,77 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.testSuites;
import static org.junit.Assert.*;
import io.appium.java_client.android.AndroidDriver;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
import org.junit.runners.MethodSorters;
import org.junit.FixMethodOrder;
import org.junit.Test;
import com.owncloud.android.test.ui.actions.Actions;
import com.owncloud.android.test.ui.groups.UnfinishedTestCategory;
import com.owncloud.android.test.ui.models.FileListView;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class RefreshFolderTestSuite{
AndroidDriver driver;
Common common;
@Rule public TestName name = new TestName();
@Before
public void setUp() throws Exception {
common=new Common();
driver=common.setUpCommonDriver();
}
@Test
@Category({UnfinishedTestCategory.class})
public void testPulldownToRefreshFolder () throws Exception {
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
//TODO. Remove the sleep and check why is not working the assert
//when using waitTillElementIsNotPresent
Thread.sleep(5000);
//waitTillElementIsNotPresentWithoutTimeout(fileListView.getProgressCircular(), 1000);
fileListView.pulldownToRefresh();
assertTrue(fileListView.getProgressCircular().isDisplayed());
//TODO insert a file in the web, and check that it's shown here
}
@After
public void tearDown() throws Exception {
common.takeScreenShotOnFailed(name.getMethodName());
driver.removeApp("com.owncloud.android");
driver.quit();
}
}
@@ -1,114 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.testSuites;
import static org.junit.Assert.*;
import io.appium.java_client.android.AndroidDriver;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
import org.junit.runners.MethodSorters;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.support.ui.ExpectedConditions;
import com.owncloud.android.test.ui.actions.Actions;
import com.owncloud.android.test.ui.groups.NoIgnoreTestCategory;
import com.owncloud.android.test.ui.groups.SmokeTestCategory;
import com.owncloud.android.test.ui.models.ElementMenuOptions;
import com.owncloud.android.test.ui.models.FileListView;
import com.owncloud.android.test.ui.models.NewFolderPopUp;
import com.owncloud.android.test.ui.models.WaitAMomentPopUp;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class RenameFileTestSuite{
AndroidDriver driver;
Common common;
private Boolean fileHasBeenCreated = false;
private final String OLD_FILE_NAME = Config.fileToTestName;
private final String FILE_NAME = "newNameFile";
private String CurrentCreatedFile = "";
@Rule public TestName name = new TestName();
@Before
public void setUp() throws Exception {
common=new Common();
driver=common.setUpCommonDriver();
}
@Test
@Category({NoIgnoreTestCategory.class, SmokeTestCategory.class})
public void testRenameFile () throws Exception {
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
//TODO. if the file already exists, do not upload
FileListView fileListViewAfterUploadFile = Actions
.uploadFile(OLD_FILE_NAME, fileListView);
//check if the file with the new name already exists, if true delete it
Actions.deleteElement(FILE_NAME, fileListView, driver);
fileListViewAfterUploadFile.scrollTillFindElement(OLD_FILE_NAME);
assertTrue(fileHasBeenCreated = fileListViewAfterUploadFile
.getFileElement().isDisplayed());
CurrentCreatedFile = OLD_FILE_NAME;
Common.waitTillElementIsNotPresentWithoutTimeout(fileListViewAfterUploadFile
.getProgressCircular(), 1000);
common.wait.until(ExpectedConditions.visibilityOf(
fileListViewAfterUploadFile.getFileElementLayout()
.findElement(By.id(FileListView.getLocalFileIndicator()))));
ElementMenuOptions menuOptions = fileListViewAfterUploadFile
.longPressOnElement(OLD_FILE_NAME);
NewFolderPopUp newFolderPopUp = menuOptions.clickOnRename();
newFolderPopUp.typeNewFolderName(FILE_NAME);
WaitAMomentPopUp waitAMomentPopUp = newFolderPopUp
.clickOnNewFolderOkButton();
Common.waitTillElementIsNotPresentWithoutTimeout(waitAMomentPopUp
.getWaitAMomentTextElement(), 100);
fileListViewAfterUploadFile.scrollTillFindElement(FILE_NAME);
assertNotNull(fileListViewAfterUploadFile.getFileElement());
assertTrue(fileListViewAfterUploadFile.getFileElement().isDisplayed());
assertEquals(FILE_NAME , fileListViewAfterUploadFile.getFileElement()
.getText());
CurrentCreatedFile = FILE_NAME;
}
@After
public void tearDown() throws Exception {
common.takeScreenShotOnFailed(name.getMethodName());
if (fileHasBeenCreated) {
FileListView fileListView = new FileListView(driver);
Actions.deleteElement(CurrentCreatedFile,fileListView, driver);
}
driver.removeApp("com.owncloud.android");
driver.quit();
}
}
@@ -1,112 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.testSuites;
import static org.junit.Assert.*;
import io.appium.java_client.android.AndroidDriver;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
import org.junit.runners.MethodSorters;
import org.junit.FixMethodOrder;
import org.junit.Test;
import com.owncloud.android.test.ui.actions.Actions;
import com.owncloud.android.test.ui.groups.NoIgnoreTestCategory;
import com.owncloud.android.test.ui.groups.SmokeTestCategory;
import com.owncloud.android.test.ui.models.ElementMenuOptions;
import com.owncloud.android.test.ui.models.FileListView;
import com.owncloud.android.test.ui.models.NewFolderPopUp;
import com.owncloud.android.test.ui.models.WaitAMomentPopUp;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class RenameFolderTestSuite{
AndroidDriver driver;
Common common;
private Boolean folderHasBeenCreated = false;
private final String OLD_FOLDER_NAME = "beforeRemoving";
private final String FOLDER_NAME = "testCreateFolder";
private String CurrentCreatedFolder = "";
@Rule public TestName name = new TestName();
@Before
public void setUp() throws Exception {
common=new Common();
driver=common.setUpCommonDriver();
}
@Test
@Category({NoIgnoreTestCategory.class, SmokeTestCategory.class})
public void testRenameFolder () throws Exception {
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
//TODO. if the folder already exists, do no created
//create the folder to rename
WaitAMomentPopUp waitAMomentPopUp = Actions
.createFolder(OLD_FOLDER_NAME, fileListView);
Common.waitTillElementIsNotPresentWithoutTimeout(
waitAMomentPopUp.getWaitAMomentTextElement(), 100);
fileListView.scrollTillFindElement(OLD_FOLDER_NAME);
assertTrue(
folderHasBeenCreated = fileListView.getFileElement().isDisplayed());
//check if the folder with the new name already exists
//and if true, delete them
Actions.deleteElement(FOLDER_NAME, fileListView, driver);
CurrentCreatedFolder = OLD_FOLDER_NAME;
ElementMenuOptions menuOptions = fileListView
.longPressOnElement(OLD_FOLDER_NAME);
NewFolderPopUp FolderPopUp = menuOptions.clickOnRename();
FolderPopUp.typeNewFolderName(FOLDER_NAME);
FolderPopUp.clickOnNewFolderOkButton();
CurrentCreatedFolder = FOLDER_NAME;
Common.waitTillElementIsNotPresentWithoutTimeout(waitAMomentPopUp
.getWaitAMomentTextElement(), 100);
fileListView.scrollTillFindElement(FOLDER_NAME);
assertNotNull(fileListView.getFileElement());
assertTrue(
folderHasBeenCreated = fileListView.getFileElement().isDisplayed());
assertEquals(FOLDER_NAME , fileListView.getFileElement().getText());
}
@After
public void tearDown() throws Exception {
common.takeScreenShotOnFailed(name.getMethodName());
if(folderHasBeenCreated){
FileListView fileListView = new FileListView(driver);
Actions.deleteElement(CurrentCreatedFolder, fileListView, driver);
}
driver.removeApp("com.owncloud.android");
driver.quit();
}
}
@@ -1,44 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.testSuites;
import org.junit.experimental.categories.Categories.ExcludeCategory;
import org.junit.experimental.categories.Categories.IncludeCategory;
import org.junit.runner.RunWith;
import com.owncloud.android.test.ui.groups.FailingTestCategory;
import com.owncloud.android.test.ui.groups.FlexibleCategories;
import com.owncloud.android.test.ui.groups.NoIgnoreTestCategory;
import com.owncloud.android.test.ui.groups.FlexibleCategories.TestClassPrefix;
import com.owncloud.android.test.ui.groups.FlexibleCategories.TestClassSuffix;
import com.owncloud.android.test.ui.groups.FlexibleCategories.TestScanPackage;
@RunWith(FlexibleCategories.class)
@ExcludeCategory(NoIgnoreTestCategory.class)
@IncludeCategory(FailingTestCategory.class)
@TestScanPackage("com.owncloud.android.test.ui.testSuites")
@TestClassPrefix("")
@TestClassSuffix("TestSuite")
public class RunFailingTests {
}
@@ -1,19 +0,0 @@
package com.owncloud.android.test.ui.testSuites;
import org.junit.experimental.categories.Categories.IncludeCategory;
import org.junit.runner.RunWith;
import com.owncloud.android.test.ui.groups.FlexibleCategories;
import com.owncloud.android.test.ui.groups.InProgressCategory;
import com.owncloud.android.test.ui.groups.FlexibleCategories.TestClassPrefix;
import com.owncloud.android.test.ui.groups.FlexibleCategories.TestClassSuffix;
import com.owncloud.android.test.ui.groups.FlexibleCategories.TestScanPackage;
@RunWith(FlexibleCategories.class)
@IncludeCategory(InProgressCategory.class)
@TestScanPackage("com.owncloud.android.test.ui.testSuites")
@TestClassPrefix("")
@TestClassSuffix("TestSuite")
public class RunInProgressTest {
}
@@ -1,42 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.testSuites;
import org.junit.experimental.categories.Categories.ExcludeCategory;
import org.junit.experimental.categories.Categories.IncludeCategory;
import org.junit.runner.RunWith;
import com.owncloud.android.test.ui.groups.FlexibleCategories;
import com.owncloud.android.test.ui.groups.IgnoreTestCategory;
import com.owncloud.android.test.ui.groups.NoIgnoreTestCategory;
import com.owncloud.android.test.ui.groups.FlexibleCategories.TestClassPrefix;
import com.owncloud.android.test.ui.groups.FlexibleCategories.TestClassSuffix;
import com.owncloud.android.test.ui.groups.FlexibleCategories.TestScanPackage;
@RunWith(FlexibleCategories.class)
@ExcludeCategory(IgnoreTestCategory.class)
@IncludeCategory(NoIgnoreTestCategory.class)
@TestScanPackage("com.owncloud.android.test.ui.testSuites")
@TestClassPrefix("")
@TestClassSuffix("TestSuite")
public class RunNoIgnoreTests {
}
@@ -1,42 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.testSuites;
import org.junit.experimental.categories.Categories.ExcludeCategory;
import org.junit.experimental.categories.Categories.IncludeCategory;
import org.junit.runner.RunWith;
import com.owncloud.android.test.ui.groups.FlexibleCategories;
import com.owncloud.android.test.ui.groups.IgnoreTestCategory;
import com.owncloud.android.test.ui.groups.SmokeTestCategory;
import com.owncloud.android.test.ui.groups.FlexibleCategories.TestClassPrefix;
import com.owncloud.android.test.ui.groups.FlexibleCategories.TestClassSuffix;
import com.owncloud.android.test.ui.groups.FlexibleCategories.TestScanPackage;
@RunWith(FlexibleCategories.class)
@ExcludeCategory(IgnoreTestCategory.class)
@IncludeCategory(SmokeTestCategory.class)
@TestScanPackage("com.owncloud.android.test.ui.testSuites")
@TestClassPrefix("")
@TestClassSuffix("TestSuite")
public class RunSmokeTests {
}
@@ -1,133 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.testSuites;
import static org.junit.Assert.*;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
import com.owncloud.android.test.ui.actions.Actions;
import com.owncloud.android.test.ui.groups.IgnoreTestCategory;
import com.owncloud.android.test.ui.groups.InProgressCategory;
import com.owncloud.android.test.ui.groups.NoIgnoreTestCategory;
import com.owncloud.android.test.ui.groups.SmokeTestCategory;
import com.owncloud.android.test.ui.models.FileListView;;
public class ShareLinkFileTestSuite{
AndroidDriver driver;
Common common;
private final String FILE_NAME = Config.fileToTestName;
private Boolean fileHasBeenCreated = false;
@Rule public TestName name = new TestName();
@Before
public void setUp() throws Exception {
common=new Common();
driver=common.setUpCommonDriver();
}
@Test
@Category({NoIgnoreTestCategory.class})
public void testShareLinkFileByGmail () throws Exception {
AndroidElement sharedElementIndicator;
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
//TODO. if the file already exists, do not upload
FileListView fileListViewAfterUploadFile = Actions
.uploadFile(FILE_NAME, fileListView);
fileListViewAfterUploadFile.scrollTillFindElement(FILE_NAME);
assertTrue(fileHasBeenCreated = fileListViewAfterUploadFile
.getFileElement().isDisplayed());
sharedElementIndicator = Actions.shareLinkElementByGmail(FILE_NAME,
fileListViewAfterUploadFile,driver,common);
assertTrue(sharedElementIndicator.isDisplayed());
}
@Test
@Category({NoIgnoreTestCategory.class, SmokeTestCategory.class})
public void testShareLinkFileByCopyLink () throws Exception {
AndroidElement sharedElementIndicator;
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
//TODO. if the file already exists, do not upload
FileListView fileListViewAfterUploadFile = Actions
.uploadFile(FILE_NAME, fileListView);
fileListViewAfterUploadFile.scrollTillFindElement(FILE_NAME);
assertTrue(fileHasBeenCreated = fileListViewAfterUploadFile
.getFileElement().isDisplayed());
sharedElementIndicator = Actions.shareLinkElementByCopyLink(FILE_NAME,
fileListViewAfterUploadFile,driver,common);
assertTrue(sharedElementIndicator.isDisplayed());
}
@Test
@Category({IgnoreTestCategory.class, SmokeTestCategory.class})
public void testUnshareLinkFile () throws Exception {
AndroidElement sharedElementIndicator;
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
//TODO. if the file already exists, do not upload
FileListView fileListViewAfterUploadFile = Actions
.uploadFile(FILE_NAME, fileListView);
fileListViewAfterUploadFile.scrollTillFindElement(FILE_NAME);
assertTrue(fileHasBeenCreated = fileListViewAfterUploadFile
.getFileElement().isDisplayed());
sharedElementIndicator = Actions.shareLinkElementByCopyLink(FILE_NAME,
fileListViewAfterUploadFile,driver,common);
assertTrue(sharedElementIndicator.isDisplayed());
Actions.unshareLinkElement(FILE_NAME,
fileListViewAfterUploadFile,driver,common);
assertFalse(sharedElementIndicator.isDisplayed());
}
@After
public void tearDown() throws Exception {
common.takeScreenShotOnFailed(name.getMethodName());
if (fileHasBeenCreated) {
FileListView fileListView = new FileListView(driver);
Actions.deleteElement(FILE_NAME,fileListView, driver);
}
driver.removeApp("com.owncloud.android");
driver.quit();
}
}
@@ -1,285 +0,0 @@
/**
* ownCloud Android client application
*
* @author purigarcia
* Copyright (C) 2015 ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.owncloud.android.test.ui.testSuites;
import static org.junit.Assert.*;
import io.appium.java_client.MobileBy;
import io.appium.java_client.android.AndroidDriver;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
import org.junit.runners.MethodSorters;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.support.ui.ExpectedConditions;
import com.owncloud.android.test.ui.actions.Actions;
import com.owncloud.android.test.ui.groups.FailingTestCategory;
import com.owncloud.android.test.ui.groups.InProgressCategory;
import com.owncloud.android.test.ui.groups.NoIgnoreTestCategory;
import com.owncloud.android.test.ui.groups.SmokeTestCategory;
import com.owncloud.android.test.ui.groups.UnfinishedTestCategory;
import com.owncloud.android.test.ui.models.FileDetailsView;
import com.owncloud.android.test.ui.models.ElementMenuOptions;
import com.owncloud.android.test.ui.models.GmailEmailListView;
import com.owncloud.android.test.ui.models.GmailEmailView;
import com.owncloud.android.test.ui.models.ImageView;
import com.owncloud.android.test.ui.models.FileListView;
import com.owncloud.android.test.ui.models.NotificationView;
import com.owncloud.android.test.ui.models.SettingsView;
import com.owncloud.android.test.ui.models.UploadView;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@Category({NoIgnoreTestCategory.class})
public class UploadTestSuite{
AndroidDriver driver;
Common common;
String FILE_NAME = Config.fileToTestName;
String BIG_FILE_NAME = Config.bigFileToTestName;
String FILE_GMAIL_NAME = Config.fileToTestSendByEmailName;
private Boolean fileHasBeenUploadedFromGmail = false;
private Boolean fileHasBeenUploaded = false;
@Rule public TestName name = new TestName();
@Before
public void setUp() throws Exception {
common=new Common();
driver=common.setUpCommonDriver();
}
@Test
@Category({NoIgnoreTestCategory.class, SmokeTestCategory.class})
public void testUploadFile () 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(FILE_NAME, fileListView, driver);
FileListView fileListViewAfterUploadFile = Actions
.uploadFile(FILE_NAME, fileListView);
fileListViewAfterUploadFile.scrollTillFindElement(FILE_NAME);
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(FILE_NAME);
assertTrue(
fileHasBeenUploaded = fileListView.getFileElement().isDisplayed());
}
@Test
@Category({UnfinishedTestCategory.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);
driver.openNotifications();
NotificationView notificationView = new NotificationView(driver);
try{
if(notificationView.getUploadingNotification().isDisplayed()){
Common.waitTillElementIsPresent(
notificationView.getUploadSucceededNotification(),300000);
driver.sendKeyEvent(android.view.KeyEvent.KEYCODE_HOME);
driver.startActivity("com.owncloud.android",
".ui.activity.FileDisplayActivity");
}
} catch (NoSuchElementException e) {
driver.sendKeyEvent(android.view.KeyEvent.KEYCODE_HOME);
driver.startActivity("com.owncloud.android",
".ui.activity.FileDisplayActivity");
}
fileListViewAfterUploadFile.scrollTillFindElement(BIG_FILE_NAME);
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());
}
@Test
@Category(UnfinishedTestCategory.class)
public void testUploadFromGmail () throws Exception {
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
driver.startActivity("com.google.android.gm",
".ConversationListActivityGmail");
GmailEmailListView gmailEmailListView = new GmailEmailListView(driver);
Thread.sleep(3000);
GmailEmailView gmailEmailView = gmailEmailListView.clickOnEmail();
ImageView imageView = gmailEmailView.clickOnfileButton();
imageView.clickOnOptionsButton();
imageView.clickOnShareButton();
imageView.clickOnOwnCloudButton();
//justonce button do not appear always
try{
imageView.clickOnJustOnceButton();
}catch (NoSuchElementException e) {
}
UploadView uploadView = new UploadView(driver);
uploadView.clickOUploadButton();
driver.sendKeyEvent(android.view.KeyEvent.KEYCODE_HOME);
driver.startActivity("com.owncloud.android",
".ui.activity.FileDisplayActivity");
common.wait.until(ExpectedConditions
.visibilityOfAllElementsLocatedBy(By.name(FILE_GMAIL_NAME)));
assertEquals(Config.fileToTestSendByEmailName ,
driver.findElementByName(FILE_GMAIL_NAME).getText());
fileListView = new FileListView(driver);
fileListView.scrollTillFindElement(FILE_GMAIL_NAME);
assertTrue(fileHasBeenUploadedFromGmail = fileListView
.getFileElement().isDisplayed());
//TODO. correct assert if fileListView is shown in grid mode
}
@Test
@Category({FailingTestCategory.class})
public void testKeepFileUpToDate () throws Exception {
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
Common.waitTillElementIsNotPresentWithoutTimeout(fileListView.getProgressCircular(),
1000);
FileListView fileListViewAfterUploadFile = Actions
.uploadFile(FILE_NAME, fileListView);
fileListViewAfterUploadFile.scrollTillFindElement(FILE_NAME);
assertTrue(fileHasBeenUploaded = fileListViewAfterUploadFile
.getFileElement().isDisplayed());
ElementMenuOptions menuOptions = fileListViewAfterUploadFile
.longPressOnElement(FILE_NAME);
FileDetailsView fileDetailsView = menuOptions.clickOnDetails();
fileDetailsView.checkKeepFileUpToDateCheckbox();
Thread.sleep(3000);
driver.sendKeyEvent(android.view.KeyEvent.KEYCODE_BACK);
assertTrue(common.isElementPresent(
fileListViewAfterUploadFile.getFileElementLayout(),
MobileBy.id(FileListView.getFavoriteFileIndicator())));
assertTrue(fileListViewAfterUploadFile.getFileElementLayout()
.findElement(By.id(FileListView.getFavoriteFileIndicator()))
.isDisplayed());
}
@Test
@Category({NoIgnoreTestCategory.class})
public void testKeepFileUpToDateAndRefresh () throws Exception {
FileListView fileListView = Actions.login(Config.URL, Config.user,
Config.password, Config.isTrusted, driver);
common.assertIsInFileListView();
Common.waitTillElementIsNotPresentWithoutTimeout(fileListView.getProgressCircular(),
1000);
FileListView fileListViewAfterUploadFile = Actions
.uploadFile(FILE_NAME, fileListView);
fileListViewAfterUploadFile.scrollTillFindElement(FILE_NAME);
assertTrue(fileHasBeenUploaded = fileListViewAfterUploadFile
.getFileElement().isDisplayed());
ElementMenuOptions menuOptions = fileListViewAfterUploadFile
.longPressOnElement(FILE_NAME);
FileDetailsView fileDetailsView = menuOptions.clickOnDetails();
fileDetailsView.checkKeepFileUpToDateCheckbox();
Thread.sleep(3000);
driver.sendKeyEvent(android.view.KeyEvent.KEYCODE_BACK);
fileListViewAfterUploadFile.pulldownToRefresh();
//assertTrue(fileListView.getProgressCircular().isDisplayed());
Common.waitTillElementIsNotPresentWithoutTimeout(fileListView.getProgressCircular(),
100);
assertTrue(common.isElementPresent(
fileListViewAfterUploadFile.getFileElementLayout(),
MobileBy.id(FileListView.getFavoriteFileIndicator())));
assertTrue(fileListViewAfterUploadFile.getFileElementLayout()
.findElement(By.id(FileListView.getFavoriteFileIndicator()))
.isDisplayed());
}
@After
public void tearDown() throws Exception {
common.takeScreenShotOnFailed(name.getMethodName());
FileListView fileListView = new FileListView(driver);
if (fileHasBeenUploadedFromGmail) {
Actions.deleteElement(FILE_GMAIL_NAME,fileListView, driver);
}
if(fileHasBeenUploaded){
Actions.deleteElement(FILE_NAME,fileListView, driver);
Actions.deleteElement(BIG_FILE_NAME,fileListView, driver);
}
//driver.removeApp("com.owncloud.android");
driver.quit();
}
}
@@ -1,4 +0,0 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
+16 -13
View File
@@ -21,7 +21,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.hiya:jacoco-android:0.2'
classpath 'com.github.spotbugs.snom:spotbugs-gradle-plugin:5.0.4'
classpath 'com.github.spotbugs.snom:spotbugs-gradle-plugin:5.0.5'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.19.0"
classpath "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
@@ -64,11 +64,11 @@ ext {
daggerVersion = "2.40.5"
markwonVersion = "4.6.2"
prismVersion = "2.0.0"
androidLibraryVersion ="b729946dd1ea9c6672387551acb9e87c7eee6c15"
androidLibraryVersion ="c5f144ebab033789996dbfe4cd12c65175b6835f"
mockitoVersion = "4.2.0"
mockkVersion = "1.12.2"
powermockVersion = "2.0.9"
byteBuddyVersion = "1.12.6"
byteBuddyVersion = "1.12.7"
espressoVersion = "3.4.0"
workRuntime = "2.7.1"
fidoVersion = "4.1.0"
@@ -87,7 +87,7 @@ repositories {
// semantic versioning for version code
def versionMajor = 3
def versionMinor = 19
def versionMinor = 20
def versionPatch = 0
def versionBuild = 0 // 0-50=Alpha / 51-98=RC / 90-99=stable
@@ -173,8 +173,8 @@ android {
versionDev {
applicationId "com.nextcloud.android.beta"
dimension "default"
versionCode 20220108
versionName "20220108"
versionCode 20220125
versionName "20220125"
}
qa {
@@ -251,12 +251,12 @@ dependencies {
compileOnly 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2' // remove after entire switch to lib v2
implementation "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
implementation 'org.apache.jackrabbit:jackrabbit-webdav:2.13.1' // remove after entire switch to lib v2
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation 'org.apache.jackrabbit:jackrabbit-webdav:2.13.5' // remove after entire switch to lib v2
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'com.google.android.material:material:1.5.0'
implementation 'com.jakewharton:disklrucache:2.0.2'
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.webkit:webkit:1.4.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.3.3'
@@ -264,7 +264,7 @@ dependencies {
implementation "androidx.work:work-runtime:$workRuntime"
implementation "androidx.work:work-runtime-ktx:$workRuntime"
implementation "androidx.fragment:fragment-ktx:1.4.0"
implementation 'com.github.albfernandez:juniversalchardet:2.0.3' // need this version for Android <7
implementation 'com.github.albfernandez:juniversalchardet:2.3.2' // need this version for Android <7
compileOnly 'com.google.code.findbugs:annotations:3.0.1u2'
implementation 'commons-io:commons-io:2.11.0'
implementation 'org.greenrobot:eventbus:3.3.1'
@@ -274,7 +274,7 @@ dependencies {
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'com.afollestad:sectioned-recyclerview:0.5.0'
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.21'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.24'
implementation 'com.github.tobiaskaminsky:qrcodescanner:0.1.2.4' // 'com.github.blikoon:QRCodeScanner:0.1.2'
implementation 'com.google.android:flexbox:2.0.1'
implementation 'org.parceler:parceler-api:1.1.13'
@@ -317,7 +317,7 @@ dependencies {
implementation "io.noties:prism4j:$prismVersion"
kapt "io.noties:prism4j-bundler:$prismVersion"
implementation ('org.mnode.ical4j:ical4j:1.0.6') {
implementation ('org.mnode.ical4j:ical4j:1.0.8') {
['org.apache.commons','commons-logging'].each {
exclude group: "$it"
}
@@ -456,6 +456,9 @@ detekt {
shot {
showOnlyFailingTestsInReports = ciBuild
// CI environment renders some shadows slightly different from local VMs
// Add a 0.5% tolerance to account for that
tolerance = ciBuild ? 0.5: 0
}
jacoco {
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Loaded 100 of 278 files, more files were not shown because too many files have changed in this diff. Show more