Skip to content

Commit

Permalink
Add maestro to CI (#2222)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosholgado authored Dec 9, 2022
1 parent 7dfddaa commit ab1b78d
Show file tree
Hide file tree
Showing 26 changed files with 364 additions and 306 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/end-to-end.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: End-to-End tests

on:
schedule:
- cron: '0 4 * * *' # run at 4 AM UTC
workflow_dispatch:

concurrency:
group: ${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

jobs:
instrumentation_tests:
runs-on: ubuntu-latest
name: End-to-End tests

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'

- name: Create folder
if: always()
run: mkdir apk

- name: Decode keys
uses: davidSchuppa/base64Secret-toFile-action@v2
with:
secret: ${{ secrets.FAKE_RELEASE_PROPERTIES }}
fileName: ddg_android_build.properties
destination-path: $HOME/jenkins_static/com.duckduckgo.mobile.android/

- name: Decode key file
uses: davidSchuppa/base64Secret-toFile-action@v2
with:
secret: ${{ secrets.FAKE_RELEASE_KEY }}
fileName: android
destination-path: $HOME/jenkins_static/com.duckduckgo.mobile.android/

- name: Assemble release APK
uses: gradle/gradle-build-action@v2
with:
arguments: assemblePlayRelease

- name: Move APK to new folder
if: always()
run: find . -name "*.apk" -exec mv '{}' apk/release.apk \;

- name: Ad click detection flows
uses: mobile-dev-inc/action-maestro-cloud@v1.1.1
with:
api-key: ${{ secrets.MOBILE_DEV_API_KEY }}
name: ${{ github.sha }}
app-file: apk/release.apk
workspace: .maestro/ad_click_detection_flows

- name: Privacy Tests
uses: mobile-dev-inc/action-maestro-cloud@v1.1.1
with:
api-key: ${{ secrets.MOBILE_DEV_API_KEY }}
name: ${{ github.sha }}
app-file: apk/release.apk
workspace: .maestro/privacy_tests
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ appId: com.duckduckgo.mobile.android
- assertVisible:
text: ".*I'll also upgrade the security of your connection if possible.*"
- inputText: "https://www.search-company.site/"
- tapOn:
id: ".*key_pos_ime_action.*"
- pressKey: Enter
- assertVisible:
text: ".*Got It.*"
- tapOn:
Expand All @@ -19,12 +18,15 @@ appId: com.duckduckgo.mobile.android
text: "HIDE TIPS FOREVER"
- tapOn:
text: "HIDE TIPS FOREVER"
- assertVisible:
id: "ad-id-3"
- action: scroll
- assertVisible:
id: "ad-id-7"
- action: scroll
- swipe:
start: 100,1000
end: 100,200
- swipe:
start: 100,1000
end: 100,200
- swipe:
start: 100,1000
end: 100,200
- assertVisible:
id: "ad-id-10"
- tapOn:
Expand All @@ -34,9 +36,9 @@ appId: com.duckduckgo.mobile.android
- tapOn:
id: "com.duckduckgo.mobile.android:id/omnibarIconContainer"
- assertVisible:
text: "Requests Blocked from Loading"
text: "View Tracker Companies"
- tapOn:
text: "Requests Blocked from Loading"
text: "View Tracker Companies"
- assertVisible:
text: "The following third-party domains’ requests were blocked from loading because they were identified as tracking requests. If a company's requests are loaded, it can allow them to profile you."
- assertVisible:
Expand All @@ -46,12 +48,12 @@ appId: com.duckduckgo.mobile.android
- assertVisible:
text: "convert.ad-company.site"
- assertVisible:
text: "www.ad-company.site"
text: "ad-company.site"
- action: back
- assertVisible:
text: "No Third-Party Requests Found"
text: "View Non-Tracker Companies"
- tapOn:
text: "No Third-Party Requests Found"
text: "View Non-Tracker Companies"
- assertVisible:
text: "We did not identify any requests from third-party domains."
- assertVisible:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ appId: com.duckduckgo.mobile.android
- assertVisible:
text: ".*I'll also upgrade the security of your connection if possible.*"
- inputText: "https://www.search-company.site/"
- tapOn:
id: ".*key_pos_ime_action.*"
- pressKey: Enter
- assertVisible:
text: ".*Got It.*"
- tapOn:
Expand All @@ -37,22 +36,22 @@ appId: com.duckduckgo.mobile.android
- tapOn:
id: "com.duckduckgo.mobile.android:id/omnibarIconContainer"
- assertVisible:
text: "Requests Blocked from Loading"
text: "View Tracker Companies"
- tapOn:
text: "Requests Blocked from Loading"
text: "View Tracker Companies"
- assertVisible:
text: "The following third-party domains’ requests were blocked from loading because they were identified as tracking requests. If a company's requests are loaded, it can allow them to profile you."
- assertVisible:
text: "About our Web Tracking Protections"
- assertVisible:
text: ".*Ad Company"
- assertVisible:
text: "www.ad-company.site"
text: "ad-company.site"
- action: back
- assertVisible:
text: "Third-Party Requests Loaded"
text: "View Non-Tracker Companies"
- tapOn:
text: "Third-Party Requests Loaded"
text: "View Non-Tracker Companies"
- assertVisible:
text: "The following third-party domains’ requests were loaded. If a company's requests are loaded, it can allow them to profile you, though our other web tracking protections still apply."
- assertVisible:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ appId: com.duckduckgo.mobile.android
- assertVisible:
text: ".*I'll also upgrade the security of your connection if possible.*"
- inputText: "https://www.search-company.site/"
- tapOn:
id: ".*key_pos_ime_action.*"
- pressKey: Enter
- assertVisible:
text: ".*Got It.*"
- tapOn:
Expand All @@ -37,22 +36,22 @@ appId: com.duckduckgo.mobile.android
- tapOn:
id: "com.duckduckgo.mobile.android:id/omnibarIconContainer"
- assertVisible:
text: "Requests Blocked from Loading"
text: "View Tracker Companies"
- tapOn:
text: "Requests Blocked from Loading"
text: "View Tracker Companies"
- assertVisible:
text: "The following third-party domains’ requests were blocked from loading because they were identified as tracking requests. If a company's requests are loaded, it can allow them to profile you."
- assertVisible:
text: "About our Web Tracking Protections"
- assertVisible:
text: ".*Ad Company"
- assertVisible:
text: "www.ad-company.site"
text: "ad-company.site"
- action: back
- assertVisible:
text: "Third-Party Requests Loaded"
text: "View Non-Tracker Companies"
- tapOn:
text: "Third-Party Requests Loaded"
text: "View Non-Tracker Companies"
- assertVisible:
text: "The following third-party domains’ requests were loaded. If a company's requests are loaded, it can allow them to profile you, though our other web tracking protections still apply."
- assertVisible:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ appId: com.duckduckgo.mobile.android
- assertVisible:
text: ".*I'll also upgrade the security of your connection if possible.*"
- inputText: "https://www.search-company.site/"
- tapOn:
id: ".*key_pos_ime_action.*"
- pressKey: Enter
- assertVisible:
text: ".*Got It.*"
- tapOn:
Expand All @@ -37,22 +36,22 @@ appId: com.duckduckgo.mobile.android
- tapOn:
id: "com.duckduckgo.mobile.android:id/omnibarIconContainer"
- assertVisible:
text: "Requests Blocked from Loading"
text: "View Tracker Companies"
- tapOn:
text: "Requests Blocked from Loading"
text: "View Tracker Companies"
- assertVisible:
text: "The following third-party domains’ requests were blocked from loading because they were identified as tracking requests. If a company's requests are loaded, it can allow them to profile you."
- assertVisible:
text: "About our Web Tracking Protections"
- assertVisible:
text: ".*Ad Company"
- assertVisible:
text: "www.ad-company.site"
text: "ad-company.site"
- action: back
- assertVisible:
text: "Third-Party Requests Loaded"
text: "View Non-Tracker Companies"
- tapOn:
text: "Third-Party Requests Loaded"
text: "View Non-Tracker Companies"
- assertVisible:
text: "The following third-party domains’ requests were loaded. If a company's requests are loaded, it can allow them to profile you, though our other web tracking protections still apply."
- assertVisible:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ appId: com.duckduckgo.mobile.android
- assertVisible:
text: ".*I'll also upgrade the security of your connection if possible.*"
- inputText: "https://www.search-company.site/"
- tapOn:
id: ".*key_pos_ime_action.*"
- pressKey: Enter
- assertVisible:
text: ".*Got It.*"
- tapOn:
Expand All @@ -22,12 +21,11 @@ appId: com.duckduckgo.mobile.android
- assertVisible:
id: "ad-id-3"
- action: scroll
- assertVisible:
id: "ad-id-7"
- action: scroll
- assertVisible:
id: "ad-id-10"
- action: scroll
- swipe:
direction: UP
duration: 2000
- assertVisible:
id: "ad-id-14"
- tapOn:
Expand All @@ -37,22 +35,22 @@ appId: com.duckduckgo.mobile.android
- tapOn:
id: "com.duckduckgo.mobile.android:id/omnibarIconContainer"
- assertVisible:
text: "Requests Blocked from Loading"
text: "View Tracker Companies"
- tapOn:
text: "Requests Blocked from Loading"
text: "View Tracker Companies"
- assertVisible:
text: "The following third-party domains’ requests were blocked from loading because they were identified as tracking requests. If a company's requests are loaded, it can allow them to profile you."
- assertVisible:
text: "About our Web Tracking Protections"
- assertVisible:
text: ".*Ad Company"
- assertVisible:
text: "www.ad-company.site"
text: "ad-company.site"
- action: back
- assertVisible:
text: "Third-Party Requests Loaded"
text: "View Non-Tracker Companies"
- tapOn:
text: "Third-Party Requests Loaded"
text: "View Non-Tracker Companies"
- assertVisible:
text: "The following third-party domains’ requests were loaded. If a company's requests are loaded, it can allow them to profile you, though our other web tracking protections still apply."
- assertVisible:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ appId: com.duckduckgo.mobile.android
- assertVisible:
text: ".*I'll also upgrade the security of your connection if possible.*"
- inputText: "https://www.search-company.site/"
- tapOn:
id: ".*key_pos_ime_action.*"
- pressKey: Enter
- assertVisible:
text: ".*Got It.*"
- tapOn:
Expand All @@ -28,9 +27,9 @@ appId: com.duckduckgo.mobile.android
- tapOn:
id: "com.duckduckgo.mobile.android:id/omnibarIconContainer"
- assertVisible:
text: "Requests Blocked from Loading"
text: "View Tracker Companies"
- tapOn:
text: "Requests Blocked from Loading"
text: "View Tracker Companies"
- assertVisible:
text: "The following third-party domains’ requests were blocked from loading because they were identified as tracking requests. If a company's requests are loaded, it can allow them to profile you."
- assertVisible:
Expand All @@ -40,12 +39,12 @@ appId: com.duckduckgo.mobile.android
- assertVisible:
text: "convert.ad-company.site"
- assertVisible:
text: "www.ad-company.site"
text: "ad-company.site"
- action: back
- assertVisible:
text: "No Third-Party Requests Found"
text: "View Non-Tracker Companies"
- tapOn:
text: "No Third-Party Requests Found"
text: "View Non-Tracker Companies"
- assertVisible:
text: "We did not identify any requests from third-party domains."
- assertVisible:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ appId: com.duckduckgo.mobile.android
- assertVisible:
text: ".*I'll also upgrade the security of your connection if possible.*"
- inputText: "https://www.search-company.site/"
- tapOn:
id: ".*key_pos_ime_action.*"
- pressKey: Enter
- assertVisible:
text: ".*Got It.*"
- tapOn:
Expand All @@ -28,9 +27,9 @@ appId: com.duckduckgo.mobile.android
- tapOn:
id: "com.duckduckgo.mobile.android:id/omnibarIconContainer"
- assertVisible:
text: "Requests Blocked from Loading"
text: "View Tracker Companies"
- tapOn:
text: "Requests Blocked from Loading"
text: "View Tracker Companies"
- assertVisible:
text: "The following third-party domains’ requests were blocked from loading because they were identified as tracking requests. If a company's requests are loaded, it can allow them to profile you."
- assertVisible:
Expand All @@ -40,12 +39,12 @@ appId: com.duckduckgo.mobile.android
- assertVisible:
text: "convert.ad-company.site"
- assertVisible:
text: "www.ad-company.site"
text: "ad-company.site"
- action: back
- assertVisible:
text: "No Third-Party Requests Found"
text: "View Non-Tracker Companies"
- tapOn:
text: "No Third-Party Requests Found"
text: "View Non-Tracker Companies"
- assertVisible:
text: "We did not identify any requests from third-party domains."
- assertVisible:
Expand Down
Loading

0 comments on commit ab1b78d

Please sign in to comment.