Khoren Markosyan
3 years ago
26 changed files with 305 additions and 55 deletions
@ -0,0 +1,48 @@
|
||||
package com.markosyan.zxscanner |
||||
|
||||
import androidx.test.ext.junit.rules.ActivityScenarioRule |
||||
import org.junit.* |
||||
import org.junit.runner.RunWith |
||||
import org.junit.runners.JUnit4 |
||||
import tools.fastlane.screengrab.Screengrab |
||||
import tools.fastlane.screengrab.UiAutomatorScreenshotStrategy |
||||
import tools.fastlane.screengrab.cleanstatusbar.BluetoothState |
||||
import tools.fastlane.screengrab.cleanstatusbar.CleanStatusBar |
||||
import tools.fastlane.screengrab.cleanstatusbar.MobileDataType |
||||
import tools.fastlane.screengrab.locale.LocaleTestRule |
||||
|
||||
|
||||
@RunWith(JUnit4::class) |
||||
class JUnit4StyleTests { |
||||
companion object { |
||||
@JvmStatic |
||||
@BeforeClass |
||||
fun beforeAll() { |
||||
Screengrab.setDefaultScreenshotStrategy(UiAutomatorScreenshotStrategy()) |
||||
CleanStatusBar() |
||||
.setMobileNetworkDataType(MobileDataType.LTE) |
||||
.setBluetoothState(BluetoothState.DISCONNECTED) |
||||
.enable() |
||||
} |
||||
|
||||
@JvmStatic |
||||
@AfterClass |
||||
fun afterAll() { |
||||
CleanStatusBar.disable() |
||||
} |
||||
} |
||||
|
||||
@get:Rule |
||||
var activityRule = ActivityScenarioRule(MainActivity::class.java) |
||||
|
||||
@Rule @JvmField |
||||
val localeTestRule = LocaleTestRule() |
||||
|
||||
@Test |
||||
fun testTakeScannerScreenshot() { |
||||
Thread.sleep(3000) |
||||
Screengrab.screenshot("01_scanner_screen") |
||||
Thread.sleep(3000) |
||||
Assert.assertTrue(true) |
||||
} |
||||
} |
@ -0,0 +1,11 @@
|
||||
package com.markosyan.zxscanner |
||||
|
||||
import org.junit.Assert |
||||
import org.junit.Test |
||||
|
||||
class ExampleTest { |
||||
@Test |
||||
fun addition_isCorrect() { |
||||
Assert.assertEquals(4, 2 + 2) |
||||
} |
||||
} |
@ -0,0 +1,2 @@
|
||||
json_key_file("fastlane/private/pc-api-8902372433309418312-948-1346a3d81bee.json") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one |
||||
package_name("com.markosyan.zxscanner") # e.g. com.krausefx.app |
@ -0,0 +1,52 @@
|
||||
# This file contains the fastlane.tools configuration |
||||
# You can find the documentation at https://docs.fastlane.tools |
||||
# |
||||
# For a list of all available actions, check out |
||||
# |
||||
# https://docs.fastlane.tools/actions |
||||
# |
||||
# For a list of all available plugins, check out |
||||
# |
||||
# https://docs.fastlane.tools/plugins/available-plugins |
||||
# |
||||
|
||||
# Uncomment the line if you want fastlane to automatically update itself |
||||
# update_fastlane |
||||
|
||||
default_platform(:android) |
||||
|
||||
platform :android do |
||||
desc "Runs all the tests" |
||||
lane :test do |
||||
gradle(task: "test") |
||||
end |
||||
|
||||
desc "Submit a new Beta Build to Crashlytics Beta" |
||||
lane :beta do |
||||
gradle(task: "clean assembleRelease") |
||||
crashlytics |
||||
|
||||
# sh "your_script.sh" |
||||
# You can also use other beta testing services here |
||||
end |
||||
|
||||
desc "Deploy a new version to the Google Play" |
||||
lane :deploy do |
||||
gradle(task: "clean assembleRelease") |
||||
upload_to_play_store |
||||
end |
||||
|
||||
desc "Build debug and test APK for screenshots" |
||||
lane :screenshots do |
||||
# build_android_app( |
||||
# task: 'assemble', |
||||
# build_type: 'Debug' |
||||
# ) |
||||
# build_android_app( |
||||
# task: 'assemble', |
||||
# build_type: 'AndroidTest' |
||||
# ) |
||||
# screengrab() |
||||
frameit |
||||
end |
||||
end |
@ -0,0 +1,56 @@
|
||||
fastlane documentation |
||||
---- |
||||
|
||||
# Installation |
||||
|
||||
Make sure you have the latest version of the Xcode command line tools installed: |
||||
|
||||
```sh |
||||
xcode-select --install |
||||
``` |
||||
|
||||
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) |
||||
|
||||
# Available Actions |
||||
|
||||
## Android |
||||
|
||||
### android test |
||||
|
||||
```sh |
||||
[bundle exec] fastlane android test |
||||
``` |
||||
|
||||
Runs all the tests |
||||
|
||||
### android beta |
||||
|
||||
```sh |
||||
[bundle exec] fastlane android beta |
||||
``` |
||||
|
||||
Submit a new Beta Build to Crashlytics Beta |
||||
|
||||
### android deploy |
||||
|
||||
```sh |
||||
[bundle exec] fastlane android deploy |
||||
``` |
||||
|
||||
Deploy a new version to the Google Play |
||||
|
||||
### android screenshots |
||||
|
||||
```sh |
||||
[bundle exec] fastlane android screenshots |
||||
``` |
||||
|
||||
Build debug and test APK for screenshots |
||||
|
||||
---- |
||||
|
||||
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. |
||||
|
||||
More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). |
||||
|
||||
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools). |
@ -0,0 +1,15 @@
|
||||
# remove the leading '#' to uncomment lines |
||||
|
||||
app_package_name('com.markosyan.zxscanner') |
||||
# use_tests_in_packages(['your.screenshot.tests.package']) |
||||
|
||||
app_apk_path('/Users/khorenmarkosyan/Documents/Projects/flutter_zxing/zxscanner/build/app/outputs/apk/debug/app-debug.apk') |
||||
tests_apk_path('/Users/khorenmarkosyan/Documents/Projects/flutter_zxing/zxscanner/build/app/outputs/apk/androidTest/debug/app-debug-androidTest.apk') |
||||
|
||||
locales(['en-US']) |
||||
|
||||
# clear all previously generated screenshots in your local output directory before creating new ones |
||||
clear_previous_screenshots(true) |
||||
|
||||
# For more information about all available options run |
||||
# fastlane screengrab --help |
After Width: | Height: | Size: 59 KiB |
@ -0,0 +1,5 @@
|
||||
Barcode and QR code scanner that supports more than 15 types of codes. |
||||
- Scan barcode from camera stream |
||||
- Scan barcode from image path |
||||
- Create barcode from text |
||||
- Flashlight and pinch to zoom support |
@ -0,0 +1,3 @@
|
||||
"01_scanner_screen" = "SCAN"; |
||||
"02_creator_screen" = "CREATE"; |
||||
"03_help_screen" = "HELP"; |
@ -0,0 +1 @@
|
||||
Barcode and QR Code Scanner |
@ -0,0 +1,3 @@
|
||||
"01_scanner_screen" = "Scan Barcodes"; |
||||
"02_creator_screen" = "Create Your Barcodes"; |
||||
"03_help_screen" = "Introduction To Barcodes"; |
@ -0,0 +1 @@
|
||||
ZXScanner |
@ -0,0 +1,35 @@
|
||||
{ |
||||
"device_frame_version": "latest", |
||||
"default": { |
||||
"title": { |
||||
"color": "#545454" |
||||
}, |
||||
"background": "./background.jpg", |
||||
"padding": 30, |
||||
"show_complete_frame": false, |
||||
"stack_title" : true, |
||||
"title_below_image": false, |
||||
"frame": "BLACK" |
||||
}, |
||||
|
||||
"data": [ |
||||
{ |
||||
"filter": "01_scanner_screen", |
||||
"keyword": { |
||||
"color": "#BF382A" |
||||
} |
||||
}, |
||||
{ |
||||
"filter": "02_creator_screen", |
||||
"keyword": { |
||||
"color": "#26AD5E" |
||||
} |
||||
}, |
||||
{ |
||||
"filter": "03_help_screen", |
||||
"keyword": { |
||||
"color": "#394C82" |
||||
} |
||||
} |
||||
] |
||||
} |
@ -1,6 +1,6 @@
|
||||
#Fri Jun 23 08:50:38 CEST 2017 |
||||
#Thu Jul 07 11:06:28 AMT 2022 |
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip |
||||
distributionPath=wrapper/dists |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
|
Loading…
Reference in new issue