Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e0ee6e0 authored by Hasib Prince's avatar Hasib Prince
Browse files

refactor: maestro scripts

parent 106e258b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
appId: foundation.e.apps.debug
appId: ${APP_ID}
---
- evalScript: ${output.app_index = 0}
- repeat:
    while:
      true: ${output.app_index < 10}
      true: ${output.app_index < NUMBER_OF_INSTALL}
    commands:
      - tapOn:
          text: INSTALL
          id: "${APP_ID}:id/installButton"
          optional: true
      - evalScript: ${output.app_install++, output.app_index++}
      - evalScript: ${output.app_install++; output.app_index++;}
      - runFlow:
          when:
            notVisible: INSTALL
+60 −0
Original line number Diff line number Diff line
appId: ${APP_ID}
env:
  SEARCH_STRING: "notes"
  SEARCH_SUGGESTION_STRING: "notes app"
  APP_INSTALL_CATEGORY_PAGE: 80
  APP_INSTALL_PER_CATEGORY: 10
  APP_INSTALL_SEARCH_PAGE: 20
---

- launchApp:
    clearState: false
- runFlow:
@@ -9,8 +16,9 @@ appId: ${APP_ID}
    commands:
      - tapOn:
          id: "${APP_ID}:id/agreeBT"
#- tapOn:
#    id: ${APP_ID}:id/anonymousBT
- tapOn:
    id: ${APP_ID}:id/anonymousBT
    optional: true
- runFlow:
    when:
      visible:
@@ -18,54 +26,35 @@ appId: ${APP_ID}
    commands:
      - tapOn:
          id: "${APP_ID}:id/ignoreSessionButton"

# Go to category page
- tapOn:
    id: "${APP_ID}:id/navigation_bar_item_icon_view"
    index: 1
- evalScript: ${output.app_install = 0; output.category_index = 0}
- repeat:
    while:
      true: ${output.app_install < 80}
      true: ${output.app_install < APP_INSTALL_CATEGORY_PAGE}
    commands:
      - tapOn:
          id: "${APP_ID}:id/category_title"
          index: ${output.category_index}
      - evalScript: ${output.app_index = 0;}
      - repeat:
          while:
            true: ${output.app_index < 10}
          commands:
            - tapOn:
                text: INSTALL
                id: "${APP_ID}:id/installButton"
                optional: true
            - evalScript: ${output.app_install++; output.app_index++;}
      - runFlow:
                when:
                  notVisible: INSTALL
                commands:
                  - scroll
          file: apps-install-flow.yaml
          env:
            NUMBER_OF_INSTALL: ${APP_INSTALL_PER_CATEGORY}
      - evalScript: ${output.category_index++}
      - back

# Go to search page
- tapOn:
    text: Search
- inputText: "notes"
- inputText: ${SEARCH_STRING}
- tapOn:
    text: notes app
- runFlow:
    commands:
    text: ${SEARCH_SUGGESTION_STRING}
- evalScript: ${output.app_install = 0; output.app_index = 0;}
      - repeat:
          while:
            true: ${output.app_index < 20;}
          commands:
            - tapOn:
                text: INSTALL
                id: "${APP_ID}:id/installButton"
                optional: true
            - evalScript: ${output.app_install++; output.app_index++;}
- runFlow:
                when:
                  notVisible: INSTALL
                commands:
                  - scroll
    file: apps-install-flow.yaml
    env:
      NUMBER_OF_INSTALL: ${APP_INSTALL_SEARCH_PAGE}