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

ADS: Lint Rules #2697

Merged
merged 21 commits into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from 19 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
73 changes: 73 additions & 0 deletions .github/workflows/ads-end-to-end.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Android Design System End-to-End tests

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

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
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: assembleInternalRelease

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

- name: ADS Preview 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/ads_preview_flows

- name: Create Asana task when workflow failed
if: ${{ failure() }}
uses: honeycombio/gha-create-asana-task@main
with:
asana-secret: ${{ secrets.GH_ASANA_SECRET }}
asana-workspace-id: ${{ secrets.GH_ASANA_WORKSPACE_ID }}
asana-project-id: ${{ secrets.GH_ASANA_AOR_PROJECT_ID }}
asana-section-id: ${{ secrets.GH_ASANA_INCOMING_ID }}
asana-task-name: GH Workflow Failure - ADS Preview test
asana-task-description: The ADS Preview end to end workflow has failed. See https://github.com/duckduckgo/Android/actions/runs/${{ github.run_id }}
126 changes: 126 additions & 0 deletions .maestro/ads_preview_flows/1-_design-system-components.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
appId: com.duckduckgo.mobile.android
---
- launchApp:
clearState: true
stopApp: true
- assertVisible:
text: ".*Not to worry! Searching and browsing privately.*"
- tapOn: "let's do it!"
- tapOn: "cancel"
- assertVisible:
text: ".*I'll also upgrade the security of your connection if possible.*"
- tapOn:
id: "com.duckduckgo.mobile.android:id/browserMenuImageView"
- tapOn:
text: "Settings"
index: 0
- scrollUntilVisible:
element:
text: "Set of components designed following our Design System"
direction: DOWN
- assertVisible: "Set of components designed following our Design System"
- tapOn: "App Components Design Preview"
- assertVisible: "COLOR PALETTE"
- tapOn: "TYPOGRAPHY"
- scrollUntilVisible:
element:
text: "Text Appearance Caption"
direction: DOWN
- tapOn: "BUTTONS"
- tapOn: "Primary Large"
- tapOn: "Secondary Small"
- tapOn: "Destructive Small"
- tapOn: "TEXT INPUT"
- tapOn: "DIALOGS"
- tapOn: "Text Alert Dialog With Image"
- assertVisible: "Keep Using"
- tapOn: "Keep Using"
- tapOn: "Stacked Text Alert Dialog With 4 buttons"
- assertVisible: "Keep Using"
- tapOn: "Keep Using"
- tapOn: "Single Choice Alert Dialog"
- assertVisible: "Option"
- tapOn: "Option"
- tapOn: "Keep Using"
- scrollUntilVisible:
element:
text: "Promo Bottom Sheet with image"
direction: DOWN
- tapOn: "Action Bottom Sheet"
- assertVisible: "Primary Item"
- tapOn: "Primary Item"
- tapOn:
id: "com.duckduckgo.mobile.android:id/touch_outside"
- tapOn:
id: "com.duckduckgo.mobile.android:id/actionBottomSheetButtonWithTitle"
- tapOn:
id: "com.duckduckgo.mobile.android:id/item_container"
index: 0
- tapOn:
id: "com.duckduckgo.mobile.android:id/touch_outside"
- tapOn:
id: "com.duckduckgo.mobile.android:id/promoBottomSheetButtonWithTitle"
- tapOn:
id: "com.duckduckgo.mobile.android:id/bottomSheetPromoPrimaryButton"
- tapOn:
id: "com.duckduckgo.mobile.android:id/touch_outside"
- scrollUntilVisible:
element:
text: "Cookie Consent dialog with animation"
direction: DOWN
- tapOn:
id: "com.duckduckgo.mobile.android:id/animated_button"
- tapOn:
id: "com.duckduckgo.mobile.android:id/primaryCta"
- tapOn:
id: "com.duckduckgo.mobile.android:id/no_hide_button"
- tapOn:
id: "com.duckduckgo.mobile.android:id/primaryCta"
- tapOn: "CARDS"
- tapOn: "Primary"
- tapOn: "INTERACTIVE"
- tapOn:
id: "com.duckduckgo.mobile.android:id/switch_one"
- tapOn:
id: "com.duckduckgo.mobile.android:id/radio_button_two"
- tapOn:
id: "com.duckduckgo.mobile.android:id/checkbox_one"
- tapOn:
point: "50%,75%"
- tapOn: "MESSAGING"
- tapOn:
id: "com.duckduckgo.mobile.android:id/close"
index: 0
- tapOn:
id: "com.duckduckgo.mobile.android:id/close"
index: 0
- tapOn:
id: "com.duckduckgo.mobile.android:id/close"
index: 0
- tapOn:
id: "com.duckduckgo.mobile.android:id/secondaryActionButton"
index: 0
- tapOn:
id: "com.duckduckgo.mobile.android:id/primaryActionButton"
index: 0
- tapOn: "LIST ITEMS"
- scrollUntilVisible:
element:
text: "This is a test"
direction: DOWN
- tapOn: "Others"
- scrollUntilVisible:
element:
text: "Enable Dark Theme"
direction: UP
- tapOn:
id: "com.duckduckgo.mobile.android:id/trailingSwitch"
- tapOn: "Typography"
- tapOn: "BUTTONS"
- tapOn: "TEXT INPUT"
- tapOn: "DIALOGS"
- tapOn: "CARDS"
- tapOn: "INTERACTIVE"
- tapOn: "MESSAGING"
- tapOn: "LIST ITEMS"
- tapOn: "OTHERS"