From 494acdd099fe790f307227f4158fc9cd217a106c Mon Sep 17 00:00:00 2001 From: Anton Bevza Date: Fri, 2 Nov 2018 11:53:05 +0200 Subject: [PATCH 1/6] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a7fce39..a95e002 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Stfalcon Fixturer -Utility for developers and QAs what helps minimize time wasting on writing the same data for testing over and over again. +A Utility for developers and QAs which helps minimize time wasting on writing the same data for testing over and over again. You can write fixture in XML one time and use it for build testing. The library can autofill EditText with your fixture data. ### Who we are -Need iOS and Android apps, MVP development or prototyping? Contact us via info@stfalcon.com. We develop software since 2009, and we're known experts in this field. Check out our [portfolio](https://stfalcon.com/en/portfolio) and see more libraries from [stfalcon-studio](https://stfalcon-studio.github.io/). +Need iOS and Android apps, MVP development or prototyping? Contact us via info@stfalcon.com. We develop software since 2009, and we're known experts in this field. Check out our [portfolio](https://stfalcon.com/en/portfolio) and see more libraries from [stfalcon-studio](https://stfalcon.com/en/opensource). ### Download @@ -94,4 +94,4 @@ See the License for the specific language governing permissions and limitations under the License. ``` -[sample]: \ No newline at end of file +[sample]: From 25edc4bdbfc2e38333a9cfcff111c76076fd3371 Mon Sep 17 00:00:00 2001 From: Anton Bevza Date: Fri, 2 Nov 2018 11:53:43 +0200 Subject: [PATCH 2/6] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a95e002..90a71ce 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ Second - resource ID of you fixtures XML file. The default behaviour is Fixturer works only for debug builds. But if you want to change this behaviour you can pass Boolean flag as third parameter. After that you can bind your EditTexts to the fixtures in your activity(fragment) classes. + Kotlin: ```kotlin loginEmailEt.setFixtureTag("email") From 3f1d2434b92c22c2b792ff0268ceca3d74eae6f6 Mon Sep 17 00:00:00 2001 From: Anton Bevza Date: Fri, 2 Nov 2018 12:27:30 +0200 Subject: [PATCH 3/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 90a71ce..897b0ea 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ class SampleApplication : Application() { ``` First parameter it's your Application context. Second - resource ID of you fixtures XML file. -The default behaviour is Fixturer works only for debug builds. But if you want to change this behaviour you can pass Boolean flag as third parameter. +The default behavior is Fixturer works only for debug builds. But if you want to change this behavior you can pass Boolean flag as third parameter. After that you can bind your EditTexts to the fixtures in your activity(fragment) classes. From b833d5f525ac78bda936a963e65b0fcedced6c3a Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 19 Nov 2018 14:02:31 +0200 Subject: [PATCH 4/6] update sample layout --- README.md | 17 +- sample/src/main/AndroidManifest.xml | 30 ++-- sample/src/main/res/drawable/btn_rounded.xml | 12 ++ sample/src/main/res/drawable/circle.xml | 27 +++ sample/src/main/res/drawable/circles.xml | 45 +++++ sample/src/main/res/layout/activity_info.xml | 91 +++++++--- sample/src/main/res/layout/activity_login.xml | 158 +++++++++++++++--- sample/src/main/res/values/colors.xml | 18 +- sample/src/main/res/values/strings.xml | 2 + sample/src/main/res/values/styles.xml | 35 +++- 10 files changed, 358 insertions(+), 77 deletions(-) create mode 100644 sample/src/main/res/drawable/btn_rounded.xml create mode 100644 sample/src/main/res/drawable/circle.xml create mode 100644 sample/src/main/res/drawable/circles.xml diff --git a/README.md b/README.md index 897b0ea..8361db8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Stfalcon Fixturer -A Utility for developers and QAs which helps minimize time wasting on writing the same data for testing over and over again. +A Utility for developers and QAs which helps minimize time wasting on writing the same data for testing over and over again. You can write fixture in XML one time and use it for build testing. The library can autofill EditText with your fixture data. ### Who we are @@ -15,8 +15,8 @@ compile 'com.github.stfalcon:stfalcon-fixturer:0.1.0' ### Usage -Create xml file in raw directory of app resources. -Example: +Create xml file in raw directory of app resources. +Example: ```xml @@ -42,7 +42,7 @@ Example: ``` -All `fixture` require `tag` attribute. This tag will be used for binding input fields to fixture. +All `fixture` require `tag` attribute. This tag will be used for binding input fields to fixture. Also you can put some fixtures in groups. For example `email` and `password` can be marked as group `account`. This two fixtures must have the same item count. And in this case where we will select one fixture from group, it will automatically put data to all bound EditTexts to the same grouped fixtures. To initialize library you have to add this line to your Application `onCreate` method: @@ -55,13 +55,13 @@ class SampleApplication : Application() { } } ``` -First parameter it's your Application context. +First parameter it's your Application context. Second - resource ID of you fixtures XML file. The default behavior is Fixturer works only for debug builds. But if you want to change this behavior you can pass Boolean flag as third parameter. After that you can bind your EditTexts to the fixtures in your activity(fragment) classes. -Kotlin: +Kotlin: ```kotlin loginEmailEt.setFixtureTag("email") ``` @@ -73,11 +73,12 @@ Where `loginEmailEt` is EditText and "email" is tag of the fixture. Run your application and look on magic :) You can call fixtures dialog by triple tap on bound to fixture EditText. -![alt tag](https://i.imgur.com/KoeGW7E.gif) +![alt tag](https://i.imgur.com/IYbM8VI.gif) +![alt tag](https://i.imgur.com/c8rrdER.gif) Take a look at the [sample project](sample) for more information -### License +### License ``` Copyright 2018 stfalcon.com diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index 296f4de..5482bfe 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -1,24 +1,26 @@ + package="com.stfalcon.stfalconfixturer.sample"> - + android:name="com.stfalcon.stfalconfixturer.sample.SampleApplication" + android:allowBackup="true" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/AppTheme"> + - - - + + - - + \ No newline at end of file diff --git a/sample/src/main/res/drawable/btn_rounded.xml b/sample/src/main/res/drawable/btn_rounded.xml new file mode 100644 index 0000000..c483712 --- /dev/null +++ b/sample/src/main/res/drawable/btn_rounded.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/sample/src/main/res/drawable/circle.xml b/sample/src/main/res/drawable/circle.xml new file mode 100644 index 0000000..a8c36c0 --- /dev/null +++ b/sample/src/main/res/drawable/circle.xml @@ -0,0 +1,27 @@ + + + + + \ No newline at end of file diff --git a/sample/src/main/res/drawable/circles.xml b/sample/src/main/res/drawable/circles.xml new file mode 100644 index 0000000..2d02954 --- /dev/null +++ b/sample/src/main/res/drawable/circles.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sample/src/main/res/layout/activity_info.xml b/sample/src/main/res/layout/activity_info.xml index 4da6d0d..f385b37 100644 --- a/sample/src/main/res/layout/activity_info.xml +++ b/sample/src/main/res/layout/activity_info.xml @@ -1,38 +1,79 @@ - + + + android:layout_height="wrap_content" + android:orientation="vertical"> - + android:layout_height="200dp" + android:layout_margin="16dp"> - + android:layout_height="match_parent" + android:layout_margin="16dp" + android:gravity="center" + android:orientation="vertical"> + + + + + + + + + + - + - + + + + + + + android:layout_height="200dp" + android:layout_marginLeft="16dp" + android:layout_marginRight="16dp" + android:layout_marginBottom="16dp" /> - + - + + - \ No newline at end of file + \ No newline at end of file diff --git a/sample/src/main/res/layout/activity_login.xml b/sample/src/main/res/layout/activity_login.xml index 0050270..14cbb70 100644 --- a/sample/src/main/res/layout/activity_login.xml +++ b/sample/src/main/res/layout/activity_login.xml @@ -1,30 +1,142 @@ - + + + android:layout_height="280dp" + android:layout_margin="36dp" + android:elevation="4dp" + app:cardCornerRadius="12dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintTop_toTopOf="parent"> - + android:layout_height="match_parent" + android:padding="16dp"> - + + + + + + + + + + + + + + +