Merge branch 'develop' into uploadWhenCharging

Conflicts:
	res/values-fr/strings.xml
	res/xml/preferences.xml
This commit is contained in:
masensio 2015-09-01 16:51:40 +02:00
commit efb3989ee6
1010 changed files with 34995 additions and 8307 deletions

12
.gitignore vendored
View file

@ -10,6 +10,8 @@
# generated files
bin/
build/
*.iml
gen/
target/
@ -30,5 +32,11 @@ oc_framework/proguard-project.txt
oc_framework-test-project/proguard-project.txt
tests/proguard-project.txt
# Should not be commited inside this repo:
actionbarsherlock/
# Android Studio and Gradle specific entries
.gradle
.idea
*.iml
build
# Actionbarsherlock is now ignored since scripts takes care of init the sub-modules.
actionbarsherlock

9
.gitmodules vendored
View file

@ -1,6 +1,9 @@
[submodule "actionbarsherlock"]
path = actionbarsherlock
url = git://github.com/JakeWharton/ActionBarSherlock.git
[submodule "owncloud-android-library"]
path = owncloud-android-library
url = git://github.com/owncloud/android-library.git
branch = master
[submodule "ocdoc"]
path = user_manual/ocdoc
url = https://github.com/owncloud/documentation
branch = master

View file

@ -1,22 +1,12 @@
language: android
android:
components:
- build-tools-20.0.0
- android-19
- android-17
- android-14
- extra-android-support
licenses:
- 'android-sdk-license-5be876d5'
- 'android-sdk-license-598b93a6'
jdk: oraclejdk7
- build-tools-22.0.1
- android-22
before_install:
- rm pom.xml
- ./setup_env.sh
script:
- ./setup_env.sh ant
- ant clean
- ant debug

View file

@ -3,7 +3,7 @@
ownCloud Android client application
Copyright (C) 2012 Bartek Przybylski
Copyright (C) 2012-2014 ownCloud Inc.
Copyright (C) 2012-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,
@ -18,8 +18,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<manifest package="com.owncloud.android"
android:versionCode="10600100"
android:versionName="1.6.1" xmlns:android="http://schemas.android.com/apk/res/android">
android:versionCode="10700200"
android:versionName="1.7.2" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
@ -32,13 +32,12 @@
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
android:minSdkVersion="14"
android:targetSdkVersion="22" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" >
</uses-permission>
@ -86,11 +85,9 @@
android:name=".ui.activity.Preferences"
android:theme="@style/Theme.ownCloud" >
</activity>
<activity android:name=".ui.activity.PreferencesNewSessionewSession" >
</activity>
<activity
android:name=".ui.preview.PreviewImageActivity"
android:name=".ui.preview.PreviewImageActivity"
android:theme="@style/Theme.ownCloud.Overlay"
/>
<activity
@ -136,7 +133,7 @@
<activity
android:name=".authentication.AuthenticatorActivity"
android:exported="true"
android:theme="@style/Theme.ownCloud.noActionBar"
android:theme="@style/Theme.ownCloud.noActionBar"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
@ -155,7 +152,7 @@
<service android:name=".files.services.FileUploader" />
<service android:name=".media.MediaService" />
<activity android:name=".ui.activity.PinCodeActivity" />
<activity android:name=".ui.activity.PassCodeActivity" />
<activity android:name=".ui.activity.ConflictsResolveActivity"/>
<activity android:name=".ui.activity.GenericExplanationActivity"/>
<activity android:name=".ui.activity.ErrorsWhileCopyingHandlerActivity"/>
@ -195,7 +192,11 @@
android:icon="@drawable/copy_link"/>
<activity
android:name=".ui.activity.MoveActivity"
android:name=".ui.activity.FolderPickerActivity"
android:label="@string/app_name"/>
<activity
android:name=".ui.activity.UploadPathActivity"
android:label="@string/app_name"/>
</application>

42
CHANGELOG.md Normal file
View file

@ -0,0 +1,42 @@
## 1.7.2 (July 2015)
- New navigation drawer
- Improved Passcode
- Automatic grid view just for folders full of images
- More characters allowed in file names
- Support for servers in same domain, different path
- Bugs fixed:
+ Frequent crashes in folder with several images
+ Sync error in servers with huge quota and external storage enable
+ Share by link error
+ Some other crashes and minor bugs
## 1.7.1 (April 2015)
- Share link even with password enforced by server
- Get the app ready for oc 8.1 servers
- Added option to create new folder in uploads from external apps
- Improved management of deleted users
- Bugs fixed
+ Fixed crash on Android 2.x devices
+ Improvements on uploads
## 1.7.0 (February 2015)
- Download full folders
- Grid view for images
- Remote thumbnails (OC Server 8.0+)
- Added number of files and folders at the end of the list
- "Open with" in contextual menu
- Downloads added to Media Provider
- Uploads:
+ Local thumbnails in section "Files"
+ Multiple selection in "Content from other apps" (Android 4.3+)
- Gallery:
+ proper handling of EXIF
+ obey sorting in the list of files
- Settings view updated
- Improved subjects in e-mails
- Bugs fixed

View file

@ -27,13 +27,48 @@ Thanks for wanting to contribute source code to ownCloud. That's great!
Before we're able to merge your code into the ownCloud app for Android, you need to sign our [Contributor Agreement][agreement].
### Guidelines
* Contribute your code in the branch 'develop'. It will give us a better chance to test your code before merging it with stable code.
* For your first contribution, start a pull request on develop and send us the signed [Contributor Agreement][agreement].
* Contribute your code in the branch 'master'. It will give us a better chance to test your code before merging it with stable code.
* For your first contribution, start a pull request on master and send us the signed [Contributor Agreement][agreement].
* Keep on using pull requests for your next contributions although you own write permissions.
[agreement]: http://owncloud.org/about/contributor-agreement/
### 1. Fork and download android/master repository:
NOTE: You must have the git installation folder in your environment variable PATH to perform the next operations.
* In a web browser, go to https://github.com/owncloud/android, and click the 'Fork' button near the top right corner.
* In a command line prompt, clone your new repo: ```git clone git@github.com:YOURGITHUBNAME/android.git```.
* Move to the project folder with ```cd android```.
* Checkout the remote branch 'master' in your own local branch: ```git checkout -b master remotes/origin/master```.
* Pull any changes from your remote branch 'master': ```git pull origin master```
* Make official ownCloud repo known as upstream: ```git remote add upstream git@github.com:owncloud/android.git```
* Make sure to get the latest changes from official android/master branch: ```git pull upstream master```
### 7. Create pull request:
NOTE: You must sign the [Contributor Agreement][1] before your changes can be accepted!
* Commit your changes locally: "git commit -a"
* Push your changes to your GitHub repo: "git push"
* Browse to https://github.com/YOURGITHUBNAME/android/pulls and issue pull request
* Enter description and send pull request.
### 8. Create another pull request:
To make sure your new pull request does not contain commits which are already contained in previous PRs, create a new branch which is a clone of upstream/master.
* git fetch upstream
* git checkout -b my_new_master_branch upstream/master
* If you want to rename that branch later: "git checkout -b my_new_master_branch_with_new_name"
* Push branch to server: "git push -u origin name_of_local_master_branch"
* Use GitHub to issue PR
## Translations
Please submit translations via [Transifex][transifex].
[transifex]: https://www.transifex.com/projects/p/owncloud/

View file

@ -1,8 +1,20 @@
This is the Android client for [ownCloud][0].
#This is the Android client for [ownCloud][0]
The app performs file synchronization with an ownCloud server. Other ownCloud features may be added in the future, but they are not a priority right now.
## Build Status on
Git master: ![Build Status](https://api.travis-ci.org/owncloud/android.svg?branch=master)
Git stable: ![Build Status](https://api.travis-ci.org/owncloud/android.svg?branch=stable)
## Development
### Project Setup
Make sure you read [SETUP.md][1] when you start working on this project.
[0]: https://github.com/owncloud/core
[1]: https://raw.github.com/owncloud/android/master/SETUP.md
[1]: https://github.com/owncloud/android/blob/master/SETUP.md
### Contributing
Please see [Contribution Guidelines](https://owncloud.org/contribute/). Fork this repository and contribute back using
[pull requests](https://github.com/owncloud/android/pulls). All pull requests should be based on, and targeted to, the ['master'](https://github.com/owncloud/android/tree/master) branch.

210
SETUP.md
View file

@ -1,92 +1,160 @@
If you want to start help developing ownCloud please follow the [contribution guidelines][0] and observe these instructions.
If you have any problems, start again with 1) and work your way down. If something still does not work as described here, please open a new issue describing exactly what you did, what happened, and what should have happened.
### 1) Fork and download android/develop repository:
These instructions will help you to set up your development environment, get the source code of the ownCloud for Android app and build it by yourself. If you want to help developing the app take a look to the [contribution guidelines][0].
NOTE: Android SDK with platforms 8, 14 and 19 (and maybe others) need to be installed.
You must have the Android SDK 'tools/', and 'platforms-tools/' folders in your environment path variable.
"git" need to be installed and in your environment path variable.
Sections 1) and 2) are common for any environment. The rest of the sections describe how to set up a project in different tool environments. Choose the build tool or IDE you prefer and follow the instructions in its specific section. Nowadays we recommend to use Android Studio (section 2), but the decision is up to you.
* Navigate to https://github.com/owncloud/android, click fork.
* Clone your new repo: "git clone git@github.com:YOURGITHUBNAME/android.git"
* Move to the project folder with "cd android"
* Checkout remote develop branch: "git checkout -b develop remotes/origin/develop"
* Pull changes from your develop branch: "git pull origin develop"
* Make official ownCloud repo known as upstream: "git remote add upstream git@github.com:owncloud/android.git"
* Make sure to get the latest changes from official android/develop branch: "git pull upstream develop"
* Complete the setup of project properties and resolve pending dependencies running "setup_env.bat" or "./setup_env.sh" .
If you have any problem, remove the 'android' folder, start again from 1) and work your way down. If something still does not work as described here, please open a new issue describing exactly what you did, what happened, and what should have happened.
At this point you can continue using different tools to build the project. Sections 2a), 2b), and 2c) describe some of the existing alternatives.
### 2a) Building with Ant:
NOTE: You must have the Android SDK 'tools/', and 'platforms-tools/' folders in your environment path variable.
### 0. Common software dependencies.
* Run "ant clean" .
* Run "ant debug" to generate a debuggable version of the ownCloud app.
There are some tools needed, no matter what is your specific IDE or build tool of preference.
### 2b) Building with console/maven:
[git][1] is used to access to the different versions of the ownCloud's source code. Download and install the version appropiate for your operating system from [here][2]. Add the full path to the 'bin/' directory from your git installation into the PATH variable of your environment so that it can be used from any location.
The [Android SDK][3] is necessary to build the app. There are different options to install it in your system, depending of the IDE you decide to use. Check Google documentation about [installation][4] for more details on these options. After installing it, add the full path to the directories 'tools/' and 'platform-tools/' from your Android SDK installation into the PATH variable of your environment.
Open a terminal and type 'android' to start the Android SDK Manager. To build the ownCloud for Android app you will need to install at least the next SDK packages:
* Android SDK Tools and Android SDK Platform-tools (already installed); upgrade to their last versions is usually a good idea.
* Android SDK Build-Tools; any version from 20 or later should work fine; avoid preview versions, if any available.
* Android 4.4.2 (API 19), SDK Platform; needed for build/test ownCloud app.
* Android 5.1.1 (API 22), SDK Platform; needed to build the Android Support Library (not neeeded if working with Android Studio or gradle) and build the owncloud app.
Install any other package you consider interesting, such as emulators.
For other software dependencies check the details in the section corresponding to your preferred IDE or build system.
### 1. Fork and download the owncloud/android repository.
You will need [git][1] to access to the different versions of the ownCloud's source code. The source code is hosted in Github and may be read by anybody without needing a Github account. You will need a Github account if you want to contribute to the development of the app with your own code.
Next steps will assume you have a Github account and that you will get the code from your own fork.
* In a web browser, go to https://github.com/owncloud/android, and click the 'Fork' button near the top right corner.
* Open a terminal and go on with the next steps in it.
* Clone your forked repository: ```git clone git@github.com:YOURGITHUBNAME/android.git```.
* Move to the project folder with ```cd android```.
* Checkout the remote branch 'master' in your own local branch 'master': ```git checkout -b master remotes/origin/master```.
* Pull any changes from your remote branch 'master': ```git pull origin master```
* Make official ownCloud repo known as upstream: ```git remote add upstream git@github.com:owncloud/android.git```
* Make sure to get the latest changes from official android/master branch: ```git pull upstream master```
At this point you can continue using different tools to build the project. Section 2, 3, 4, 5 and 6 describe the existing alternatives.
### 2. Working with Android Studio.
[Android Studio][5] is currently the official Android IDE. Due to this, we recommend it as the IDE to use in your development environment. Follow the installation instructions [here][6].
We recommend to use the last version available in the stable channel of Android Studio updates. See what update channel is your Android Studio checking for updates in the menu path 'Help'/'Check for Update...'/link 'Updates' in the dialog.
To set up the project in Android Studio follow the next steps:
* Complete the setup of project properties running:
- Windows: ```setup_env.bat gradle```
- Mac OS/Linux: ```./setup_env.sh gradle```
* Open Android Studio and select 'Import Project (Eclipse ADT, Gradle, etc)'. Browse through your file system to the folder 'android' where the project is located. Android Studio will then create the '.iml' files it needs. If you ever close the project but the files are still there, you just select 'Open Project...'. The file chooser will show an Android face as the folder icon, which you can select to reopen the project.
* Android Studio will try to build the project directly after importing it. To build it manually, follow the menu path 'Build'/'Make Project', or just click the 'Play' button in the tool bar to build and run it in a mobile device or an emulator. The resulting APK file will be saved in the 'build/outputs/apk/' subdirectory in the project folder.
### 3. Working in a terminal with Gradle:
[Gradle][7] is the build system used by Android Studio to manage the building operations on Android apps. You do not need to install Gradle in your system, and Google recommends not to do it, but instead trusting on the Graddle wrapper included in the project [8].
* Open a terminal and go to the 'android' directory that contains the repository.
* Complete the setup of project properties running:
- Windows: ```setup_env.bat gradle```
- Mac OS/Linux: ```./setup_env.sh gradle```
* Run the 'clean' and 'build' tasks using the Gradle wrapper provided
- Windows: ```gradlew.bat clean build```
- Mac OS/Linux: ```./gradlew clean build```
The first time the Gradle wrapper is called, the correct Gradle version will be downloaded automatically. An Internet connection is needed for it works.
The generated APK file is saved in android/build/outputs/apk as android-debug.apk
### 4. Building with Eclipse:
[Eclipse][9] is still an option to work with Android apps, although the [ADT Plugin][10] needed is not in active development anymore. Next steps have been tested in Eclipse Luna.
* Open a terminal and go to the 'android' directory that contains the repository.
* Resolve necessary dependencies running:
- Windows: ```setup_env.bat ant```
- Mac OS/Linux: ```./setup_env.sh ant```
* Open Eclipse and follow the menu path 'File'/'New'/'Project'
* Choose the option 'Android'/'Android Project from Existing Code' and click 'Next'
* Choose 'android/' folder as root
* Choose the projects with the next names under the 'New Project Name' column:
** owncloud-android
** android-support-appcompat-v7-exploded-aar
** owncloud-android-workaround-accounts (optional)
** ownCloud Android Library
** ownCloud Sample Client (optional)
** ownCloud Android library test project (optional)
** ownCloud Android library test cases (optional)
* Do not choose the project owncloud-android-tests; it's obsolete.
* Do not enable 'Copy projects into workspace'.
* Click the 'Finish' button.
* Wait for a while; if 'Build automatically' is enabled in Eclipse, some errors could appear during the creation of the projects, but all of them should finally disappear.
* If any error persists, clean and build manually the next projects in order:
** ownCloud Android Library
** android-support-appcompat-v7-exploded-aar
** owncloud-android
* If any error on those projects persists, check the project properties. In the 'Android' section, API Level should be
** ownCloud Android Library -> API level 19
** android-support-appcompat-v7-exploded-aa -> API level 22
** owncloud-android -> API level 22 ; in this project, two library projects should appear referred in the bottom of the dialog: libs\android-support-appcompat-v7-exploded-aar and owncloud-android-library. Add them if needed.
* After those actions you should be good to go. HAVE FUN!
### 5. Building in command line with Ant:
[Ant][10] can be used to build the ownCloud for Android app in a terminal. Be sure that the PATH variable in your environment contains the full path to the 'bin/' subdirectory in your Ant installation. Define also an ANDROID_HOME variable in your environment with the full path to your Android SDK (see section 1). Then follow the next steps:
* Open a terminal and go to the 'android' directory that contains the repository.
* Resolve necessary dependencies running:
- Windows: ```setup_env.bat ant```
- Mac OS/Linux: ```./setup_env.sh ant```
* Run ```ant clean```.
* Run ```ant debug``` to generate a debuggable version of the ownCloud app.
The resulting APKs will be saved in the 'bin/' subdirectory of the project.
### 6. Building in command line with maven:
** Currently these build instructions DO NOT WORK. There is no estimation time to fix it. Unless some volunteer contributor fixes this build option, and given that Maven is a minority option in Android environments, we will probably remove this option.
NOTE: You must have mvn (version >= 3.1.1) in your environment path. Current Android 'platforms-tools' need to be installed.
Download/install Android plugin for Maven, install owncloud-android-library, then build ownCloud with mvn:
Download/install Android plugin for Maven, then build ownCloud with mvn:
* Resolve necessary dependencies running:
- Windows: "setup_env.bat maven"
- Mac OS/Linux: "./setup_env.sh maven"
* cd ..
* git clone https://github.com/mosabua/maven-android-sdk-deployer.git
* cd maven-android-sdk-deployer
* mvn -pl com.simpligility.android.sdk-deployer:android-19 -am install
* mvn -pl com.simpligility.android.sdk-deployer:android-22 -am install
* cd ../android/owncloud-android-library
* mvn install
* cd ..
Now you can create ownCloud APK using "mvn package"
### 2c) Building with Eclipse:
NOTE: You must have the Android SDK 'tools/', and 'platforms-tools/' folders in your environment path variable.
* Complete the setup of project properties and resolve pending dependencies running "setup_env.bat" or "./setup_env.sh" .
* Open Eclipse and create new "Android Project from Existing Code". Choose android/actionbarsherlock/library as root.
* Clean project and compile.
* If any error appear, check the project properties; in the 'Android' section, API Level should be greater or equal than 14.
* If "error loading libz.so.1" appears, try "sudo apt-get install lib32z1"
* Make sure android/actionbarsherlock/library/bin/library.jar was created.
* Create a new "Android Project from Existing Code". Choose android/owncloud-android-library as root. (test and sample clients are not required.)
* Clean project and compile.
* If any error appear, check the project properties; in the 'Android' section, API Level should be 19 or greater.
* Make sure 'android/owncloud-android-library/bin/owncloud android library.jar' was created.
* Import ownCloud Android project.
* Clean project and compile.
* If any error appears, check the project properties of owncloud-android project; in the 'Android' section:
- API Level should be 19 or greater.
- Two library projects should appear referred in the bottom square: actionbarsherlock/library and owncloud-android-library. Add them if needed.
* After those actions you should be good to go. HAVE FUN!
NOTE: Even though API level is set to 19, APK also runs on older devices because in AndroidManifest.xml minSdkVersion is set to 8.
### 3) Create pull request:
NOTE: You must sign the [Contributor Agreement][1] before your changes can be accepted!
* Commit your changes locally: "git commit -a"
* Push your changes to your Github repo: "git push"
* Browse to https://github.com/YOURGITHUBNAME/android/pulls and issue pull request
* Click "Edit" and set "base:develop"
* Again, click "Edit" and set "compare:develop"
* Enter description and send pull request.
### 4) Create another pull request:
To make sure your new pull request does not contain commits which are already contained in previous PRs, create a new branch which is a clone of upstream/develop.
* git fetch upstream
* git checkout -b my_new_develop_branch upstream/develop
* If you want to rename that branch later: "git checkout -b my_new_develop_branch_with_new_name"
* Push branch to server: "git push -u origin name_of_local_develop_branch"
* Use Github to issue PR
Now you can create ownCloud APK using "mvn package" and find it as ownCloud.apk under the target
[0]: https://github.com/owncloud/android/blob/master/CONTRIBUTING.md
[1]: http://owncloud.org/about/contributor-agreement/
[1]: https://git-scm.com/
[2]: https://git-scm.com/downloads
[3]: https://developer.android.com/sdk/index.html
[4]: https://developer.android.com/sdk/installing/index.html
[5]: https://developer.android.com/tools/studio/index.html
[6]: https://developer.android.com/sdk/installing/index.html?pkg=studio
[7]: https://gradle.org/
[8]: https://docs.gradle.org/current/userguide/gradle_wrapper.html
[9]: https://eclipse.org/
[10]: http://developer.android.com/sdk/installing/installing-adt.html

View file

@ -51,15 +51,6 @@ The third party software included and used by this project is:
Used as a helper tool, not included in the ownCloud client APK.
Original license document included at third_party/transifex-client/LICENSE.
See http://help.transifex.com/features/client/
* ActionBarSherlock, master branch.
Copyright (C) 2012 Jake Wharton.
Licensed under Apache License, Version 2.0.
The official repository is linked as a submodule in the
ownCloud/android repository.
A binary JAR file must be generated from this linked project
and included in the ownCloud client APK.
See http://http://actionbarsherlock.com/
* TouchImageView, commit 6dbeac4f11936185ba374c73144ac431c23c9aab
Copyright (c) 2012 Michael Ortiz

@ -1 +0,0 @@
Subproject commit 9598f2bb2ceed4a834cd5586a903f270ca4c0ccc

32
automationTest/.classpath Normal file
View file

@ -0,0 +1,32 @@
<?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
automationTest/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
target/
ScreenShots/
.DS_Store
Users/

23
automationTest/.project Normal file
View file

@ -0,0 +1,23 @@
<?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>

View file

@ -0,0 +1,12 @@
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

View file

@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

20
automationTest/README.md Normal file
View file

@ -0,0 +1,20 @@
** 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 appropiate 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 appropiate plug-ins, and run from it.
[0]: http://appium.io/slate/en/master/?java#about-appium

78
automationTest/pom.xml Normal file
View file

@ -0,0 +1,78 @@
<?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.11</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.3.1</version>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

4
automationTest/resources/.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

View file

@ -0,0 +1,244 @@
/**
* 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;
}
}

View file

@ -0,0 +1,22 @@
/**
* 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 {}

View file

@ -0,0 +1,138 @@
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;
}
}

View file

@ -0,0 +1,24 @@
/**
* 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 {}

View file

@ -0,0 +1,5 @@
package com.owncloud.android.test.ui.groups;
public interface InProgressCategory extends IgnoreTestCategory{
}

View file

@ -0,0 +1,25 @@
/**
* 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 {
}

View file

@ -0,0 +1,23 @@
/**
* 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 {}

View file

@ -0,0 +1,141 @@
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;
}
}

View file

@ -0,0 +1,25 @@
/**
* 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 {
}

View file

@ -0,0 +1,25 @@
/**
* 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{
}

View file

@ -0,0 +1,49 @@
/**
* 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;
}
}

View file

@ -0,0 +1,94 @@
/**
* 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;
}
}

View file

@ -0,0 +1,61 @@
/**
* 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;
}
}

View file

@ -0,0 +1,211 @@
/**
* 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/favoriteIcon";
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);
}
}

View file

@ -0,0 +1,58 @@
/**
* 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;
}
}

View file

@ -0,0 +1,50 @@
/**
* 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;
}
}

View file

@ -0,0 +1,63 @@
/**
* 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);
}
}

View file

@ -0,0 +1,80 @@
/**
* 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();
}
}

View file

@ -0,0 +1,115 @@
/**
* 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;
}
}

View file

@ -0,0 +1,47 @@
/**
* 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;
}
}

View file

@ -0,0 +1,57 @@
/**
* 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);
}
}

View file

@ -0,0 +1,58 @@
/**
* 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;
}
}

View file

@ -0,0 +1,54 @@
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);
}
}

View file

@ -0,0 +1,60 @@
/**
* 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);
}
}

View file

@ -0,0 +1,71 @@
/**
* 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;
}
}

View file

@ -0,0 +1,46 @@
/**
* 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;
}
}

View file

@ -0,0 +1,101 @@
/**
* 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;
}
}

View file

@ -0,0 +1,48 @@
/**
* 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;
}
}

View file

@ -0,0 +1,67 @@
/**
* 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();
}
}

View file

@ -0,0 +1,46 @@
/**
* 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();
}
}

View file

@ -0,0 +1,44 @@
/**
* 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;
}
}

View file

@ -0,0 +1 @@
Config.java

View file

@ -0,0 +1,203 @@
/**
* 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\")")));
}
}

View file

@ -0,0 +1,54 @@
/**
* 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";
}

View file

@ -0,0 +1,94 @@
/**
* 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();
}
}

View file

@ -0,0 +1,87 @@
/**
* 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();
}
}

View file

@ -0,0 +1,92 @@
/**
* 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();
}
}

View file

@ -0,0 +1,181 @@
/**
* 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();
}
}

View file

@ -0,0 +1,77 @@
/**
* 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();
}
}

View file

@ -0,0 +1,120 @@
/**
* 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();
}
}

View file

@ -0,0 +1,122 @@
/**
* 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();
}
}

View file

@ -0,0 +1,98 @@
/**
* 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();
}
}

View file

@ -0,0 +1,77 @@
/**
* 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();
}
}

View file

@ -0,0 +1,114 @@
/**
* 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();
}
}

View file

@ -0,0 +1,112 @@
/**
* 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();
}
}

View file

@ -0,0 +1,44 @@
/**
* 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 {
}

View file

@ -0,0 +1,19 @@
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 {
}

View file

@ -0,0 +1,42 @@
/**
* 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 {
}

View file

@ -0,0 +1,42 @@
/**
* 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 {
}

View file

@ -0,0 +1,133 @@
/**
* 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();
}
}

View file

@ -0,0 +1,285 @@
/**
* 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();
}
}

View file

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

76
build.gradle Normal file
View file

@ -0,0 +1,76 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
}
}
apply plugin: 'com.android.application'
repositories {
mavenCentral()
flatDir {
dirs 'libs'
}
}
dependencies {
compile name: 'touch-image-view'
compile 'com.android.support:support-v4:22.2.1'
compile project(':owncloud-android-library')
compile 'com.jakewharton:disklrucache:2.0.2'
compile 'com.android.support:appcompat-v7:22.2.1'
}
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['res']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
android {
lintOptions {
abortOnError false
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
productFlavors {
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
}
}

Binary file not shown.

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View file

@ -0,0 +1,6 @@
#Sun Jan 18 17:01:43 CET 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip

164
gradlew vendored Executable file
View file

@ -0,0 +1,164 @@
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

90
gradlew.bat vendored Normal file
View file

@ -0,0 +1,90 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>

View file

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>android-support-v7-appcompat</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="android.support.v7.appcompat">
<uses-sdk android:minSdkVersion="7"/>
<application />
</manifest>

View file

@ -0,0 +1,582 @@
int anim abc_fade_in 0x7f040000
int anim abc_fade_out 0x7f040001
int anim abc_slide_in_bottom 0x7f040002
int anim abc_slide_in_top 0x7f040003
int anim abc_slide_out_bottom 0x7f040004
int anim abc_slide_out_top 0x7f040005
int attr actionBarDivider 0x7f010000
int attr actionBarItemBackground 0x7f010001
int attr actionBarSize 0x7f010002
int attr actionBarSplitStyle 0x7f010003
int attr actionBarStyle 0x7f010004
int attr actionBarTabBarStyle 0x7f010005
int attr actionBarTabStyle 0x7f010006
int attr actionBarTabTextStyle 0x7f010007
int attr actionBarWidgetTheme 0x7f010008
int attr actionButtonStyle 0x7f010009
int attr actionDropDownStyle 0x7f010066
int attr actionLayout 0x7f01005d
int attr actionMenuTextAppearance 0x7f01000a
int attr actionMenuTextColor 0x7f01000b
int attr actionModeBackground 0x7f01000c
int attr actionModeCloseButtonStyle 0x7f01000d
int attr actionModeCloseDrawable 0x7f01000e
int attr actionModeCopyDrawable 0x7f01000f
int attr actionModeCutDrawable 0x7f010010
int attr actionModeFindDrawable 0x7f010011
int attr actionModePasteDrawable 0x7f010012
int attr actionModePopupWindowStyle 0x7f010013
int attr actionModeSelectAllDrawable 0x7f010014
int attr actionModeShareDrawable 0x7f010015
int attr actionModeSplitBackground 0x7f010016
int attr actionModeStyle 0x7f010017
int attr actionModeWebSearchDrawable 0x7f010018
int attr actionOverflowButtonStyle 0x7f010019
int attr actionProviderClass 0x7f01005f
int attr actionViewClass 0x7f01005e
int attr activityChooserViewStyle 0x7f01001a
int attr background 0x7f010047
int attr backgroundSplit 0x7f010049
int attr backgroundStacked 0x7f010048
int attr buttonBarButtonStyle 0x7f01001b
int attr buttonBarStyle 0x7f01001c
int attr customNavigationLayout 0x7f01004a
int attr disableChildrenWhenDisabled 0x7f010065
int attr displayOptions 0x7f010040
int attr divider 0x7f010046
int attr dividerHorizontal 0x7f01001d
int attr dividerPadding 0x7f01005b
int attr dividerVertical 0x7f01001e
int attr dropDownListViewStyle 0x7f01001f
int attr dropdownListPreferredItemHeight 0x7f010067
int attr expandActivityOverflowButtonDrawable 0x7f010058
int attr height 0x7f010020
int attr homeAsUpIndicator 0x7f010021
int attr homeLayout 0x7f01004b
int attr icon 0x7f010044
int attr iconifiedByDefault 0x7f010060
int attr indeterminateProgressStyle 0x7f01004d
int attr initialActivityCount 0x7f010057
int attr isLightTheme 0x7f010022
int attr itemPadding 0x7f01004f
int attr listChoiceBackgroundIndicator 0x7f01006b
int attr listPopupWindowStyle 0x7f010023
int attr listPreferredItemHeight 0x7f010024
int attr listPreferredItemHeightLarge 0x7f010025
int attr listPreferredItemHeightSmall 0x7f010026
int attr listPreferredItemPaddingLeft 0x7f010027
int attr listPreferredItemPaddingRight 0x7f010028
int attr logo 0x7f010045
int attr navigationMode 0x7f01003f
int attr paddingEnd 0x7f01006d
int attr paddingStart 0x7f01006c
int attr panelMenuListTheme 0x7f01006a
int attr panelMenuListWidth 0x7f010069
int attr popupMenuStyle 0x7f010068
int attr popupPromptView 0x7f010064
int attr progressBarPadding 0x7f01004e
int attr progressBarStyle 0x7f01004c
int attr prompt 0x7f010062
int attr queryHint 0x7f010061
int attr searchDropdownBackground 0x7f010029
int attr searchResultListItemHeight 0x7f01002a
int attr searchViewAutoCompleteTextView 0x7f01002b
int attr searchViewCloseIcon 0x7f01002c
int attr searchViewEditQuery 0x7f01002d
int attr searchViewEditQueryBackground 0x7f01002e
int attr searchViewGoIcon 0x7f01002f
int attr searchViewSearchIcon 0x7f010030
int attr searchViewTextField 0x7f010031
int attr searchViewTextFieldRight 0x7f010032
int attr searchViewVoiceIcon 0x7f010033
int attr selectableItemBackground 0x7f010034
int attr showAsAction 0x7f01005c
int attr showDividers 0x7f01005a
int attr spinnerDropDownItemStyle 0x7f010035
int attr spinnerMode 0x7f010063
int attr spinnerStyle 0x7f010036
int attr subtitle 0x7f010041
int attr subtitleTextStyle 0x7f010043
int attr textAllCaps 0x7f010059
int attr textAppearanceLargePopupMenu 0x7f010037
int attr textAppearanceListItem 0x7f010038
int attr textAppearanceListItemSmall 0x7f010039
int attr textAppearanceSearchResultSubtitle 0x7f01003a
int attr textAppearanceSearchResultTitle 0x7f01003b
int attr textAppearanceSmallPopupMenu 0x7f01003c
int attr textColorSearchUrl 0x7f01003d
int attr title 0x7f01003e
int attr titleTextStyle 0x7f010042
int attr windowActionBar 0x7f010050
int attr windowActionBarOverlay 0x7f010051
int attr windowFixedHeightMajor 0x7f010056
int attr windowFixedHeightMinor 0x7f010054
int attr windowFixedWidthMajor 0x7f010053
int attr windowFixedWidthMinor 0x7f010055
int attr windowSplitActionBar 0x7f010052
int bool abc_action_bar_embed_tabs_pre_jb 0x7f050000
int bool abc_action_bar_expanded_action_views_exclusive 0x7f050001
int bool abc_config_actionMenuItemAllCaps 0x7f050002
int bool abc_config_allowActionMenuItemTextWithIcon 0x7f050003
int bool abc_config_showMenuShortcutsWhenKeyboardPresent 0x7f050004
int bool abc_split_action_bar_is_narrow 0x7f050005
int color abc_search_url_text_holo 0x7f060003
int color abc_search_url_text_normal 0x7f060000
int color abc_search_url_text_pressed 0x7f060001
int color abc_search_url_text_selected 0x7f060002
int dimen abc_action_bar_default_height 0x7f080000
int dimen abc_action_bar_icon_vertical_padding 0x7f080001
int dimen abc_action_bar_progress_bar_size 0x7f080002
int dimen abc_action_bar_stacked_max_height 0x7f080003
int dimen abc_action_bar_stacked_tab_max_width 0x7f080004
int dimen abc_action_bar_subtitle_bottom_margin 0x7f080005
int dimen abc_action_bar_subtitle_text_size 0x7f080006
int dimen abc_action_bar_subtitle_top_margin 0x7f080007
int dimen abc_action_bar_title_text_size 0x7f080008
int dimen abc_action_button_min_width 0x7f080009
int dimen abc_config_prefDialogWidth 0x7f08000a
int dimen abc_dropdownitem_icon_width 0x7f08000b
int dimen abc_dropdownitem_text_padding_left 0x7f08000c
int dimen abc_dropdownitem_text_padding_right 0x7f08000d
int dimen abc_panel_menu_list_width 0x7f08000e
int dimen abc_search_view_preferred_width 0x7f08000f
int dimen abc_search_view_text_min_width 0x7f080010
int dimen dialog_fixed_height_major 0x7f080011
int dimen dialog_fixed_height_minor 0x7f080012
int dimen dialog_fixed_width_major 0x7f080013
int dimen dialog_fixed_width_minor 0x7f080014
int drawable abc_ab_bottom_solid_dark_holo 0x7f020000
int drawable abc_ab_bottom_solid_light_holo 0x7f020001
int drawable abc_ab_bottom_transparent_dark_holo 0x7f020002
int drawable abc_ab_bottom_transparent_light_holo 0x7f020003
int drawable abc_ab_share_pack_holo_dark 0x7f020004
int drawable abc_ab_share_pack_holo_light 0x7f020005
int drawable abc_ab_solid_dark_holo 0x7f020006
int drawable abc_ab_solid_light_holo 0x7f020007
int drawable abc_ab_stacked_solid_dark_holo 0x7f020008
int drawable abc_ab_stacked_solid_light_holo 0x7f020009
int drawable abc_ab_stacked_transparent_dark_holo 0x7f02000a
int drawable abc_ab_stacked_transparent_light_holo 0x7f02000b
int drawable abc_ab_transparent_dark_holo 0x7f02000c
int drawable abc_ab_transparent_light_holo 0x7f02000d
int drawable abc_cab_background_bottom_holo_dark 0x7f02000e
int drawable abc_cab_background_bottom_holo_light 0x7f02000f
int drawable abc_cab_background_top_holo_dark 0x7f020010
int drawable abc_cab_background_top_holo_light 0x7f020011
int drawable abc_ic_ab_back_holo_dark 0x7f020012
int drawable abc_ic_ab_back_holo_light 0x7f020013
int drawable abc_ic_cab_done_holo_dark 0x7f020014
int drawable abc_ic_cab_done_holo_light 0x7f020015
int drawable abc_ic_clear 0x7f020016
int drawable abc_ic_clear_disabled 0x7f020017
int drawable abc_ic_clear_holo_light 0x7f020018
int drawable abc_ic_clear_normal 0x7f020019
int drawable abc_ic_clear_search_api_disabled_holo_light 0x7f02001a
int drawable abc_ic_clear_search_api_holo_light 0x7f02001b
int drawable abc_ic_commit_search_api_holo_dark 0x7f02001c
int drawable abc_ic_commit_search_api_holo_light 0x7f02001d
int drawable abc_ic_go 0x7f02001e
int drawable abc_ic_go_search_api_holo_light 0x7f02001f
int drawable abc_ic_menu_moreoverflow_normal_holo_dark 0x7f020020
int drawable abc_ic_menu_moreoverflow_normal_holo_light 0x7f020021
int drawable abc_ic_menu_share_holo_dark 0x7f020022
int drawable abc_ic_menu_share_holo_light 0x7f020023
int drawable abc_ic_search 0x7f020024
int drawable abc_ic_search_api_holo_light 0x7f020025
int drawable abc_ic_voice_search 0x7f020026
int drawable abc_ic_voice_search_api_holo_light 0x7f020027
int drawable abc_item_background_holo_dark 0x7f020028
int drawable abc_item_background_holo_light 0x7f020029
int drawable abc_list_divider_holo_dark 0x7f02002a
int drawable abc_list_divider_holo_light 0x7f02002b
int drawable abc_list_focused_holo 0x7f02002c
int drawable abc_list_longpressed_holo 0x7f02002d
int drawable abc_list_pressed_holo_dark 0x7f02002e
int drawable abc_list_pressed_holo_light 0x7f02002f
int drawable abc_list_selector_background_transition_holo_dark 0x7f020030
int drawable abc_list_selector_background_transition_holo_light 0x7f020031
int drawable abc_list_selector_disabled_holo_dark 0x7f020032
int drawable abc_list_selector_disabled_holo_light 0x7f020033
int drawable abc_list_selector_holo_dark 0x7f020034
int drawable abc_list_selector_holo_light 0x7f020035
int drawable abc_menu_dropdown_panel_holo_dark 0x7f020036
int drawable abc_menu_dropdown_panel_holo_light 0x7f020037
int drawable abc_menu_hardkey_panel_holo_dark 0x7f020038
int drawable abc_menu_hardkey_panel_holo_light 0x7f020039
int drawable abc_search_dropdown_dark 0x7f02003a
int drawable abc_search_dropdown_light 0x7f02003b
int drawable abc_spinner_ab_default_holo_dark 0x7f02003c
int drawable abc_spinner_ab_default_holo_light 0x7f02003d
int drawable abc_spinner_ab_disabled_holo_dark 0x7f02003e
int drawable abc_spinner_ab_disabled_holo_light 0x7f02003f
int drawable abc_spinner_ab_focused_holo_dark 0x7f020040
int drawable abc_spinner_ab_focused_holo_light 0x7f020041
int drawable abc_spinner_ab_holo_dark 0x7f020042
int drawable abc_spinner_ab_holo_light 0x7f020043
int drawable abc_spinner_ab_pressed_holo_dark 0x7f020044
int drawable abc_spinner_ab_pressed_holo_light 0x7f020045
int drawable abc_tab_indicator_ab_holo 0x7f020046
int drawable abc_tab_selected_focused_holo 0x7f020047
int drawable abc_tab_selected_holo 0x7f020048
int drawable abc_tab_selected_pressed_holo 0x7f020049
int drawable abc_tab_unselected_pressed_holo 0x7f02004a
int drawable abc_textfield_search_default_holo_dark 0x7f02004b
int drawable abc_textfield_search_default_holo_light 0x7f02004c
int drawable abc_textfield_search_right_default_holo_dark 0x7f02004d
int drawable abc_textfield_search_right_default_holo_light 0x7f02004e
int drawable abc_textfield_search_right_selected_holo_dark 0x7f02004f
int drawable abc_textfield_search_right_selected_holo_light 0x7f020050
int drawable abc_textfield_search_selected_holo_dark 0x7f020051
int drawable abc_textfield_search_selected_holo_light 0x7f020052
int drawable abc_textfield_searchview_holo_dark 0x7f020053
int drawable abc_textfield_searchview_holo_light 0x7f020054
int drawable abc_textfield_searchview_right_holo_dark 0x7f020055
int drawable abc_textfield_searchview_right_holo_light 0x7f020056
int id action_bar 0x7f07001c
int id action_bar_activity_content 0x7f070014
int id action_bar_container 0x7f07001b
int id action_bar_overlay_layout 0x7f07001f
int id action_bar_root 0x7f07001a
int id action_bar_subtitle 0x7f070023
int id action_bar_title 0x7f070022
int id action_context_bar 0x7f07001d
int id action_menu_divider 0x7f070015
int id action_menu_presenter 0x7f070016
int id action_mode_close_button 0x7f070024
int id activity_chooser_view_content 0x7f070025
int id always 0x7f07000f
int id beginning 0x7f07000a
int id checkbox 0x7f07002d
int id collapseActionView 0x7f070011
int id default_activity_button 0x7f070028
int id dialog 0x7f070012
int id disableHome 0x7f070008
int id dropdown 0x7f070013
int id edit_query 0x7f070030
int id end 0x7f07000c
int id expand_activities_button 0x7f070026
int id expanded_menu 0x7f07002c
int id home 0x7f070017
int id homeAsUp 0x7f070005
int id icon 0x7f07002a
int id ifRoom 0x7f07000e
int id image 0x7f070027
int id listMode 0x7f070001
int id list_item 0x7f070029
int id middle 0x7f07000b
int id never 0x7f07000d
int id none 0x7f070009
int id normal 0x7f070000
int id progress_circular 0x7f070018
int id progress_horizontal 0x7f070019
int id radio 0x7f07002f
int id search_badge 0x7f070032
int id search_bar 0x7f070031
int id search_button 0x7f070033
int id search_close_btn 0x7f070038
int id search_edit_frame 0x7f070034
int id search_go_btn 0x7f07003a
int id search_mag_icon 0x7f070035
int id search_plate 0x7f070036
int id search_src_text 0x7f070037
int id search_voice_btn 0x7f07003b
int id shortcut 0x7f07002e
int id showCustom 0x7f070007
int id showHome 0x7f070004
int id showTitle 0x7f070006
int id split_action_bar 0x7f07001e
int id submit_area 0x7f070039
int id tabMode 0x7f070002
int id title 0x7f07002b
int id top_action_bar 0x7f070020
int id up 0x7f070021
int id useLogo 0x7f070003
int id withText 0x7f070010
int integer abc_max_action_buttons 0x7f090000
int layout abc_action_bar_decor 0x7f030000
int layout abc_action_bar_decor_include 0x7f030001
int layout abc_action_bar_decor_overlay 0x7f030002
int layout abc_action_bar_home 0x7f030003
int layout abc_action_bar_tab 0x7f030004
int layout abc_action_bar_tabbar 0x7f030005
int layout abc_action_bar_title_item 0x7f030006
int layout abc_action_bar_view_list_nav_layout 0x7f030007
int layout abc_action_menu_item_layout 0x7f030008
int layout abc_action_menu_layout 0x7f030009
int layout abc_action_mode_bar 0x7f03000a
int layout abc_action_mode_close_item 0x7f03000b
int layout abc_activity_chooser_view 0x7f03000c
int layout abc_activity_chooser_view_include 0x7f03000d
int layout abc_activity_chooser_view_list_item 0x7f03000e
int layout abc_expanded_menu_layout 0x7f03000f
int layout abc_list_menu_item_checkbox 0x7f030010
int layout abc_list_menu_item_icon 0x7f030011
int layout abc_list_menu_item_layout 0x7f030012
int layout abc_list_menu_item_radio 0x7f030013
int layout abc_popup_menu_item_layout 0x7f030014
int layout abc_search_dropdown_item_icons_2line 0x7f030015
int layout abc_search_view 0x7f030016
int layout abc_simple_decor 0x7f030017
int layout support_simple_spinner_dropdown_item 0x7f030018
int string abc_action_bar_home_description 0x7f0a0000
int string abc_action_bar_up_description 0x7f0a0001
int string abc_action_menu_overflow_description 0x7f0a0002
int string abc_action_mode_done 0x7f0a0003
int string abc_activity_chooser_view_see_all 0x7f0a0004
int string abc_activitychooserview_choose_application 0x7f0a0005
int string abc_searchview_description_clear 0x7f0a0006
int string abc_searchview_description_query 0x7f0a0007
int string abc_searchview_description_search 0x7f0a0008
int string abc_searchview_description_submit 0x7f0a0009
int string abc_searchview_description_voice 0x7f0a000a
int string abc_shareactionprovider_share_with 0x7f0a000b
int string abc_shareactionprovider_share_with_application 0x7f0a000c
int style TextAppearance_AppCompat_Base_CompactMenu_Dialog 0x7f0b0000
int style TextAppearance_AppCompat_Base_SearchResult 0x7f0b0001
int style TextAppearance_AppCompat_Base_SearchResult_Subtitle 0x7f0b0002
int style TextAppearance_AppCompat_Base_SearchResult_Title 0x7f0b0003
int style TextAppearance_AppCompat_Base_Widget_PopupMenu_Large 0x7f0b0004
int style TextAppearance_AppCompat_Base_Widget_PopupMenu_Small 0x7f0b0005
int style TextAppearance_AppCompat_Light_Base_SearchResult 0x7f0b0006
int style TextAppearance_AppCompat_Light_Base_SearchResult_Subtitle 0x7f0b0007
int style TextAppearance_AppCompat_Light_Base_SearchResult_Title 0x7f0b0008
int style TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Large 0x7f0b0009
int style TextAppearance_AppCompat_Light_Base_Widget_PopupMenu_Small 0x7f0b000a
int style TextAppearance_AppCompat_Light_SearchResult_Subtitle 0x7f0b000b
int style TextAppearance_AppCompat_Light_SearchResult_Title 0x7f0b000c
int style TextAppearance_AppCompat_Light_Widget_PopupMenu_Large 0x7f0b000d
int style TextAppearance_AppCompat_Light_Widget_PopupMenu_Small 0x7f0b000e
int style TextAppearance_AppCompat_SearchResult_Subtitle 0x7f0b000f
int style TextAppearance_AppCompat_SearchResult_Title 0x7f0b0010
int style TextAppearance_AppCompat_Widget_ActionBar_Menu 0x7f0b0011
int style TextAppearance_AppCompat_Widget_ActionBar_Subtitle 0x7f0b0012
int style TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse 0x7f0b0013
int style TextAppearance_AppCompat_Widget_ActionBar_Title 0x7f0b0014
int style TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse 0x7f0b0015
int style TextAppearance_AppCompat_Widget_ActionMode_Subtitle 0x7f0b0016
int style TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse 0x7f0b0017
int style TextAppearance_AppCompat_Widget_ActionMode_Title 0x7f0b0018
int style TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse 0x7f0b0019
int style TextAppearance_AppCompat_Widget_Base_ActionBar_Menu 0x7f0b001a
int style TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle 0x7f0b001b
int style TextAppearance_AppCompat_Widget_Base_ActionBar_Subtitle_Inverse 0x7f0b001c
int style TextAppearance_AppCompat_Widget_Base_ActionBar_Title 0x7f0b001d
int style TextAppearance_AppCompat_Widget_Base_ActionBar_Title_Inverse 0x7f0b001e
int style TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle 0x7f0b001f
int style TextAppearance_AppCompat_Widget_Base_ActionMode_Subtitle_Inverse 0x7f0b0020
int style TextAppearance_AppCompat_Widget_Base_ActionMode_Title 0x7f0b0021
int style TextAppearance_AppCompat_Widget_Base_ActionMode_Title_Inverse 0x7f0b0022
int style TextAppearance_AppCompat_Widget_Base_DropDownItem 0x7f0b0023
int style TextAppearance_AppCompat_Widget_DropDownItem 0x7f0b0024
int style TextAppearance_AppCompat_Widget_PopupMenu_Large 0x7f0b0025
int style TextAppearance_AppCompat_Widget_PopupMenu_Small 0x7f0b0026
int style TextAppearance_Widget_AppCompat_Base_ExpandedMenu_Item 0x7f0b0027
int style TextAppearance_Widget_AppCompat_ExpandedMenu_Item 0x7f0b0028
int style Theme_AppCompat 0x7f0b0029
int style Theme_AppCompat_Base_CompactMenu 0x7f0b002a
int style Theme_AppCompat_Base_CompactMenu_Dialog 0x7f0b002b
int style Theme_AppCompat_CompactMenu 0x7f0b002c
int style Theme_AppCompat_CompactMenu_Dialog 0x7f0b002d
int style Theme_AppCompat_DialogWhenLarge 0x7f0b002e
int style Theme_AppCompat_Light 0x7f0b002f
int style Theme_AppCompat_Light_DarkActionBar 0x7f0b0030
int style Theme_AppCompat_Light_DialogWhenLarge 0x7f0b0031
int style Theme_Base 0x7f0b0032
int style Theme_Base_AppCompat 0x7f0b0033
int style Theme_Base_AppCompat_Dialog_FixedSize 0x7f0b0034
int style Theme_Base_AppCompat_Dialog_Light_FixedSize 0x7f0b0035
int style Theme_Base_AppCompat_DialogWhenLarge 0x7f0b0036
int style Theme_Base_AppCompat_DialogWhenLarge_Base 0x7f0b0089
int style Theme_Base_AppCompat_Light 0x7f0b0037
int style Theme_Base_AppCompat_Light_DarkActionBar 0x7f0b0038
int style Theme_Base_AppCompat_Light_DialogWhenLarge 0x7f0b0039
int style Theme_Base_AppCompat_Light_DialogWhenLarge_Base 0x7f0b008a
int style Theme_Base_Light 0x7f0b003a
int style Widget_AppCompat_ActionBar 0x7f0b003b
int style Widget_AppCompat_ActionBar_Solid 0x7f0b003c
int style Widget_AppCompat_ActionBar_TabBar 0x7f0b003d
int style Widget_AppCompat_ActionBar_TabText 0x7f0b003e
int style Widget_AppCompat_ActionBar_TabView 0x7f0b003f
int style Widget_AppCompat_ActionButton 0x7f0b0040
int style Widget_AppCompat_ActionButton_CloseMode 0x7f0b0041
int style Widget_AppCompat_ActionButton_Overflow 0x7f0b0042
int style Widget_AppCompat_ActionMode 0x7f0b0043
int style Widget_AppCompat_ActivityChooserView 0x7f0b0044
int style Widget_AppCompat_AutoCompleteTextView 0x7f0b0045
int style Widget_AppCompat_Base_ActionBar 0x7f0b0046
int style Widget_AppCompat_Base_ActionBar_Solid 0x7f0b0047
int style Widget_AppCompat_Base_ActionBar_TabBar 0x7f0b0048
int style Widget_AppCompat_Base_ActionBar_TabText 0x7f0b0049
int style Widget_AppCompat_Base_ActionBar_TabView 0x7f0b004a
int style Widget_AppCompat_Base_ActionButton 0x7f0b004b
int style Widget_AppCompat_Base_ActionButton_CloseMode 0x7f0b004c
int style Widget_AppCompat_Base_ActionButton_Overflow 0x7f0b004d
int style Widget_AppCompat_Base_ActionMode 0x7f0b004e
int style Widget_AppCompat_Base_ActivityChooserView 0x7f0b004f
int style Widget_AppCompat_Base_AutoCompleteTextView 0x7f0b0050
int style Widget_AppCompat_Base_DropDownItem_Spinner 0x7f0b0051
int style Widget_AppCompat_Base_ListPopupWindow 0x7f0b0052
int style Widget_AppCompat_Base_ListView_DropDown 0x7f0b0053
int style Widget_AppCompat_Base_ListView_Menu 0x7f0b0054
int style Widget_AppCompat_Base_PopupMenu 0x7f0b0055
int style Widget_AppCompat_Base_ProgressBar 0x7f0b0056
int style Widget_AppCompat_Base_ProgressBar_Horizontal 0x7f0b0057
int style Widget_AppCompat_Base_Spinner 0x7f0b0058
int style Widget_AppCompat_DropDownItem_Spinner 0x7f0b0059
int style Widget_AppCompat_Light_ActionBar 0x7f0b005a
int style Widget_AppCompat_Light_ActionBar_Solid 0x7f0b005b
int style Widget_AppCompat_Light_ActionBar_Solid_Inverse 0x7f0b005c
int style Widget_AppCompat_Light_ActionBar_TabBar 0x7f0b005d
int style Widget_AppCompat_Light_ActionBar_TabBar_Inverse 0x7f0b005e
int style Widget_AppCompat_Light_ActionBar_TabText 0x7f0b005f
int style Widget_AppCompat_Light_ActionBar_TabText_Inverse 0x7f0b0060
int style Widget_AppCompat_Light_ActionBar_TabView 0x7f0b0061
int style Widget_AppCompat_Light_ActionBar_TabView_Inverse 0x7f0b0062
int style Widget_AppCompat_Light_ActionButton 0x7f0b0063
int style Widget_AppCompat_Light_ActionButton_CloseMode 0x7f0b0064
int style Widget_AppCompat_Light_ActionButton_Overflow 0x7f0b0065
int style Widget_AppCompat_Light_ActionMode_Inverse 0x7f0b0066
int style Widget_AppCompat_Light_ActivityChooserView 0x7f0b0067
int style Widget_AppCompat_Light_AutoCompleteTextView 0x7f0b0068
int style Widget_AppCompat_Light_Base_ActionBar 0x7f0b0069
int style Widget_AppCompat_Light_Base_ActionBar_Solid 0x7f0b006a
int style Widget_AppCompat_Light_Base_ActionBar_Solid_Inverse 0x7f0b006b
int style Widget_AppCompat_Light_Base_ActionBar_TabBar 0x7f0b006c
int style Widget_AppCompat_Light_Base_ActionBar_TabBar_Inverse 0x7f0b006d
int style Widget_AppCompat_Light_Base_ActionBar_TabText 0x7f0b006e
int style Widget_AppCompat_Light_Base_ActionBar_TabText_Inverse 0x7f0b006f
int style Widget_AppCompat_Light_Base_ActionBar_TabView 0x7f0b0070
int style Widget_AppCompat_Light_Base_ActionBar_TabView_Inverse 0x7f0b0071
int style Widget_AppCompat_Light_Base_ActionButton 0x7f0b0072
int style Widget_AppCompat_Light_Base_ActionButton_CloseMode 0x7f0b0073
int style Widget_AppCompat_Light_Base_ActionButton_Overflow 0x7f0b0074
int style Widget_AppCompat_Light_Base_ActionMode_Inverse 0x7f0b0075
int style Widget_AppCompat_Light_Base_ActivityChooserView 0x7f0b0076
int style Widget_AppCompat_Light_Base_AutoCompleteTextView 0x7f0b0077
int style Widget_AppCompat_Light_Base_DropDownItem_Spinner 0x7f0b0078
int style Widget_AppCompat_Light_Base_ListPopupWindow 0x7f0b0079
int style Widget_AppCompat_Light_Base_ListView_DropDown 0x7f0b007a
int style Widget_AppCompat_Light_Base_PopupMenu 0x7f0b007b
int style Widget_AppCompat_Light_Base_Spinner 0x7f0b007c
int style Widget_AppCompat_Light_DropDownItem_Spinner 0x7f0b007d
int style Widget_AppCompat_Light_ListPopupWindow 0x7f0b007e
int style Widget_AppCompat_Light_ListView_DropDown 0x7f0b007f
int style Widget_AppCompat_Light_PopupMenu 0x7f0b0080
int style Widget_AppCompat_Light_Spinner_DropDown_ActionBar 0x7f0b0081
int style Widget_AppCompat_ListPopupWindow 0x7f0b0082
int style Widget_AppCompat_ListView_DropDown 0x7f0b0083
int style Widget_AppCompat_ListView_Menu 0x7f0b0084
int style Widget_AppCompat_PopupMenu 0x7f0b0085
int style Widget_AppCompat_ProgressBar 0x7f0b0086
int style Widget_AppCompat_ProgressBar_Horizontal 0x7f0b0087
int style Widget_AppCompat_Spinner_DropDown_ActionBar 0x7f0b0088
int[] styleable ActionBar { 0x7f010020, 0x7f01003e, 0x7f01003f, 0x7f010040, 0x7f010041, 0x7f010042, 0x7f010043, 0x7f010044, 0x7f010045, 0x7f010046, 0x7f010047, 0x7f010048, 0x7f010049, 0x7f01004a, 0x7f01004b, 0x7f01004c, 0x7f01004d, 0x7f01004e, 0x7f01004f }
int styleable ActionBar_background 10
int styleable ActionBar_backgroundSplit 12
int styleable ActionBar_backgroundStacked 11
int styleable ActionBar_customNavigationLayout 13
int styleable ActionBar_displayOptions 3
int styleable ActionBar_divider 9
int styleable ActionBar_height 0
int styleable ActionBar_homeLayout 14
int styleable ActionBar_icon 7
int styleable ActionBar_indeterminateProgressStyle 16
int styleable ActionBar_itemPadding 18
int styleable ActionBar_logo 8
int styleable ActionBar_navigationMode 2
int styleable ActionBar_progressBarPadding 17
int styleable ActionBar_progressBarStyle 15
int styleable ActionBar_subtitle 4
int styleable ActionBar_subtitleTextStyle 6
int styleable ActionBar_title 1
int styleable ActionBar_titleTextStyle 5
int[] styleable ActionBarLayout { 0x010100b3 }
int styleable ActionBarLayout_android_layout_gravity 0
int[] styleable ActionBarWindow { 0x7f010050, 0x7f010051, 0x7f010052, 0x7f010053, 0x7f010054, 0x7f010055, 0x7f010056 }
int styleable ActionBarWindow_windowActionBar 0
int styleable ActionBarWindow_windowActionBarOverlay 1
int styleable ActionBarWindow_windowFixedHeightMajor 6
int styleable ActionBarWindow_windowFixedHeightMinor 4
int styleable ActionBarWindow_windowFixedWidthMajor 3
int styleable ActionBarWindow_windowFixedWidthMinor 5
int styleable ActionBarWindow_windowSplitActionBar 2
int[] styleable ActionMenuItemView { 0x0101013f }
int styleable ActionMenuItemView_android_minWidth 0
int[] styleable ActionMenuView { }
int[] styleable ActionMode { 0x7f010020, 0x7f010042, 0x7f010043, 0x7f010047, 0x7f010049 }
int styleable ActionMode_background 3
int styleable ActionMode_backgroundSplit 4
int styleable ActionMode_height 0
int styleable ActionMode_subtitleTextStyle 2
int styleable ActionMode_titleTextStyle 1
int[] styleable ActivityChooserView { 0x7f010057, 0x7f010058 }
int styleable ActivityChooserView_expandActivityOverflowButtonDrawable 1
int styleable ActivityChooserView_initialActivityCount 0
int[] styleable CompatTextView { 0x7f010059 }
int styleable CompatTextView_textAllCaps 0
int[] styleable LinearLayoutICS { 0x7f010046, 0x7f01005a, 0x7f01005b }
int styleable LinearLayoutICS_divider 0
int styleable LinearLayoutICS_dividerPadding 2
int styleable LinearLayoutICS_showDividers 1
int[] styleable MenuGroup { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 }
int styleable MenuGroup_android_checkableBehavior 5
int styleable MenuGroup_android_enabled 0
int styleable MenuGroup_android_id 1
int styleable MenuGroup_android_menuCategory 3
int styleable MenuGroup_android_orderInCategory 4
int styleable MenuGroup_android_visible 2
int[] styleable MenuItem { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f01005c, 0x7f01005d, 0x7f01005e, 0x7f01005f }
int styleable MenuItem_actionLayout 14
int styleable MenuItem_actionProviderClass 16
int styleable MenuItem_actionViewClass 15
int styleable MenuItem_android_alphabeticShortcut 9
int styleable MenuItem_android_checkable 11
int styleable MenuItem_android_checked 3
int styleable MenuItem_android_enabled 1
int styleable MenuItem_android_icon 0
int styleable MenuItem_android_id 2
int styleable MenuItem_android_menuCategory 5
int styleable MenuItem_android_numericShortcut 10
int styleable MenuItem_android_onClick 12
int styleable MenuItem_android_orderInCategory 6
int styleable MenuItem_android_title 7
int styleable MenuItem_android_titleCondensed 8
int styleable MenuItem_android_visible 4
int styleable MenuItem_showAsAction 13
int[] styleable MenuView { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x01010435 }
int styleable MenuView_android_headerBackground 4
int styleable MenuView_android_horizontalDivider 2
int styleable MenuView_android_itemBackground 5
int styleable MenuView_android_itemIconDisabledAlpha 6
int styleable MenuView_android_itemTextAppearance 1
int styleable MenuView_android_preserveIconSpacing 7
int styleable MenuView_android_verticalDivider 3
int styleable MenuView_android_windowAnimationStyle 0
int[] styleable SearchView { 0x0101011f, 0x01010220, 0x01010264, 0x7f010060, 0x7f010061 }
int styleable SearchView_android_imeOptions 2
int styleable SearchView_android_inputType 1
int styleable SearchView_android_maxWidth 0
int styleable SearchView_iconifiedByDefault 3
int styleable SearchView_queryHint 4
int[] styleable Spinner { 0x010100af, 0x01010175, 0x01010176, 0x01010262, 0x010102ac, 0x010102ad, 0x7f010062, 0x7f010063, 0x7f010064, 0x7f010065 }
int styleable Spinner_android_dropDownHorizontalOffset 4
int styleable Spinner_android_dropDownSelector 1
int styleable Spinner_android_dropDownVerticalOffset 5
int styleable Spinner_android_dropDownWidth 3
int styleable Spinner_android_gravity 0
int styleable Spinner_android_popupBackground 2
int styleable Spinner_disableChildrenWhenDisabled 9
int styleable Spinner_popupPromptView 8
int styleable Spinner_prompt 6
int styleable Spinner_spinnerMode 7
int[] styleable Theme { 0x7f010066, 0x7f010067, 0x7f010068, 0x7f010069, 0x7f01006a, 0x7f01006b }
int styleable Theme_actionDropDownStyle 0
int styleable Theme_dropdownListPreferredItemHeight 1
int styleable Theme_listChoiceBackgroundIndicator 5
int styleable Theme_panelMenuListTheme 4
int styleable Theme_panelMenuListWidth 3
int styleable Theme_popupMenuStyle 2
int[] styleable View { 0x010100da, 0x7f01006c, 0x7f01006d }
int styleable View_android_focusable 0
int styleable View_paddingEnd 2
int styleable View_paddingStart 1

View file

@ -0,0 +1,10 @@
Library Project including compatibility ActionBar.
This can be used by an Android project to provide
access to ActionBar on applications running on API 7+.
There is technically no source, but the src folder is necessary
to ensure that the build system works. The content is actually
located in libs/android-support-v7-appcompat.jar.
The accompanying resources must also be included in the application.

View file

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="android-support-appcompat-v7-exploded-aar" default="help">
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
Version Control Systems. -->
<property file="local.properties" />
<!-- The ant.properties file can be created by you. It is only edited by the
'android' tool to add properties to it.
This is the place to change some Ant specific build properties.
Here are some properties you may want to change/update:
source.dir
The name of the source directory. Default is 'src'.
out.dir
The name of the output directory. Default is 'bin'.
For other overridable properties, look at the beginning of the rules
files in the SDK, at tools/ant/build.xml
Properties related to the SDK location or the project target should
be updated using the 'android' tool with the 'update' action.
This file is an integral part of the build system for your
application and should be checked into Version Control Systems.
-->
<property file="ant.properties" />
<!-- if sdk.dir was not set from one of the property file, then
get it from the ANDROID_HOME env var.
This must be done before we load project.properties since
the proguard config can use sdk.dir -->
<property environment="env" />
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
<isset property="env.ANDROID_HOME" />
</condition>
<!-- The project.properties file is created and updated by the 'android'
tool, as well as ADT.
This contains project specific properties such as project target, and library
dependencies. Lower level build properties are stored in ant.properties
(or in .classpath for Eclipse projects).
This file is an integral part of the build system for your
application and should be checked into Version Control Systems. -->
<loadproperties srcFile="project.properties" />
<!-- quick check on sdk.dir -->
<fail
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
unless="sdk.dir"
/>
<!--
Import per project custom build rules if present at the root of the project.
This is the place to put custom intermediary targets such as:
-pre-build
-pre-compile
-post-compile (This is typically used for code obfuscation.
Compiled code location: ${out.classes.absolute.dir}
If this is not done in place, override ${out.dex.input.absolute.dir})
-post-package
-post-build
-pre-clean
-->
<import file="custom_rules.xml" optional="true" />
<!-- Import the actual build file.
To customize existing targets, there are two options:
- Customize only one target:
- copy/paste the target into this file, *before* the
<import> task.
- customize it to your needs.
- Customize the whole content of build.xml
- copy/paste the content of the rules files (minus the top node)
into this file, replacing the <import> task.
- customize to your needs.
***********************
****** IMPORTANT ******
***********************
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
in order to avoid having your file be overridden by tools such as "android update project"
-->
<!-- version-tag: 1 -->
<import file="${sdk.dir}/tools/ant/build.xml" />
</project>

View file

@ -0,0 +1,15 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-22
android.library=true

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/decelerate_interpolator"
android:fromAlpha="0.0" android:toAlpha="1.0"
android:duration="@android:integer/config_mediumAnimTime" />

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/decelerate_interpolator"
android:fromAlpha="1.0" android:toAlpha="0.0"
android:duration="@android:integer/config_mediumAnimTime" />

View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/* //device/apps/common/res/anim/fade_in.xml
**
** Copyright 2014, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false">
<scale android:interpolator="@android:anim/decelerate_interpolator"
android:fromXScale="0.9" android:toXScale="1.0"
android:fromYScale="0.9" android:toYScale="1.0"
android:pivotX="50%" android:pivotY="100%"
android:duration="@integer/abc_config_activityDefaultDur" />
<alpha android:interpolator="@android:anim/decelerate_interpolator"
android:fromAlpha="0.0" android:toAlpha="1.0"
android:duration="@integer/abc_config_activityShortDur" />
</set>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false" >
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
android:interpolator="@android:anim/decelerate_interpolator"
android:duration="@integer/abc_config_activityShortDur" />
</set>

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false" >
<alpha android:fromAlpha="1.0" android:toAlpha="0.0"
android:interpolator="@android:anim/decelerate_interpolator"
android:duration="@integer/abc_config_activityShortDur" />
</set>

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2014 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false">
<scale android:interpolator="@android:anim/decelerate_interpolator"
android:fromXScale="1.0" android:toXScale="0.9"
android:fromYScale="1.0" android:toYScale="0.9"
android:pivotX="50%" android:pivotY="100%"
android:duration="@integer/abc_config_activityDefaultDur" />
<alpha android:interpolator="@android:anim/decelerate_interpolator"
android:fromAlpha="1.0" android:toAlpha="0.0"
android:duration="@integer/abc_config_activityShortDur" />
</set>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/decelerate_interpolator"
android:fromYDelta="50%p" android:toYDelta="0"
android:duration="@android:integer/config_mediumAnimTime"/>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/decelerate_interpolator"
android:fromYDelta="-50%p" android:toYDelta="0"
android:duration="@android:integer/config_mediumAnimTime"/>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator"
android:fromYDelta="0" android:toYDelta="50%p"
android:duration="@android:integer/config_mediumAnimTime"/>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<translate xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator"
android:fromYDelta="0" android:toYDelta="-50%p"
android:duration="@android:integer/config_mediumAnimTime"/>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_accelerated="false" android:color="@color/background_material_dark" />
<item android:color="@android:color/transparent" />
</selector>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_accelerated="false" android:color="@color/background_material_light" />
<item android:color="@android:color/transparent" />
</selector>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/background_material_dark" />
</selector>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/background_material_light" />
</selector>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="@color/bright_foreground_disabled_material_dark"/>
<item android:color="@color/bright_foreground_material_dark"/>
</selector>

Some files were not shown because too many files have changed in this diff Show more