Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename project to Patrol #258

Merged
merged 10 commits into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"p: adb":
- packages/adb/**/*
"p: maestro_cli":
- packages/maestro_cli/**/*
"p: maestro_test":
- packages/maestro_test/**/*
"p: patrol_cli":
- packages/patrol_cli/**/*
"p: patrol":
- packages/patrol/**/*
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: maestro_test prepare
name: patrol prepare

on:
push:
branches: [master]
tags-ignore: ["maestro_test-v*"]
tags-ignore: ["patrol-v*"]
paths:
- "packages/maestro_test/**"
- "packages/patrol/**"
pull_request:
branches: [master]
paths:
- "packages/maestro_test/**"
- "packages/patrol/**"

jobs:
main:
Expand All @@ -26,7 +26,7 @@ jobs:

defaults:
run:
working-directory: packages/maestro_test
working-directory: packages/patrol

steps:
- name: Clone repository
Expand All @@ -51,17 +51,17 @@ jobs:
run: flutter format --set-exit-if-changed .

- name: flutter pub get (example app)
working-directory: ./packages/maestro_test/example
working-directory: ./packages/patrol/example
run: flutter pub get

- name: flutter format (example app)
working-directory: ./packages/maestro_test/example
working-directory: ./packages/patrol/example
run: flutter format --set-exit-if-changed .

- name: flutter analyze (example app)
working-directory: ./packages/maestro_test/example
working-directory: ./packages/patrol/example
run: flutter analyze --no-fatal-infos

- name: flutter test (example app)
working-directory: ./packages/maestro_test/example
working-directory: ./packages/patrol/example
run: flutter test
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: maestro_test publish
name: patrol publish

on:
push:
tags: ["maestro_test-v*"]
tags: ["patrol-v*"]

jobs:
main:
runs-on: ubuntu-latest

defaults:
run:
working-directory: packages/maestro_test
working-directory: packages/patrol

steps:
- name: Clone repository
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: maestro_cli prepare
name: patrol_cli prepare

on:
push:
branches: [master]
tags-ignore: ["maestro_cli-v*"]
tags-ignore: ["patrol_cli-v*"]
paths:
- "packages/maestro_cli/**"
- "packages/patrol_cli/**"
- "AutomatorServer/**"
pull_request:
branches: [master]
paths:
- "packages/maestro_cli/**"
- "packages/patrol_cli/**"
- "AutomatorServer/**"

jobs:
Expand All @@ -28,7 +28,7 @@ jobs:

defaults:
run:
working-directory: packages/maestro_cli
working-directory: packages/patrol_cli

steps:
- name: Clone repository
Expand Down Expand Up @@ -61,8 +61,8 @@ jobs:
- name: dart format
run: dart format --set-exit-if-changed .

- name: Install maestro_cli
run: dart pub global activate --source path . && maestro
- name: Install patrol_cli
run: dart pub global activate --source path . && patrol

- name: ktlint check
working-directory: ./AutomatorServer/android
Expand All @@ -87,18 +87,18 @@ jobs:
# git update-index --refresh
# git diff-index --quiet HEAD --

- name: Test maestro bootstrap --template basic
- name: Test patrol bootstrap --template basic
working-directory: ../
run: |
flutter create my_awesome_app
cd my_awesome_app
maestro bootstrap --template basic
patrol bootstrap --template basic
flutter analyze

- name: Test maestro bootstrap --template counter
- name: Test patrol bootstrap --template counter
working-directory: ../
run: |
flutter create example
cd example
maestro bootstrap --template counter
patrol bootstrap --template counter
flutter analyze
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: maestro_cli publish
name: patrol_cli publish

on:
push:
tags: ["maestro_cli-v*"]
tags: ["patrol_cli-v*"]

jobs:
check_versions:
Expand All @@ -13,7 +13,7 @@ jobs:
uses: actions/checkout@v3

- name: Check if versions are defined consistently
working-directory: packages/maestro_cli
working-directory: packages/patrol_cli
run: ./check_versions

upload_artifacts:
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Set artifact names
run: |
tag=${{ github.ref_name }}
prefix=maestro_cli-v
prefix=patrol_cli-v
version=${tag#"$prefix"} # version without the prefix
echo "version: $version"
server_file="server-$version.apk"
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:

defaults:
run:
working-directory: packages/maestro_cli
working-directory: packages/patrol_cli

steps:
- name: Clone repository
Expand Down
8 changes: 4 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"version": "0.2.0",
"configurations": [
{
"name": "maestro (empty)",
"cwd": "packages/maestro_cli",
"name": "patrol (empty)",
"cwd": "packages/patrol_cli",
"request": "launch",
"type": "dart"
},
{
"name": "maestro (target + driver)",
"cwd": "packages/maestro_cli",
"name": "patrol (target + driver)",
"cwd": "packages/patrol_cli",
"request": "launch",
"type": "dart",
"args": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package pl.leancode.automatorserver
import android.util.Log

object Logger {
private const val TAG = "MaestroServer"
private const val TAG = "PatrolServer"

fun e(msg: String) {
Log.e(TAG, msg)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ data class NativeWidget(
}
}

class MaestroAutomator {
class PatrolAutomator {
fun configure() {
val configurator = Configurator.getInstance()
configurator.waitForSelectorTimeout = 5000
Expand Down Expand Up @@ -225,7 +225,7 @@ class MaestroAutomator {
Logger.d("openNotifications()")
val success = uiDevice.openNotification()
if (!success) {
throw MaestroException("Could not open notifications")
throw PatrolException("Could not open notifications")
}
delay()
}
Expand All @@ -234,7 +234,7 @@ class MaestroAutomator {
Logger.d("openNotifications()")
val success = uiDevice.openQuickSettings()
if (!success) {
throw MaestroException("Could not open quick settings")
throw PatrolException("Could not open quick settings")
}
delay()
}
Expand Down Expand Up @@ -315,6 +315,6 @@ class MaestroAutomator {
}

companion object {
val instance = MaestroAutomator()
val instance = PatrolAutomator()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package pl.leancode.automatorserver

class PatrolException(message: String) : Exception(message)