v121
parent
35dc7b49a9
commit
7cd623870e
|
@ -0,0 +1,88 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- iceraven
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release-automation:
|
||||||
|
name: Build App
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: 'true'
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
java-version: 17
|
||||||
|
distribution: temurin
|
||||||
|
|
||||||
|
- name: Install Android SDK with pieces Gradle skips
|
||||||
|
run: ./automation/iceraven/install-sdk.sh
|
||||||
|
|
||||||
|
- name: Inspect memory
|
||||||
|
run: free -h
|
||||||
|
|
||||||
|
- name: Create version name
|
||||||
|
run: echo "VERSION_NAME=$(git describe --tags HEAD)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Patch on the fly
|
||||||
|
run: |
|
||||||
|
sed -i 's#\.\./version.txt#\./version.txt#g' android-components/plugins/config/src/main/java/ConfigPlugin.kt
|
||||||
|
./automation/iceraven/patch_android_components.sh
|
||||||
|
|
||||||
|
- name: Relpace strings
|
||||||
|
run: |
|
||||||
|
sed -i 's/Firefox/Iceraven/g' app/src/*/res/values*/*strings.xml
|
||||||
|
sed -i '/about_content/s/Mozilla/@forkmaintainers/' app/src/*/res/values*/*strings.xml
|
||||||
|
|
||||||
|
- name: Build forkRelease variant of app
|
||||||
|
uses: gradle/gradle-build-action@v2
|
||||||
|
env:
|
||||||
|
# Try to stop the daemon from magically vanishing by adding random memory-related arguments.
|
||||||
|
# See <https://stackoverflow.com/a/70010526> and <https://stackoverflow.com/a/70756876>
|
||||||
|
# The runner seems to have ~6 gigs of memory, so we make sure to stay under that.
|
||||||
|
# We have Java 11 so we don't have a perm size anymore.
|
||||||
|
GRADLE_OPTS: -Dorg.gradle.jvmargs="-XX:MaxMetaspaceSize=2g -Xms1g -Xmx3g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/dev/stderr"
|
||||||
|
with:
|
||||||
|
gradle-home-cache-cleanup: true
|
||||||
|
gradle-executable: /usr/bin/time
|
||||||
|
arguments: -v ./gradlew app:assemblefenixForkRelease -x lintVitalFenixForkRelease -PversionName=${{ env.VERSION_NAME }} --stacktrace
|
||||||
|
|
||||||
|
- name: Create signed APKs
|
||||||
|
uses: abhijitvalluri/sign-apks@v0.8
|
||||||
|
with:
|
||||||
|
releaseDirectory: app/build/outputs/apk/fenix/forkRelease/
|
||||||
|
signingKeyBase64: ${{ secrets.DEBUG_SIGNING_KEY }}
|
||||||
|
alias: ${{ secrets.DEBUG_ALIAS }}
|
||||||
|
keyStorePassword: ${{ secrets.DEBUG_KEY_STORE_PASSWORD }}
|
||||||
|
keyPassword: ${{ secrets.DEBUG_KEY_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Upload arm64 apk
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
path: app/build/outputs/apk/fenix/forkRelease/app-fenix-arm64-v8a-forkRelease.apk
|
||||||
|
name: ${{ env.VERSION_NAME }}-browser-arm64-v8a-forkRelease.apk
|
||||||
|
|
||||||
|
- name: Upload armeabi apk
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
path: app/build/outputs/apk/fenix/forkRelease/app-fenix-armeabi-v7a-forkRelease.apk
|
||||||
|
name: ${{ env.VERSION_NAME }}-browser-armeabi-v7a-forkRelease.apk
|
||||||
|
|
||||||
|
- name: Upload x86 apk
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
path: app/build/outputs/apk/fenix/forkRelease/app-fenix-x86-forkRelease.apk
|
||||||
|
name: ${{ env.VERSION_NAME }}-browser-x86-forkRelease.apk
|
||||||
|
|
||||||
|
- name: Upload x86_64 apk
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
path: app/build/outputs/apk/fenix/forkRelease/app-fenix-x86_64-forkRelease.apk
|
||||||
|
name: ${{ env.VERSION_NAME }}-browser-x86_64-forkRelease.apk
|
|
@ -0,0 +1,133 @@
|
||||||
|
name: Android build PR
|
||||||
|
on: [pull_request]
|
||||||
|
jobs:
|
||||||
|
run-build:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
if: ${{ false }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 11
|
||||||
|
- name: "Clean & Assemble Debug"
|
||||||
|
uses: eskatos/gradle-command-action@v1
|
||||||
|
with:
|
||||||
|
wrapper-cache-enabled: true
|
||||||
|
dependencies-cache-enabled: true
|
||||||
|
configuration-cache-enabled: true
|
||||||
|
arguments: clean app:assembleDebug
|
||||||
|
|
||||||
|
run-testDebugUnitTest:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
if: github.event.pull_request.head.repo.full_name != github.repository && github.actor != 'MickeyMoz'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 11
|
||||||
|
- name: "Test Debug Unit Tests"
|
||||||
|
uses: eskatos/gradle-command-action@v1
|
||||||
|
with:
|
||||||
|
wrapper-cache-enabled: true
|
||||||
|
dependencies-cache-enabled: true
|
||||||
|
configuration-cache-enabled: true
|
||||||
|
arguments: testDebugUnitTest
|
||||||
|
|
||||||
|
run-detekt:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
if: github.event.pull_request.head.repo.full_name != github.repository && github.actor != 'MickeyMoz'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 11
|
||||||
|
- name: "Detekt"
|
||||||
|
uses: eskatos/gradle-command-action@v1
|
||||||
|
with:
|
||||||
|
wrapper-cache-enabled: true
|
||||||
|
dependencies-cache-enabled: true
|
||||||
|
configuration-cache-enabled: true
|
||||||
|
arguments: detekt
|
||||||
|
- name: Archive detekt results
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: detekt report
|
||||||
|
path: build/reports/detekt.html
|
||||||
|
|
||||||
|
run-ktlint:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
if: github.event.pull_request.head.repo.full_name != github.repository && github.actor != 'MickeyMoz'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 11
|
||||||
|
- name: "Ktlint"
|
||||||
|
uses: eskatos/gradle-command-action@v1
|
||||||
|
with:
|
||||||
|
wrapper-cache-enabled: true
|
||||||
|
dependencies-cache-enabled: true
|
||||||
|
configuration-cache-enabled: true
|
||||||
|
arguments: ktlint
|
||||||
|
|
||||||
|
run-lintDebug:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
if: github.event.pull_request.head.repo.full_name != github.repository && github.actor != 'MickeyMoz'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 11
|
||||||
|
- name: "Lint Debug"
|
||||||
|
uses: eskatos/gradle-command-action@v1
|
||||||
|
with:
|
||||||
|
wrapper-cache-enabled: true
|
||||||
|
dependencies-cache-enabled: true
|
||||||
|
configuration-cache-enabled: true
|
||||||
|
arguments: lintDebug
|
||||||
|
- name: Archive lint results
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: lintDebug report
|
||||||
|
path: app/build/reports/lint-results-debug.html
|
||||||
|
|
||||||
|
run-ui:
|
||||||
|
runs-on: macos-11
|
||||||
|
if: ${{ false }}
|
||||||
|
timeout-minutes: 60
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
api-level: [28]
|
||||||
|
target: [google_apis]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Run subset of UI Tests
|
||||||
|
uses: reactivecircus/android-emulator-runner@v2.21.0
|
||||||
|
with:
|
||||||
|
api-level: ${{ matrix.api-level }}
|
||||||
|
target: ${{ matrix.target }}
|
||||||
|
arch: x86_64
|
||||||
|
profile: pixel_2
|
||||||
|
script:
|
||||||
|
"JAVA_HOME=$JAVA_HOME_11_X64 && ./gradlew connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=\
|
||||||
|
org.mozilla.fenix.ui.NavigationToolbarTest#visitURLTest"
|
||||||
|
- name: Upload Test Artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: test-report
|
||||||
|
path: app/build/reports
|
|
@ -0,0 +1,44 @@
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/
|
||||||
|
|
||||||
|
name: "Fenix - Sync Strings"
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 2 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
main:
|
||||||
|
name: "Sync Strings"
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: "Discover Fenix Beta Version"
|
||||||
|
id: fenix-beta-version
|
||||||
|
uses: mozilla-mobile/fenix-beta-version@4.1.0
|
||||||
|
- name: "Skip non-beta versions"
|
||||||
|
uses: andymckay/cancel-action@0.2
|
||||||
|
if: ${{ steps.fenix-beta-version.outputs.beta_version == '' }}
|
||||||
|
- name: "Checkout Master Branch"
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: main
|
||||||
|
ref: main
|
||||||
|
- name: "Checkout Beta Branch"
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: beta
|
||||||
|
ref: "releases_v${{ steps.fenix-beta-version.outputs.beta_version }}.0.0"
|
||||||
|
- name: "Sync Strings"
|
||||||
|
uses: mozilla-mobile/sync-strings-action@1.0.1
|
||||||
|
with:
|
||||||
|
src: main
|
||||||
|
dst: beta
|
||||||
|
- name: Create Pull Request
|
||||||
|
uses: peter-evans/create-pull-request@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
path: beta
|
||||||
|
branch: automation/sync-strings-${{ steps.fenix-beta-version.outputs.beta_version }}
|
||||||
|
title: "Sync Strings from main to releases_${{steps.fenix-beta-version.outputs.beta_version}}.0"
|
||||||
|
body: "This (automated) PR syncs strings from `main` to `releases_${{steps.fenix-beta-version.outputs.beta_version}}.0.0`"
|
|
@ -0,0 +1,23 @@
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/
|
||||||
|
|
||||||
|
name: "Fenix - Update Android-Components"
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '*/15 * * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
main:
|
||||||
|
name: "Update Android-Components"
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: "Update Android-Components"
|
||||||
|
uses: mozilla-mobile/relbot@5.0.2
|
||||||
|
if: github.repository == 'mozilla-mobile/fenix'
|
||||||
|
with:
|
||||||
|
project: fenix
|
||||||
|
command: update-android-components
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -0,0 +1,42 @@
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/
|
||||||
|
|
||||||
|
name: "Fenix - Update Nimbus Experiments"
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '*/30 * * * *'
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-nimbus-experiments:
|
||||||
|
name: "Update Nimbus Experiments"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Checkout Main Branch"
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
path: fenix
|
||||||
|
ref: main
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: "Update Experiments JSON"
|
||||||
|
id: update-experiments-json
|
||||||
|
uses: mozilla-mobile/update-experiments@v3
|
||||||
|
with:
|
||||||
|
repo-path: fenix
|
||||||
|
output-path: app/src/main/res/raw/initial_experiments.json
|
||||||
|
experimenter-url: https://experimenter.services.mozilla.com/api/v6/experiments-first-run/
|
||||||
|
app-name: fenix
|
||||||
|
branch: automation/update-nimbus-experiments
|
||||||
|
- name: Create Pull Request
|
||||||
|
uses: peter-evans/create-pull-request@v4
|
||||||
|
if: steps.update-experiments-json.outputs.changed == 1 && steps.update-experiments-json.outputs.changed-branch == 1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
path: fenix
|
||||||
|
branch: automation/update-nimbus-experiments
|
||||||
|
commit-message: "update initial_experiments.json based on the current first-run experiments in experimenter"
|
||||||
|
title: "Update initial experiments JSON for Nimbus"
|
||||||
|
body: "This (automated) PR updates the initial_experiments.json on the `main` branch"
|
||||||
|
delete-branch: true
|
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
name: Glean probe-scraper
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
jobs:
|
||||||
|
glean-probe-scraper:
|
||||||
|
uses: mozilla/probe-scraper/.github/workflows/glean.yaml@main
|
|
@ -0,0 +1,21 @@
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/
|
||||||
|
|
||||||
|
name: Issue Linker
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
issue_linker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Issue Linker
|
||||||
|
uses: gabrielluong/issue-linker@1.0.0
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
commit-regexp: "#(\\d+)+"
|
||||||
|
section: "### GitHub Automation"
|
|
@ -0,0 +1,20 @@
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/
|
||||||
|
|
||||||
|
name: Tag Milestone
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
milestone:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: github.actor == 'mergify[bot]'
|
||||||
|
steps:
|
||||||
|
- name: Tag Milestone
|
||||||
|
uses: gabrielluong/milestone@1.0.0
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -0,0 +1,22 @@
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/
|
||||||
|
|
||||||
|
name: QA Needed
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
qa_needed:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: QA Needed
|
||||||
|
uses: gabrielluong/qa-needed@1.0.1
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
label: "eng:reopen-for-qa"
|
||||||
|
check-regexp: "- \\[([ xX]?)\\] \\*\\*QA Needed\\*\\*"
|
||||||
|
commit-regexp: "#(\\d+)+"
|
|
@ -0,0 +1,21 @@
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/
|
||||||
|
|
||||||
|
name: Reopen for QA Needed
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
reopen_qa_needed:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Reopen for QA Needed
|
||||||
|
uses: gabrielluong/reopen-for-qa-needed@1.0.0
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
reopen-label: "eng:reopen-for-qa"
|
||||||
|
qa-label: "eng:qa:needed"
|
|
@ -0,0 +1,142 @@
|
||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
create:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release-automation:
|
||||||
|
name: Build App
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: 'true'
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
java-version: 17
|
||||||
|
distribution: temurin
|
||||||
|
|
||||||
|
- name: Install Android SDK with pieces Gradle skips
|
||||||
|
run: ./automation/iceraven/install-sdk.sh
|
||||||
|
|
||||||
|
- name: Inspect memory
|
||||||
|
run: free -h
|
||||||
|
|
||||||
|
- name: Create version name
|
||||||
|
run: echo "VERSION_NAME=$(git describe --tags HEAD)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Patch on the fly
|
||||||
|
run: |
|
||||||
|
sed -i 's#\.\./version.txt#\./version.txt#g' android-components/plugins/config/src/main/java/ConfigPlugin.kt
|
||||||
|
./automation/iceraven/patch_android_components.sh
|
||||||
|
|
||||||
|
- name: Relpace strings
|
||||||
|
run: |
|
||||||
|
sed -i 's/Firefox/Iceraven/g' app/src/*/res/values*/*strings.xml
|
||||||
|
sed -i '/about_content/s/Mozilla/@forkmaintainers/' app/src/*/res/values*/*strings.xml
|
||||||
|
|
||||||
|
- name: Build forkRelease variant of app
|
||||||
|
uses: gradle/gradle-build-action@v2
|
||||||
|
env:
|
||||||
|
# Try to stop the daemon from magically vanishing by adding random memory-related arguments.
|
||||||
|
# See <https://stackoverflow.com/a/70010526> and <https://stackoverflow.com/a/70756876>
|
||||||
|
# The runner seems to have ~6 gigs of memory, so we make sure to stay under that.
|
||||||
|
# We have Java 11 so we don't have a perm size anymore.
|
||||||
|
GRADLE_OPTS: -Dorg.gradle.jvmargs="-XX:MaxMetaspaceSize=2g -Xms1g -Xmx3g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/dev/stderr"
|
||||||
|
with:
|
||||||
|
gradle-home-cache-cleanup: true
|
||||||
|
gradle-executable: /usr/bin/time
|
||||||
|
arguments: -v ./gradlew app:assemblefenixForkRelease -x lintVitalFenixForkRelease -PversionName=${{ env.VERSION_NAME }} --stacktrace
|
||||||
|
|
||||||
|
- name: Create signed APKs
|
||||||
|
if: "contains(toJSON(github.event.ref_type), 'tag') && contains(toJSON(github.event.ref), 'iceraven')"
|
||||||
|
uses: abhijitvalluri/sign-apks@v0.8
|
||||||
|
with:
|
||||||
|
releaseDirectory: app/build/outputs/apk/fenix/forkRelease/
|
||||||
|
signingKeyBase64: ${{ secrets.DEBUG_SIGNING_KEY }}
|
||||||
|
alias: ${{ secrets.DEBUG_ALIAS }}
|
||||||
|
keyStorePassword: ${{ secrets.DEBUG_KEY_STORE_PASSWORD }}
|
||||||
|
keyPassword: ${{ secrets.DEBUG_KEY_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Create changelog
|
||||||
|
if: "contains(toJSON(github.event.ref_type), 'tag') && contains(toJSON(github.event.ref), 'iceraven')"
|
||||||
|
run: |
|
||||||
|
PREVIOUS_RELEASE_TAG=$(git tag --list iceraven-* --sort=-creatordate | tail -n+2 | head -n 1)
|
||||||
|
CURRENT_RELEASE_TAG=${{ github.event.ref }}
|
||||||
|
CURRENT_RELEASE_TAG_CAPITALIZE=${CURRENT_RELEASE_TAG^}
|
||||||
|
CURRENT_RELEASE_TAG_CAPITALIZE=$(echo $CURRENT_RELEASE_TAG_CAPITALIZE | tr '-' ' ')
|
||||||
|
echo "CURRENT_RELEASE_TAG_CAPITALIZE=${CURRENT_RELEASE_TAG_CAPITALIZE}" >> $GITHUB_ENV
|
||||||
|
FENIX_TAG=$(cat version.txt | tr -d '\n')
|
||||||
|
|
||||||
|
echo -e "## Release info\n" >> temp_changelog.md
|
||||||
|
|
||||||
|
echo '```' >> temp_changelog.md
|
||||||
|
echo "Iceraven: $(echo $CURRENT_RELEASE_TAG | tr -d 'iceraven-')" >> temp_changelog.md
|
||||||
|
echo "Fenix: ${FENIX_TAG}" >> temp_changelog.md
|
||||||
|
echo -e '```\n' >> temp_changelog.md
|
||||||
|
|
||||||
|
echo -e "## News\n" >> temp_changelog.md
|
||||||
|
|
||||||
|
echo -e "## Change log\n" >> temp_changelog.md
|
||||||
|
echo "[${PREVIOUS_RELEASE_TAG}...${CURRENT_RELEASE_TAG}](https://github.com/${{ github.repository }}/compare/${PREVIOUS_RELEASE_TAG}...${CURRENT_RELEASE_TAG})" >> temp_changelog.md
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
if: "contains(toJSON(github.event.ref_type), 'tag') && contains(toJSON(github.event.ref), 'iceraven')"
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.event.ref }}
|
||||||
|
release_name: "${{ env.CURRENT_RELEASE_TAG_CAPITALIZE }}"
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
body_path: temp_changelog.md
|
||||||
|
|
||||||
|
- name: Upload arm64 apk
|
||||||
|
if: "contains(toJSON(github.event.ref_type), 'tag') && contains(toJSON(github.event.ref), 'iceraven')"
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: app/build/outputs/apk/fenix/forkRelease/app-fenix-arm64-v8a-forkRelease.apk
|
||||||
|
asset_name: ${{ github.event.ref }}-browser-arm64-v8a-forkRelease.apk
|
||||||
|
asset_content_type: application/vnd.android.package-archive
|
||||||
|
|
||||||
|
- name: Upload armeabi apk
|
||||||
|
if: "contains(toJSON(github.event.ref_type), 'tag') && contains(toJSON(github.event.ref), 'iceraven')"
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: app/build/outputs/apk/fenix/forkRelease/app-fenix-armeabi-v7a-forkRelease.apk
|
||||||
|
asset_name: ${{ github.event.ref }}-browser-armeabi-v7a-forkRelease.apk
|
||||||
|
asset_content_type: application/vnd.android.package-archive
|
||||||
|
|
||||||
|
- name: Upload x86 apk
|
||||||
|
if: "contains(toJSON(github.event.ref_type), 'tag') && contains(toJSON(github.event.ref), 'iceraven')"
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: app/build/outputs/apk/fenix/forkRelease/app-fenix-x86-forkRelease.apk
|
||||||
|
asset_name: ${{ github.event.ref }}-browser-x86-forkRelease.apk
|
||||||
|
asset_content_type: application/vnd.android.package-archive
|
||||||
|
|
||||||
|
- name: Upload x86_64 apk
|
||||||
|
if: "contains(toJSON(github.event.ref_type), 'tag') && contains(toJSON(github.event.ref), 'iceraven')"
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: app/build/outputs/apk/fenix/forkRelease/app-fenix-x86_64-forkRelease.apk
|
||||||
|
asset_name: ${{ github.event.ref }}-browser-x86_64-forkRelease.apk
|
||||||
|
asset_content_type: application/vnd.android.package-archive
|
File diff suppressed because it is too large
Load Diff
|
@ -1,156 +0,0 @@
|
||||||
Subject: [PATCH] name and icon
|
|
||||||
---
|
|
||||||
Index: app/build.gradle
|
|
||||||
IDEA additional info:
|
|
||||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
||||||
<+>UTF-8
|
|
||||||
===================================================================
|
|
||||||
diff --git a/app/build.gradle b/app/build.gradle
|
|
||||||
--- a/app/build.gradle (revision 4dca5f634ae61ddeead5fc3444c3ab692ad98536)
|
|
||||||
+++ b/app/build.gradle (revision 31c3e83236b2bd980d168f651af7a022b5e6a8b3)
|
|
||||||
@@ -31,7 +31,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
- applicationId "io.github.forkmaintainers"
|
|
||||||
+ applicationId "com.leos"
|
|
||||||
minSdkVersion config.minSdkVersion
|
|
||||||
compileSdk config.compileSdkVersion
|
|
||||||
targetSdkVersion config.targetSdkVersion
|
|
||||||
@@ -159,15 +159,15 @@
|
|
||||||
forkDebug {
|
|
||||||
shrinkResources false
|
|
||||||
minifyEnabled false
|
|
||||||
- applicationIdSuffix ".iceraven.debug"
|
|
||||||
+ applicationIdSuffix ".leosium.debug"
|
|
||||||
pseudoLocalesEnabled true
|
|
||||||
// Need to replicate default debug config features
|
|
||||||
signingConfig signingConfigs.debug
|
|
||||||
debuggable true
|
|
||||||
- def deepLinkSchemeValue = "iceraven-debug"
|
|
||||||
+ def deepLinkSchemeValue = "leosium-debug"
|
|
||||||
buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\""
|
|
||||||
manifestPlaceholders.putAll([
|
|
||||||
- "sharedUserId": "io.github.forkmaintainers.iceraven.sharedID",
|
|
||||||
+ "sharedUserId": "io.github.forkmaintainers.leosium.sharedID",
|
|
||||||
"deepLinkScheme": deepLinkSchemeValue,
|
|
||||||
])
|
|
||||||
// Use custom default allowed addon list
|
|
||||||
@@ -178,11 +178,11 @@
|
|
||||||
}
|
|
||||||
forkRelease releaseTemplate >> {
|
|
||||||
buildConfigField "boolean", "USE_RELEASE_VERSIONING", "true"
|
|
||||||
- applicationIdSuffix ".iceraven"
|
|
||||||
- def deepLinkSchemeValue = "iceraven"
|
|
||||||
+ applicationIdSuffix ".leosium"
|
|
||||||
+ def deepLinkSchemeValue = "leosium"
|
|
||||||
buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\""
|
|
||||||
manifestPlaceholders.putAll([
|
|
||||||
- "sharedUserId": "io.github.forkmaintainers.iceraven.sharedID",
|
|
||||||
+ "sharedUserId": "io.github.forkmaintainers.leosium.sharedID",
|
|
||||||
"deepLinkScheme": deepLinkSchemeValue,
|
|
||||||
])
|
|
||||||
// Use custom default allowed addon list
|
|
||||||
Index: app/src/forkRelease/res/values/static_strings.xml
|
|
||||||
IDEA additional info:
|
|
||||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
||||||
<+>UTF-8
|
|
||||||
===================================================================
|
|
||||||
diff --git a/app/src/forkRelease/res/values/static_strings.xml b/app/src/forkRelease/res/values/static_strings.xml
|
|
||||||
--- a/app/src/forkRelease/res/values/static_strings.xml (revision 4dca5f634ae61ddeead5fc3444c3ab692ad98536)
|
|
||||||
+++ b/app/src/forkRelease/res/values/static_strings.xml (revision 31c3e83236b2bd980d168f651af7a022b5e6a8b3)
|
|
||||||
@@ -4,5 +4,5 @@
|
|
||||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
||||||
<resources>
|
|
||||||
<!-- Name of the application -->
|
|
||||||
- <string name="app_name" translatable="false">Iceraven</string>
|
|
||||||
+ <string name="app_name" translatable="false">LeOSium</string>
|
|
||||||
</resources>
|
|
||||||
Index: app/src/main/java/org/mozilla/fenix/settings/quicksettings/protections/cookiebanners/dialog/CookieBannerReEngagementDialogCompose.kt
|
|
||||||
IDEA additional info:
|
|
||||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
||||||
<+>UTF-8
|
|
||||||
===================================================================
|
|
||||||
diff --git a/app/src/main/java/org/mozilla/fenix/settings/quicksettings/protections/cookiebanners/dialog/CookieBannerReEngagementDialogCompose.kt b/app/src/main/java/org/mozilla/fenix/settings/quicksettings/protections/cookiebanners/dialog/CookieBannerReEngagementDialogCompose.kt
|
|
||||||
--- a/app/src/main/java/org/mozilla/fenix/settings/quicksettings/protections/cookiebanners/dialog/CookieBannerReEngagementDialogCompose.kt (revision 4dca5f634ae61ddeead5fc3444c3ab692ad98536)
|
|
||||||
+++ b/app/src/main/java/org/mozilla/fenix/settings/quicksettings/protections/cookiebanners/dialog/CookieBannerReEngagementDialogCompose.kt (revision 31c3e83236b2bd980d168f651af7a022b5e6a8b3)
|
|
||||||
@@ -42,7 +42,7 @@
|
|
||||||
private fun CookieBannerReEngagementDialogComposePreview() {
|
|
||||||
FirefoxTheme {
|
|
||||||
CookieBannerReEngagementDialogCompose(
|
|
||||||
- dialogTitle = "Allow Iceraven to reject cookie banners?",
|
|
||||||
+ dialogTitle = "Allow LeOSium to reject cookie banners?",
|
|
||||||
dialogText =
|
|
||||||
"Automatically reject cookie requests, when possible. Otherwise, " +
|
|
||||||
"accept all cookies to dismiss cookie banners.",
|
|
||||||
Index: app/src/main/res/values/static_strings.xml
|
|
||||||
IDEA additional info:
|
|
||||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
||||||
<+>UTF-8
|
|
||||||
===================================================================
|
|
||||||
diff --git a/app/src/main/res/values/static_strings.xml b/app/src/main/res/values/static_strings.xml
|
|
||||||
--- a/app/src/main/res/values/static_strings.xml (revision 4dca5f634ae61ddeead5fc3444c3ab692ad98536)
|
|
||||||
+++ b/app/src/main/res/values/static_strings.xml (revision 31c3e83236b2bd980d168f651af7a022b5e6a8b3)
|
|
||||||
@@ -4,8 +4,8 @@
|
|
||||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
||||||
<resources>
|
|
||||||
<!-- Name of the application -->
|
|
||||||
- <string name="app_name" translatable="false">Iceraven Fenix</string>
|
|
||||||
- <string name="firefox" translatable="false">Iceraven</string>
|
|
||||||
+ <string name="app_name" translatable="false">LeOSium</string>
|
|
||||||
+ <string name="firefox" translatable="false">LeOSium</string>
|
|
||||||
|
|
||||||
<!-- Preference for developers -->
|
|
||||||
<string name="preference_leakcanary" translatable="false">LeakCanary</string>
|
|
||||||
@@ -21,7 +21,7 @@
|
|
||||||
<!-- Default title for pinned Wikipedia top site that links to Wikipedia home page -->
|
|
||||||
<string name="default_top_site_wikipedia" translatable="false">Wikipedia</string>
|
|
||||||
<!-- Default title for pinned Google top site that links to Google home page -->
|
|
||||||
- <string name="default_top_site_google" translatable="false">Google</string>
|
|
||||||
+ <string name="default_top_site_google" translatable="false">Goolag</string>
|
|
||||||
<!-- Application Services abbreviation used in AboutFragment -->
|
|
||||||
<string name="app_services_abbreviation" translatable="false">AS</string>
|
|
||||||
<!-- Name for the Pocket product -->
|
|
||||||
@@ -59,17 +59,17 @@
|
|
||||||
<!-- Preference to override the Push server -->
|
|
||||||
<string name="preferences_override_push_server">Custom Push server</string>
|
|
||||||
<!-- Quit app button title for the Sync Debug preferences -->
|
|
||||||
- <string name="preferences_sync_debug_quit_button_title">Stop Firefox</string>
|
|
||||||
+ <string name="preferences_sync_debug_quit_button_title">Stop LeOSium</string>
|
|
||||||
<!-- Quit app button summary for the Sync Debug preferences -->
|
|
||||||
- <string name="preferences_sync_debug_quit_button_summary">Custom server changes will take effect on the next Firefox run.</string>
|
|
||||||
+ <string name="preferences_sync_debug_quit_button_summary">Custom server changes will take effect on the next LeOSium run.</string>
|
|
||||||
<!-- Label for enabling the Tabs Tray to Compose changes -->
|
|
||||||
<string name="preferences_debug_settings_tabs_tray_to_compose" translatable="false">Enable Tabs Tray to Compose rewrite</string>
|
|
||||||
<!-- Label for enabling the Compose Top Sites -->
|
|
||||||
<string name="preferences_debug_settings_compose_top_sites" translatable="false">Enable Compose Top Sites</string>
|
|
||||||
<!-- Label for enabling translations -->
|
|
||||||
- <string name="preferences_debug_settings_translations" translatable="false">Enable Firefox Translations</string>
|
|
||||||
+ <string name="preferences_debug_settings_translations" translatable="false">Enable LeOSium Translations</string>
|
|
||||||
<!-- Label for enabling Firefox Suggest -->
|
|
||||||
- <string name="preferences_debug_settings_fxsuggest" translatable="false">Enable Firefox Suggest</string>
|
|
||||||
+ <string name="preferences_debug_settings_fxsuggest" translatable="false">Enable LeOSium Suggest</string>
|
|
||||||
|
|
||||||
<!-- A secret menu option in the tabs tray for making a tab inactive for testing. -->
|
|
||||||
<string name="inactive_tabs_menu_item">Make inactive</string>
|
|
||||||
@@ -86,15 +86,15 @@
|
|
||||||
<string name="profiler_stop">Stop Profiler</string>
|
|
||||||
|
|
||||||
<string name="profiler_settings_title">Profiler Settings</string>
|
|
||||||
- <string name="profiler_filter_firefox">Firefox</string>
|
|
||||||
+ <string name="profiler_filter_firefox">LeOSium</string>
|
|
||||||
<string name="profiler_running">Profiler is currently running</string>
|
|
||||||
- <string name="profiler_filter_firefox_explain">Recommended preset for profiling Firefox</string>
|
|
||||||
+ <string name="profiler_filter_firefox_explain">Recommended preset for profiling LeOSium</string>
|
|
||||||
<string name="profiler_filter_graphics">Graphics</string>
|
|
||||||
- <string name="profiler_filter_graphics_explain">Preset for investigating graphics bugs in Firefox</string>
|
|
||||||
+ <string name="profiler_filter_graphics_explain">Preset for investigating graphics bugs in LeOSium</string>
|
|
||||||
<string name="profiler_filter_media">Media</string>
|
|
||||||
- <string name="profiler_filter_media_explain">Preset for investigating audio and video bugs in Firefox</string>
|
|
||||||
+ <string name="profiler_filter_media_explain">Preset for investigating audio and video bugs in LeOSium</string>
|
|
||||||
<string name="profiler_filter_networking">Networking</string>
|
|
||||||
- <string name="profiler_filter_networking_explain">Preset for investigating networking bugs in Firefox</string>
|
|
||||||
+ <string name="profiler_filter_networking_explain">Preset for investigating networking bugs in LeOSium</string>
|
|
||||||
|
|
||||||
<string name="profiler_start_dialog_started">Profiler started</string>
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -1,75 +0,0 @@
|
||||||
Subject: [PATCH] Homescreen Name change LeOSium
|
|
||||||
---
|
|
||||||
Index: app/src/main/res/values/strings.xml
|
|
||||||
IDEA additional info:
|
|
||||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
||||||
<+>UTF-8
|
|
||||||
===================================================================
|
|
||||||
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
|
|
||||||
--- a/app/src/main/res/values/strings.xml (revision eadb87d91b869ff759556dafdc6c7388ddcdbab0)
|
|
||||||
+++ b/app/src/main/res/values/strings.xml (revision 46413d074bd41596719d59a4779eaf591f84af41)
|
|
||||||
@@ -301,7 +301,7 @@
|
|
||||||
<!-- Notification pre-permission dialog -->
|
|
||||||
<!-- Enable notification pre permission dialog title
|
|
||||||
The first parameter is the name of the app defined in app_name (for example: Fenix) -->
|
|
||||||
- <string name="onboarding_home_enable_notifications_title">Notifications help you do more with %s</string>
|
|
||||||
+ <string name="onboarding_home_enable_notifications_title">Notifications help you do more with LeOSium</string>
|
|
||||||
<!-- Enable notification pre permission dialog description with rationale
|
|
||||||
The first parameter is the name of the app defined in app_name (for example: Fenix) -->
|
|
||||||
<string name="onboarding_home_enable_notifications_description">Sync your tabs between devices, manage downloads, get tips about making the most of %s’s privacy protection, and more.</string>
|
|
||||||
@@ -346,13 +346,13 @@
|
|
||||||
<string name="juno_onboarding_enable_notifications_title_nimbus" moz:removedIn="120" tools:ignore="UnusedResources">Notifications help you do more with LeOSium</string>
|
|
||||||
<!-- Title for enable notification permission screen used by Nimbus experiments. Nimbus experiments do not support string placeholders.
|
|
||||||
Note: The word "LeOSium" should NOT be translated -->
|
|
||||||
- <string name="juno_onboarding_enable_notifications_title_nimbus_2">Notifications help you stay safer with Firefox</string>
|
|
||||||
+ <string name="juno_onboarding_enable_notifications_title_nimbus_2">Notifications help you stay safer with LeOSium</string>
|
|
||||||
<!-- Description for enable notification permission screen used by Nimbus experiments. Nimbus experiments do not support string placeholders.
|
|
||||||
Note: The word "Firefox" should NOT be translated -->
|
|
||||||
<string name="juno_onboarding_enable_notifications_description_nimbus" moz:removedIn="120" tools:ignore="UnusedResources">Send tabs between devices, manage downloads, and get tips on getting the most out of LeOSium.</string>
|
|
||||||
<!-- Description for enable notification permission screen used by Nimbus experiments. Nimbus experiments do not support string placeholders.
|
|
||||||
Note: The word "Firefox" should NOT be translated -->
|
|
||||||
- <string name="juno_onboarding_enable_notifications_description_nimbus_2">Securely send tabs between your devices and discover other privacy features in Firefox.</string>
|
|
||||||
+ <string name="juno_onboarding_enable_notifications_description_nimbus_2">Securely send tabs between your devices and discover other privacy features in LeOSium.</string>
|
|
||||||
<!-- Text for the button to request notification permission on the device -->
|
|
||||||
<string name="juno_onboarding_enable_notifications_positive_button" tools:ignore="UnusedResources">Turn on notifications</string>
|
|
||||||
<!-- Text for the button dismiss the screen and move on with the flow -->
|
|
||||||
@@ -672,7 +672,7 @@
|
|
||||||
<!-- Title of the Nimbus message for add-ons general availability-->
|
|
||||||
<string name="addon_ga_message_title" tools:ignore="UnusedResources">New add-ons now available</string>
|
|
||||||
<!-- Body of the Nimbus message for add-ons general availability. 'Firefox' intentionally hardcoded here-->
|
|
||||||
- <string name="addon_ga_message_body" tools:ignore="UnusedResources">Check out 100+ new extensions that let you make Firefox your own.</string>
|
|
||||||
+ <string name="addon_ga_message_body" tools:ignore="UnusedResources">Check out 100+ new extensions that let you make LeOSium your own.</string>
|
|
||||||
<!-- Button text of the Nimbus message for add-ons general availability. -->
|
|
||||||
<string name="addon_ga_message_button" tools:ignore="UnusedResources">Explore add-ons</string>
|
|
||||||
|
|
||||||
@@ -738,7 +738,7 @@
|
|
||||||
<!-- Name of the "receive tabs" notification channel. Displayed in the "App notifications" system settings for the app -->
|
|
||||||
<string name="fxa_received_tab_channel_name">Received tabs</string>
|
|
||||||
<!-- Description of the "receive tabs" notification channel. Displayed in the "App notifications" system settings for the app -->
|
|
||||||
- <string name="fxa_received_tab_channel_description">Notifications for tabs received from other Firefox devices.</string>
|
|
||||||
+ <string name="fxa_received_tab_channel_description">Notifications for tabs received from other LeOSium devices.</string>
|
|
||||||
<!-- The body for these is the URL of the tab received -->
|
|
||||||
<string name="fxa_tab_received_notification_name">Tab Received</string>
|
|
||||||
<!-- %s is the device name -->
|
|
||||||
@@ -1302,10 +1302,10 @@
|
|
||||||
<string name="notification_marketing_channel_name">Marketing</string>
|
|
||||||
<!-- Title shown in the notification that pops up to remind the user to set fenix as default browser.
|
|
||||||
The app name is in the text, due to limitations with localizing Nimbus experiments -->
|
|
||||||
- <string name="nimbus_notification_default_browser_title" tools:ignore="UnusedResources">Firefox is fast and private</string>
|
|
||||||
+ <string name="nimbus_notification_default_browser_title" tools:ignore="UnusedResources">LeOSium is fast and private</string>
|
|
||||||
<!-- Text shown in the notification that pops up to remind the user to set fenix as default browser.
|
|
||||||
The app name is in the text, due to limitations with localizing Nimbus experiments -->
|
|
||||||
- <string name="nimbus_notification_default_browser_text" tools:ignore="UnusedResources">Make Firefox your default browser</string>
|
|
||||||
+ <string name="nimbus_notification_default_browser_text" tools:ignore="UnusedResources">Make LeOSium your default browser</string>
|
|
||||||
<!-- Title shown in the notification that pops up to re-engage the user -->
|
|
||||||
<string name="notification_re_engagement_title">Try private browsing</string>
|
|
||||||
<!-- Text shown in the notification that pops up to re-engage the user.
|
|
||||||
@@ -1324,7 +1324,7 @@
|
|
||||||
<!-- Survey -->
|
|
||||||
<!-- Text shown in the fullscreen message that pops up to ask user to take a short survey.
|
|
||||||
The app name is in the text, due to limitations with localizing Nimbus experiments -->
|
|
||||||
- <string name="nimbus_survey_message_text">Please help make Firefox better by taking a short survey.</string>
|
|
||||||
+ <string name="nimbus_survey_message_text">Please help make LeOSium better by taking a short survey.</string>
|
|
||||||
<!-- Preference for taking the short survey. -->
|
|
||||||
<string name="preferences_take_survey">Take Survey</string>
|
|
||||||
<!-- Preference for not taking the short survey. -->
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,40 +0,0 @@
|
||||||
Subject: [PATCH] mull changes
|
|
||||||
---
|
|
||||||
Index: android-components
|
|
||||||
IDEA additional info:
|
|
||||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
||||||
<+>UTF-8
|
|
||||||
===================================================================
|
|
||||||
diff --git a/android-components b/android-components
|
|
||||||
--- a/android-components (revision 74a70efef04b9054656ee084aea0d719dda2bfad)
|
|
||||||
+++ b/android-components (revision 17814c1db3be943336f191ead73b1c08f67e8b56)
|
|
||||||
@@ -1,1 +1,1 @@
|
|
||||||
-c16aea836d4ca3525cdb7d571d264d6c8d49c609
|
|
||||||
\ No newline at end of file
|
|
||||||
+5956319a9bbae9daedd519fcd60f435e8ccbbe37
|
|
||||||
\ No newline at end of file
|
|
||||||
Index: app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt
|
|
||||||
IDEA additional info:
|
|
||||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
||||||
<+>UTF-8
|
|
||||||
===================================================================
|
|
||||||
diff --git a/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt b/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt
|
|
||||||
--- a/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt (revision 74a70efef04b9054656ee084aea0d719dda2bfad)
|
|
||||||
+++ b/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt (revision 17814c1db3be943336f191ead73b1c08f67e8b56)
|
|
||||||
@@ -116,7 +116,6 @@
|
|
||||||
|
|
||||||
@Suppress("ComplexMethod")
|
|
||||||
private fun coreMenuItems(): List<BrowserMenuItem> {
|
|
||||||
- val settings = context.components.settings
|
|
||||||
|
|
||||||
val bookmarksItem = BrowserMenuImageText(
|
|
||||||
context.getString(R.string.library_bookmarks),
|
|
||||||
@@ -228,7 +227,7 @@
|
|
||||||
helpItem,
|
|
||||||
customizeHomeItem,
|
|
||||||
settingsItem,
|
|
||||||
- if (settings.shouldDeleteBrowsingDataOnQuit) quitItem else null,
|
|
||||||
+ quitItem,
|
|
||||||
).also { items ->
|
|
||||||
items.getHighlight()?.let { onHighlightPresent(it) }
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,25 +0,0 @@
|
||||||
Subject: [PATCH] search changes
|
|
||||||
---
|
|
||||||
Index: components/feature/search/src/main/java/mozilla/components/feature/search/storage/SearchEngineReader.kt
|
|
||||||
IDEA additional info:
|
|
||||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
||||||
<+>UTF-8
|
|
||||||
===================================================================
|
|
||||||
diff --git a/components/feature/search/src/main/java/mozilla/components/feature/search/storage/SearchEngineReader.kt b/components/feature/search/src/main/java/mozilla/components/feature/search/storage/SearchEngineReader.kt
|
|
||||||
--- a/components/feature/search/src/main/java/mozilla/components/feature/search/storage/SearchEngineReader.kt (revision 5956319a9bbae9daedd519fcd60f435e8ccbbe37)
|
|
||||||
+++ b/components/feature/search/src/main/java/mozilla/components/feature/search/storage/SearchEngineReader.kt (revision 9db93731521a490cd943a530870beaa308c64612)
|
|
||||||
@@ -39,13 +39,13 @@
|
|
||||||
"leit-is",
|
|
||||||
"coccoc",
|
|
||||||
"brave",
|
|
||||||
- "ddghtml",
|
|
||||||
"ddglite",
|
|
||||||
"metager",
|
|
||||||
"mojeek",
|
|
||||||
"qwantlite",
|
|
||||||
"startpage",
|
|
||||||
"baidu",
|
|
||||||
+ "leosearch"
|
|
||||||
)
|
|
||||||
|
|
||||||
/**
|
|
|
@ -1,986 +0,0 @@
|
||||||
Subject: [PATCH] search changes
|
|
||||||
---
|
|
||||||
Index: android-components
|
|
||||||
IDEA additional info:
|
|
||||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
||||||
<+>UTF-8
|
|
||||||
===================================================================
|
|
||||||
diff --git a/android-components b/android-components
|
|
||||||
--- a/android-components (revision 17814c1db3be943336f191ead73b1c08f67e8b56)
|
|
||||||
+++ b/android-components (revision 47a15ec0995100b316f7a3ccf319c8d17b4633ca)
|
|
||||||
@@ -1,1 +1,1 @@
|
|
||||||
-5956319a9bbae9daedd519fcd60f435e8ccbbe37
|
|
||||||
\ No newline at end of file
|
|
||||||
+9db93731521a490cd943a530870beaa308c64612
|
|
||||||
\ No newline at end of file
|
|
||||||
Index: app/src/main/java/org/mozilla/fenix/utils/Settings.kt
|
|
||||||
IDEA additional info:
|
|
||||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
||||||
<+>UTF-8
|
|
||||||
===================================================================
|
|
||||||
diff --git a/app/src/main/java/org/mozilla/fenix/utils/Settings.kt b/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
|
|
||||||
--- a/app/src/main/java/org/mozilla/fenix/utils/Settings.kt (revision 17814c1db3be943336f191ead73b1c08f67e8b56)
|
|
||||||
+++ b/app/src/main/java/org/mozilla/fenix/utils/Settings.kt (revision 47a15ec0995100b316f7a3ccf319c8d17b4633ca)
|
|
||||||
@@ -733,12 +733,12 @@
|
|
||||||
|
|
||||||
val useStandardTrackingProtection by booleanPreference(
|
|
||||||
appContext.getPreferenceKey(R.string.pref_key_tracking_protection_standard_option),
|
|
||||||
- true,
|
|
||||||
+ false,
|
|
||||||
)
|
|
||||||
|
|
||||||
val useStrictTrackingProtection by booleanPreference(
|
|
||||||
appContext.getPreferenceKey(R.string.pref_key_tracking_protection_strict_default),
|
|
||||||
- false,
|
|
||||||
+ true,
|
|
||||||
)
|
|
||||||
|
|
||||||
val useCustomTrackingProtection by booleanPreference(
|
|
||||||
Index: app/src/main/res/xml/tracking_protection_preferences.xml
|
|
||||||
IDEA additional info:
|
|
||||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
||||||
<+>UTF-8
|
|
||||||
===================================================================
|
|
||||||
diff --git a/app/src/main/res/xml/tracking_protection_preferences.xml b/app/src/main/res/xml/tracking_protection_preferences.xml
|
|
||||||
--- a/app/src/main/res/xml/tracking_protection_preferences.xml (revision 17814c1db3be943336f191ead73b1c08f67e8b56)
|
|
||||||
+++ b/app/src/main/res/xml/tracking_protection_preferences.xml (revision 47a15ec0995100b316f7a3ccf319c8d17b4633ca)
|
|
||||||
@@ -16,13 +16,13 @@
|
|
||||||
android:title="@string/preference_enhanced_tracking_protection"
|
|
||||||
app:iconSpaceReserved="false" />
|
|
||||||
<org.mozilla.fenix.settings.RadioButtonInfoPreference
|
|
||||||
- android:defaultValue="true"
|
|
||||||
+ android:defaultValue="false"
|
|
||||||
android:dependency="@string/pref_key_tracking_protection"
|
|
||||||
android:key="@string/pref_key_tracking_protection_standard_option"
|
|
||||||
android:summary="@string/preference_enhanced_tracking_protection_standard_description_5"
|
|
||||||
android:title="@string/preference_enhanced_tracking_protection_standard_default_1" />
|
|
||||||
<org.mozilla.fenix.settings.RadioButtonInfoPreference
|
|
||||||
- android:defaultValue="false"
|
|
||||||
+ android:defaultValue="true"
|
|
||||||
android:dependency="@string/pref_key_tracking_protection"
|
|
||||||
android:key="@string/pref_key_tracking_protection_strict_default"
|
|
||||||
android:summary="@string/preference_enhanced_tracking_protection_strict_description_4"
|
|
||||||
Index: automation/iceraven/assets/list.json
|
|
||||||
IDEA additional info:
|
|
||||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
||||||
<+>UTF-8
|
|
||||||
===================================================================
|
|
||||||
diff --git a/automation/iceraven/assets/list.json b/automation/iceraven/assets/list.json
|
|
||||||
--- a/automation/iceraven/assets/list.json (revision 17814c1db3be943336f191ead73b1c08f67e8b56)
|
|
||||||
+++ b/automation/iceraven/assets/list.json (revision 47a15ec0995100b316f7a3ccf319c8d17b4633ca)
|
|
||||||
@@ -1,9 +1,9 @@
|
|
||||||
{
|
|
||||||
"default": {
|
|
||||||
- "searchDefault": "DuckDuckGo",
|
|
||||||
- "searchOrder": ["Google", "Bing"],
|
|
||||||
+ "searchDefault": "LeOSearch",
|
|
||||||
+ "searchOrder": ["ddg", "brave"],
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "wikipedia", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "wikipedia", "startpage", "brave"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"regionOverrides": {
|
|
||||||
@@ -12,49 +12,49 @@
|
|
||||||
"ach": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"an": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-an", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-an", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ar": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-ar", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "wikipedia-ar", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"as": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-in", "ddg", "wikipedia-as", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-in", "ddg", "wikipedia-as", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ast": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-ast", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "wikipedia-ast", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"az": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "azerdict", "wikipedia-az", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "azerdict", "wikipedia-az", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"be": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-be", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-be", "startpage", "brave"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"BY": {
|
|
||||||
@@ -81,133 +81,133 @@
|
|
||||||
"bg": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "pazaruvaj", "wikipedia-bg", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "pazaruvaj", "wikipedia-bg", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"bn": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-bn", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-bn", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"bn-BD": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-bn", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-bn", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"bn-IN": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "rediff", "wikipedia-bn", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "rediff", "wikipedia-bn", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"br": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-br", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-br", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"bs": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-bs", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-bs", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ca": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "wikipedia-ca", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "wikipedia-ca", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cak": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "amazondotcom", "ddg", "wikipedia-es", "startpage", "brave"
|
|
||||||
+ "leosearch", "amazondotcom", "ddg", "wikipedia-es", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cs": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "mapy-cz", "seznam-cz", "wikipedia-cz", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "mapy-cz", "seznam-cz", "wikipedia-cz", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cy": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-co-uk", "ddg", "wikipedia-cy", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-co-uk", "ddg", "wikipedia-cy", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"da": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "amazon-co-uk", "ddg", "wikipedia-da", "startpage", "brave"
|
|
||||||
+ "leosearch", "amazon-co-uk", "ddg", "wikipedia-da", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"de": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-de", "ddg", "ecosia", "qwant", "wikipedia-de", "ebay-de", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-de", "ddg", "ecosia", "qwant", "wikipedia-de", "ebay-de", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"de-AT": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-de", "ddg", "ecosia", "qwant", "wikipedia-de", "ebay-at", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-de", "ddg", "ecosia", "qwant", "wikipedia-de", "ebay-at", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dsb": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-de", "ddg", "wikipedia-dsb", "ebay-de", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-de", "ddg", "wikipedia-dsb", "ebay-de", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"el": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "skroutz", "wikipedia-el", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "skroutz", "wikipedia-el", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"en-AU": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-au", "ddg", "wikipedia", "ebay-au", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-au", "ddg", "wikipedia", "ebay-au", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"en-CA": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-ca", "ddg", "wikipedia", "ebay-ca", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-ca", "ddg", "wikipedia", "ebay-ca", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"en-IE": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-co-uk", "ddg", "qwant", "wikipedia", "ebay-ie", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-co-uk", "ddg", "qwant", "wikipedia", "ebay-ie", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"en-GB": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-co-uk", "ddg", "qwant", "wikipedia", "ebay-co-uk", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-co-uk", "ddg", "qwant", "wikipedia", "ebay-co-uk", "startpage", "brave"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"BY": {
|
|
||||||
@@ -234,7 +234,7 @@
|
|
||||||
"en-US": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "ebay", "wikipedia", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "ebay", "wikipedia", "startpage", "brave"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"BY": {
|
|
||||||
@@ -261,245 +261,245 @@
|
|
||||||
"en-ZA": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "wikipedia", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "wikipedia", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eo": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "reta-vortaro", "wikipedia-eo", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "reta-vortaro", "wikipedia-eo", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"es-AR": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "mercadolibre-ar", "wikipedia-es", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "mercadolibre-ar", "wikipedia-es", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"es-CL": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "mercadolibre-cl", "wikipedia-es", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "mercadolibre-cl", "wikipedia-es", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"es-ES": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-es", "amazon-es", "ebay-es", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-es", "amazon-es", "ebay-es", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"es-MX": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "mercadolibre-mx", "wikipedia-es", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "mercadolibre-mx", "wikipedia-es", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"et": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "amazon-co-uk", "ddg", "wikipedia-et", "startpage", "brave"
|
|
||||||
+ "leosearch", "amazon-co-uk", "ddg", "wikipedia-et", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"eu": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "elebila", "wikipedia-eu", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "elebila", "wikipedia-eu", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fa": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-fa", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-fa", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ff": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-fr", "ddg", "wikipedia-fr", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-fr", "ddg", "wikipedia-fr", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fi": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "amazondotcom", "ddg", "wikipedia-fi", "startpage", "brave"
|
|
||||||
+ "leosearch", "amazondotcom", "ddg", "wikipedia-fi", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fr-BE": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "qwant", "wikipedia-fr", "ebay-befr", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "qwant", "wikipedia-fr", "ebay-befr", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fr-CA": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-ca", "ddg", "wikipedia-fr", "ebay-ca", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-ca", "ddg", "wikipedia-fr", "ebay-ca", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fr-FR": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "qwant", "wikipedia-fr", "amazon-fr", "ebay-fr", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "qwant", "wikipedia-fr", "amazon-fr", "ebay-fr", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fr": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "qwant", "wikipedia-fr", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "qwant", "wikipedia-fr", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fy-NL": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "wikipedia-fy-NL", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "wikipedia-fy-NL", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ga-IE": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "amazon-co-uk", "ddg", "wikipedia-ga-IE", "startpage", "brave"
|
|
||||||
+ "leosearch", "amazon-co-uk", "ddg", "wikipedia-ga-IE", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gd": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "faclair-beag", "wikipedia-gd", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "faclair-beag", "wikipedia-gd", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gl": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-gl", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "wikipedia-gl", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gn": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-gn", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "wikipedia-gn", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gu-IN": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-in", "ddg", "wikipedia-gu", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-in", "ddg", "wikipedia-gu", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"he": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-he", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "wikipedia-he", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hi-IN": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-in", "ddg", "wikipedia-hi", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-in", "ddg", "wikipedia-hi", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hr": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-co-uk", "ddg", "wikipedia-hr", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-co-uk", "ddg", "wikipedia-hr", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hsb": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-de", "ddg", "wikipedia-hsb", "ebay-de", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-de", "ddg", "wikipedia-hsb", "ebay-de", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hu": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "sztaki-en-hu", "vatera", "wikipedia-hu", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "sztaki-en-hu", "vatera", "wikipedia-hu", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hy-AM": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-hy-AM", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "wikipedia-hy-AM", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ia": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-ia", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "wikipedia-ia", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-id", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-id", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"is": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "leit-is", "wikipedia-is", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "leit-is", "wikipedia-is", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"it": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-it", "amazon-it", "ebay-it", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-it", "amazon-it", "ebay-it", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ja": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "amazon-jp", "bing", "ddg", "wikipedia-ja", "yahoo-jp", "startpage", "brave"
|
|
||||||
+ "leosearch", "amazon-jp", "bing", "ddg", "wikipedia-ja", "yahoo-jp", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ka": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-ka", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "wikipedia-ka", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"kab": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-kab", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-kab", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"kk": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-kk", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-kk", "startpage", "brave"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"KZ": {
|
|
||||||
@@ -526,203 +526,203 @@
|
|
||||||
"km": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-km", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "wikipedia-km", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"kn": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-in", "ddg", "wikipedia-kn", "wiktionary-kn", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-in", "ddg", "wikipedia-kn", "wiktionary-kn", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ko": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "danawa-kr", "daum-kr", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "danawa-kr", "daum-kr", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lij": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-it", "ddg", "wikipedia-lij", "ebay-it", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-it", "ddg", "wikipedia-lij", "ebay-it", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lo": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-lo", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-lo", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lt": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "wikipedia-lt", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "wikipedia-lt", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ltg": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-co-uk", "wikipedia-ltg", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-co-uk", "wikipedia-ltg", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lv": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "salidzinilv", "wikipedia-lv", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "salidzinilv", "wikipedia-lv", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mai": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-in", "ddg", "wikipedia-hi", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-in", "ddg", "wikipedia-hi", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"meh": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-es", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "wikipedia-es", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mix": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-es", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "wikipedia-es", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ml": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-ml", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-ml", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mr": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-in", "ddg", "rediff", "wikipedia-mr", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-in", "ddg", "rediff", "wikipedia-mr", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ms": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-ms", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "wikipedia-ms", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"my": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-my", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "wikipedia-my", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nb-NO": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "gulesider-mobile-NO", "wikipedia-NO", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "gulesider-mobile-NO", "wikipedia-NO", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ne-NP": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-ne", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-ne", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nl-NL": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-nl", "amazon-nl", "ebay-nl", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-nl", "amazon-nl", "ebay-nl", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nl": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-nl", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-nl", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nn-NO": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "gulesider-mobile-NO", "wikipedia-NN", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "gulesider-mobile-NO", "wikipedia-NN", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"oc": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-oc", "wiktionary-oc", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-oc", "wiktionary-oc", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"or": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-in", "ddg", "wikipedia-or", "wiktionary-or", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-in", "ddg", "wikipedia-or", "wiktionary-or", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pa-IN": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-pa", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-pa", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pl": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-pl", "ebay-pl", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-pl", "ebay-pl", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pt-BR": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-pt", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-pt", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pt-PT": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "wikipedia-pt", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "wikipedia-pt", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rm": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "leo_ende_de", "pledarigrond", "wikipedia-rm", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "leo_ende_de", "pledarigrond", "wikipedia-rm", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ro": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "wikipedia-ro", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "wikipedia-ro", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ru": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "wikipedia-ru", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "wikipedia-ru", "startpage", "brave"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"RU": {
|
|
||||||
@@ -749,77 +749,77 @@
|
|
||||||
"sk": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "slovnik-sk", "wikipedia-sk", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "slovnik-sk", "wikipedia-sk", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sl": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "ceneje", "odpiralni", "wikipedia-sl", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "ceneje", "odpiralni", "wikipedia-sl", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"son": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "bing", "amazon-fr", "wikipedia-fr", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "bing", "amazon-fr", "wikipedia-fr", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sq": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-co-uk", "ddg", "wikipedia-sq", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-co-uk", "ddg", "wikipedia-sq", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sr": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-sr", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-sr", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sv-SE": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "prisjakt-sv-SE", "ddg", "wikipedia-sv-SE", "amazon-se", "ebay-ch", "startpage", "brave"
|
|
||||||
+ "leosearch", "prisjakt-sv-SE", "ddg", "wikipedia-sv-SE", "amazon-se", "ebay-ch", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ta": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-in", "ddg", "wikipedia-ta", "wiktionary-ta", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-in", "ddg", "wikipedia-ta", "wiktionary-ta", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"te": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-in", "ddg", "wikipedia-te", "wiktionary-te", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-in", "ddg", "wikipedia-te", "wiktionary-te", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"th": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "wikipedia-th", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "wikipedia-th", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tl": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tr": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "wikipedia-tr", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "wikipedia-tr", "startpage", "brave"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"TR": {
|
|
||||||
@@ -846,70 +846,70 @@
|
|
||||||
"trs": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-es", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "wikipedia-es", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uk": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "ddg", "wikipedia-uk", "startpage", "brave"
|
|
||||||
+ "leosearch", "ddg", "wikipedia-uk", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ur": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazon-in", "ddg", "wikipedia-ur", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazon-in", "ddg", "wikipedia-ur", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"uz": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-uz", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "amazondotcom", "ddg", "wikipedia-uz", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vi": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "coccoc", "ddg", "wikipedia-vi", "startpage", "brave"
|
|
||||||
+ "leosearch", "coccoc", "ddg", "wikipedia-vi", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"wo": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-wo", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-wo", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"xh": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"zam": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-es", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-es", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"zh-CN": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "baidu", "bing", "ddg", "wikipedia-zh-CN", "startpage", "brave"
|
|
||||||
+ "leosearch", "baidu", "bing", "ddg", "wikipedia-zh-CN", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"zh-TW": {
|
|
||||||
"default": {
|
|
||||||
"visibleDefaultEngines": [
|
|
||||||
- "google-b-m", "bing", "ddg", "wikipedia-zh-TW", "startpage", "brave"
|
|
||||||
+ "leosearch", "bing", "ddg", "wikipedia-zh-TW", "startpage", "brave"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because one or more lines are too long
112813
013-x.patch
112813
013-x.patch
File diff suppressed because it is too large
Load Diff
15
014-x1.patch
15
014-x1.patch
|
@ -1,15 +0,0 @@
|
||||||
Subject: [PATCH] x
|
|
||||||
---
|
|
||||||
Index: blobs.sh
|
|
||||||
===================================================================
|
|
||||||
diff --git a/blobs.sh b/blobs.sh
|
|
||||||
deleted file mode 100644
|
|
||||||
--- a/blobs.sh (revision c577fca8445181a70382fe6c12544a47d5092b92)
|
|
||||||
+++ /dev/null (revision c577fca8445181a70382fe6c12544a47d5092b92)
|
|
||||||
@@ -1,6 +0,0 @@
|
|
||||||
-sed -i \
|
|
||||||
- -e '/Deps.mozilla_lib_push_firebase/d' \
|
|
||||||
- -e '/Deps.adjust/d; /Deps.installreferrer/d; /Deps.google_ads_id/d' \
|
|
||||||
- -e '/Deps.google_play_store/d' \
|
|
||||||
- app/build.gradle
|
|
||||||
-
|
|
|
@ -1,9 +0,0 @@
|
||||||
Subject: [PATCH] x
|
|
||||||
---
|
|
||||||
diff --git a/app/src/main/res.tar.gz b/app/src/main/res.tar.gz
|
|
||||||
deleted file mode 100644
|
|
||||||
index e7b09525829f66e1cfb9c04c03ea1c3a9a2615f7..0000000000000000000000000000000000000000
|
|
||||||
GIT binary patch
|
|
||||||
literal 0
|
|
||||||
Hc$@<O00001
|
|
||||||
|
|
997
016-v120.patch
997
016-v120.patch
|
@ -1,997 +0,0 @@
|
||||||
Subject: [PATCH] v120
|
|
||||||
---
|
|
||||||
Index: fenix-liberate.patch
|
|
||||||
IDEA additional info:
|
|
||||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
||||||
<+>UTF-8
|
|
||||||
===================================================================
|
|
||||||
diff --git a/fenix-liberate.patch b/fenix-liberate.patch
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null (revision 2d11da25be368a0d5b2a0cf89e09aa073fcb0cd0)
|
|
||||||
+++ b/fenix-liberate.patch (revision 2d11da25be368a0d5b2a0cf89e09aa073fcb0cd0)
|
|
||||||
@@ -0,0 +1,985 @@
|
|
||||||
+diff --git a/fenix/app/build.gradle b/fenix/app/build.gradle
|
|
||||||
+index 78d698dad9..0fbf4cb1cf 100644
|
|
||||||
+--- a/fenix/app/build.gradle
|
|
||||||
++++ b/fenix/app/build.gradle
|
|
||||||
+@@ -576,7 +576,6 @@ dependencies {
|
|
||||||
+
|
|
||||||
+ implementation project(':lib-crash')
|
|
||||||
+ implementation project(':lib-crash-sentry')
|
|
||||||
+- implementation project(':lib-push-firebase')
|
|
||||||
+ implementation project(':lib-state')
|
|
||||||
+ implementation project(':lib-dataprotect')
|
|
||||||
+
|
|
||||||
+@@ -615,15 +614,6 @@ dependencies {
|
|
||||||
+ implementation FenixDependencies.protobuf_javalite
|
|
||||||
+ implementation ComponentsDependencies.google_material
|
|
||||||
+
|
|
||||||
+- implementation FenixDependencies.adjust
|
|
||||||
+- implementation FenixDependencies.installreferrer // Required by Adjust
|
|
||||||
+-
|
|
||||||
+- implementation FenixDependencies.google_ads_id // Required for the Google Advertising ID
|
|
||||||
+-
|
|
||||||
+- // Required for in-app reviews
|
|
||||||
+- implementation FenixDependencies.google_play_review
|
|
||||||
+- implementation FenixDependencies.google_play_review_ktx
|
|
||||||
+-
|
|
||||||
+ implementation FenixDependencies.androidx_profileinstaller
|
|
||||||
+
|
|
||||||
+ androidTestImplementation ComponentsDependencies.androidx_test_uiautomator
|
|
||||||
+diff --git a/fenix/app/proguard-rules.pro b/fenix/app/proguard-rules.pro
|
|
||||||
+index e269f65775..e870f06bef 100644
|
|
||||||
+--- a/fenix/app/proguard-rules.pro
|
|
||||||
++++ b/fenix/app/proguard-rules.pro
|
|
||||||
+@@ -1,22 +1,5 @@
|
|
||||||
+ -dontobfuscate
|
|
||||||
+
|
|
||||||
+-####################################################################################################
|
|
||||||
+-# Sentry
|
|
||||||
+-####################################################################################################
|
|
||||||
+-
|
|
||||||
+-# Recommended config via https://docs.sentry.io/clients/java/modules/android/#manual-integration
|
|
||||||
+-# Since we don't obfuscate, we don't need to use their Gradle plugin to upload ProGuard mappings.
|
|
||||||
+--keepattributes LineNumberTable,SourceFile
|
|
||||||
+--dontwarn org.slf4j.**
|
|
||||||
+--dontwarn javax.**
|
|
||||||
+-
|
|
||||||
+-# Our addition: this class is saved to disk via Serializable, which ProGuard doesn't like.
|
|
||||||
+-# If we exclude this, upload silently fails (Sentry swallows a NPE so we don't crash).
|
|
||||||
+-# I filed https://github.com/getsentry/sentry-java/issues/572
|
|
||||||
+-#
|
|
||||||
+-# If Sentry ever mysteriously stops working after we upgrade it, this could be why.
|
|
||||||
+--keep class io.sentry.event.Event { *; }
|
|
||||||
+-
|
|
||||||
+ ####################################################################################################
|
|
||||||
+ # Android and GeckoView built-ins
|
|
||||||
+ ####################################################################################################
|
|
||||||
+@@ -69,58 +52,6 @@
|
|
||||||
+
|
|
||||||
+ -keep class org.mozilla.fenix.**ViewModel { *; }
|
|
||||||
+
|
|
||||||
+-####################################################################################################
|
|
||||||
+-# Adjust
|
|
||||||
+-####################################################################################################
|
|
||||||
+-
|
|
||||||
+--keep public class com.adjust.sdk.** { *; }
|
|
||||||
+--keep class com.google.android.gms.common.ConnectionResult {
|
|
||||||
+- int SUCCESS;
|
|
||||||
+-}
|
|
||||||
+--keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
|
|
||||||
+- com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context);
|
|
||||||
+-}
|
|
||||||
+--keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
|
|
||||||
+- java.lang.String getId();
|
|
||||||
+- boolean isLimitAdTrackingEnabled();
|
|
||||||
+-}
|
|
||||||
+--keep public class com.android.installreferrer.** { *; }
|
|
||||||
+--keep class dalvik.system.VMRuntime {
|
|
||||||
+- java.lang.String getRuntime();
|
|
||||||
+-}
|
|
||||||
+--keep class android.os.Build {
|
|
||||||
+- java.lang.String[] SUPPORTED_ABIS;
|
|
||||||
+- java.lang.String CPU_ABI;
|
|
||||||
+-}
|
|
||||||
+--keep class android.content.res.Configuration {
|
|
||||||
+- android.os.LocaledList getLocales();
|
|
||||||
+- java.util.Locale locale;
|
|
||||||
+-}
|
|
||||||
+--keep class android.os.LocaleList {
|
|
||||||
+- java.util.Locale get(int);
|
|
||||||
+-}
|
|
||||||
+-
|
|
||||||
+-# Keep code generated from Glean Metrics
|
|
||||||
+--keep class org.mozilla.fenix.GleanMetrics.** { *; }
|
|
||||||
+-
|
|
||||||
+-# Keep motionlayout internal methods
|
|
||||||
+-# https://github.com/mozilla-mobile/fenix/issues/2094
|
|
||||||
+--keep class androidx.constraintlayout.** { *; }
|
|
||||||
+-
|
|
||||||
+-# Keep adjust relevant classes
|
|
||||||
+--keep class com.adjust.sdk.** { *; }
|
|
||||||
+--keep class com.google.android.gms.common.ConnectionResult {
|
|
||||||
+- int SUCCESS;
|
|
||||||
+-}
|
|
||||||
+--keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
|
|
||||||
+- com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context);
|
|
||||||
+-}
|
|
||||||
+--keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
|
|
||||||
+- java.lang.String getId();
|
|
||||||
+- boolean isLimitAdTrackingEnabled();
|
|
||||||
+-}
|
|
||||||
+--keep public class com.android.installreferrer.** { *; }
|
|
||||||
+-
|
|
||||||
+ # Keep Android Lifecycle methods
|
|
||||||
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1596302
|
|
||||||
+ -keep class androidx.lifecycle.** { *; }
|
|
||||||
+diff --git a/fenix/app/src/main/java/com/adjust/sdk/Adjust.java b/fenix/app/src/main/java/com/adjust/sdk/Adjust.java
|
|
||||||
+new file mode 100644
|
|
||||||
+index 0000000000..7e644e2fa2
|
|
||||||
+--- /dev/null
|
|
||||||
++++ b/fenix/app/src/main/java/com/adjust/sdk/Adjust.java
|
|
||||||
+@@ -0,0 +1,44 @@
|
|
||||||
++/*
|
|
||||||
++ * Copyright (c) 2012-2017 adjust GmbH,
|
|
||||||
++ * http://www.adjust.com
|
|
||||||
++ *
|
|
||||||
++ * Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
++ * a copy of this software and associated documentation files (the
|
|
||||||
++ * "Software"), to deal in the Software without restriction, including
|
|
||||||
++ * without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
++ * distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
++ * permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
++ * the following conditions:
|
|
||||||
++ *
|
|
||||||
++ * The above copyright notice and this permission notice shall be
|
|
||||||
++ * included in all copies or substantial portions of the Software.
|
|
||||||
++ *
|
|
||||||
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
++ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
++ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
++ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
++ */
|
|
||||||
++
|
|
||||||
++package com.adjust.sdk;
|
|
||||||
++
|
|
||||||
++import android.content.Context;
|
|
||||||
++
|
|
||||||
++public class Adjust {
|
|
||||||
++ public static void onCreate(AdjustConfig adjustConfig) {
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ public static void onResume() {
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ public static void onPause() {
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ public static void setEnabled(boolean enabled) {
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ public static void gdprForgetMe(final Context context) {
|
|
||||||
++ }
|
|
||||||
++}
|
|
||||||
+diff --git a/fenix/app/src/main/java/com/adjust/sdk/AdjustAttribution.java b/fenix/app/src/main/java/com/adjust/sdk/AdjustAttribution.java
|
|
||||||
+new file mode 100644
|
|
||||||
+index 0000000000..ab6b3badbd
|
|
||||||
+--- /dev/null
|
|
||||||
++++ b/fenix/app/src/main/java/com/adjust/sdk/AdjustAttribution.java
|
|
||||||
+@@ -0,0 +1,49 @@
|
|
||||||
++/*
|
|
||||||
++ * Copyright (c) 2012-2017 adjust GmbH,
|
|
||||||
++ * http://www.adjust.com
|
|
||||||
++ *
|
|
||||||
++ * Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
++ * a copy of this software and associated documentation files (the
|
|
||||||
++ * "Software"), to deal in the Software without restriction, including
|
|
||||||
++ * without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
++ * distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
++ * permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
++ * the following conditions:
|
|
||||||
++ *
|
|
||||||
++ * The above copyright notice and this permission notice shall be
|
|
||||||
++ * included in all copies or substantial portions of the Software.
|
|
||||||
++ *
|
|
||||||
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
++ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
++ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
++ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
++ */
|
|
||||||
++
|
|
||||||
++package com.adjust.sdk;
|
|
||||||
++
|
|
||||||
++import java.io.Serializable;
|
|
||||||
++
|
|
||||||
++public class AdjustAttribution implements Serializable {
|
|
||||||
++ public String network;
|
|
||||||
++ public String campaign;
|
|
||||||
++ public String adgroup;
|
|
||||||
++ public String creative;
|
|
||||||
++
|
|
||||||
++ @Override
|
|
||||||
++ public boolean equals(Object other) {
|
|
||||||
++ return false;
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ @Override
|
|
||||||
++ public int hashCode() {
|
|
||||||
++ return 0;
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ @Override
|
|
||||||
++ public String toString() {
|
|
||||||
++ return "";
|
|
||||||
++ }
|
|
||||||
++}
|
|
||||||
+diff --git a/fenix/app/src/main/java/com/adjust/sdk/AdjustConfig.java b/fenix/app/src/main/java/com/adjust/sdk/AdjustConfig.java
|
|
||||||
+new file mode 100644
|
|
||||||
+index 0000000000..6753dd7d9f
|
|
||||||
+--- /dev/null
|
|
||||||
++++ b/fenix/app/src/main/java/com/adjust/sdk/AdjustConfig.java
|
|
||||||
+@@ -0,0 +1,46 @@
|
|
||||||
++/*
|
|
||||||
++ * Copyright (c) 2012-2017 adjust GmbH,
|
|
||||||
++ * http://www.adjust.com
|
|
||||||
++ *
|
|
||||||
++ * Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
++ * a copy of this software and associated documentation files (the
|
|
||||||
++ * "Software"), to deal in the Software without restriction, including
|
|
||||||
++ * without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
++ * distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
++ * permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
++ * the following conditions:
|
|
||||||
++ *
|
|
||||||
++ * The above copyright notice and this permission notice shall be
|
|
||||||
++ * included in all copies or substantial portions of the Software.
|
|
||||||
++ *
|
|
||||||
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
++ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
++ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
++ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
++ */
|
|
||||||
++
|
|
||||||
++package com.adjust.sdk;
|
|
||||||
++
|
|
||||||
++import android.content.Context;
|
|
||||||
++
|
|
||||||
++import java.util.List;
|
|
||||||
++
|
|
||||||
++public class AdjustConfig {
|
|
||||||
++ public static final String ENVIRONMENT_SANDBOX = "sandbox";
|
|
||||||
++ public static final String ENVIRONMENT_PRODUCTION = "production";
|
|
||||||
++
|
|
||||||
++ public AdjustConfig(Context context, String appToken, String environment) {
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ public AdjustConfig(Context context, String appToken, String environment, boolean allowSuppressLogLevel) {
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ public void setOnAttributionChangedListener(OnAttributionChangedListener onAttributionChangedListener) {
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ public void setLogLevel(LogLevel logLevel) {
|
|
||||||
++ }
|
|
||||||
++}
|
|
||||||
+diff --git a/fenix/app/src/main/java/com/adjust/sdk/LogLevel.java b/fenix/app/src/main/java/com/adjust/sdk/LogLevel.java
|
|
||||||
+new file mode 100644
|
|
||||||
+index 0000000000..27ac3de544
|
|
||||||
+--- /dev/null
|
|
||||||
++++ b/fenix/app/src/main/java/com/adjust/sdk/LogLevel.java
|
|
||||||
+@@ -0,0 +1,43 @@
|
|
||||||
++/*
|
|
||||||
++ * Copyright (c) 2012-2017 adjust GmbH,
|
|
||||||
++ * http://www.adjust.com
|
|
||||||
++ *
|
|
||||||
++ * Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
++ * a copy of this software and associated documentation files (the
|
|
||||||
++ * "Software"), to deal in the Software without restriction, including
|
|
||||||
++ * without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
++ * distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
++ * permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
++ * the following conditions:
|
|
||||||
++ *
|
|
||||||
++ * The above copyright notice and this permission notice shall be
|
|
||||||
++ * included in all copies or substantial portions of the Software.
|
|
||||||
++ *
|
|
||||||
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
++ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
++ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
++ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
++ */
|
|
||||||
++
|
|
||||||
++package com.adjust.sdk;
|
|
||||||
++
|
|
||||||
++import android.util.Log;
|
|
||||||
++
|
|
||||||
++/**
|
|
||||||
++ * Created by pfms on 11/03/15.
|
|
||||||
++ */
|
|
||||||
++public enum LogLevel {
|
|
||||||
++ VERBOSE(Log.VERBOSE), DEBUG(Log.DEBUG), INFO(Log.INFO), WARN(Log.WARN), ERROR(Log.ERROR), ASSERT(Log.ASSERT), SUPRESS(8);
|
|
||||||
++ final int androidLogLevel;
|
|
||||||
++
|
|
||||||
++ LogLevel(final int androidLogLevel) {
|
|
||||||
++ this.androidLogLevel = androidLogLevel;
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ public int getAndroidLogLevel() {
|
|
||||||
++ return androidLogLevel;
|
|
||||||
++ }
|
|
||||||
++}
|
|
||||||
+diff --git a/fenix/app/src/main/java/com/adjust/sdk/OnAttributionChangedListener.java b/fenix/app/src/main/java/com/adjust/sdk/OnAttributionChangedListener.java
|
|
||||||
+new file mode 100644
|
|
||||||
+index 0000000000..7efa1c6804
|
|
||||||
+--- /dev/null
|
|
||||||
++++ b/fenix/app/src/main/java/com/adjust/sdk/OnAttributionChangedListener.java
|
|
||||||
+@@ -0,0 +1,29 @@
|
|
||||||
++/*
|
|
||||||
++ * Copyright (c) 2012-2017 adjust GmbH,
|
|
||||||
++ * http://www.adjust.com
|
|
||||||
++ *
|
|
||||||
++ * Permission is hereby granted, free of charge, to any person obtaining
|
|
||||||
++ * a copy of this software and associated documentation files (the
|
|
||||||
++ * "Software"), to deal in the Software without restriction, including
|
|
||||||
++ * without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
++ * distribute, sublicense, and/or sell copies of the Software, and to
|
|
||||||
++ * permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
++ * the following conditions:
|
|
||||||
++ *
|
|
||||||
++ * The above copyright notice and this permission notice shall be
|
|
||||||
++ * included in all copies or substantial portions of the Software.
|
|
||||||
++ *
|
|
||||||
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
||||||
++ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
||||||
++ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
++ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
++ */
|
|
||||||
++
|
|
||||||
++package com.adjust.sdk;
|
|
||||||
++
|
|
||||||
++public interface OnAttributionChangedListener {
|
|
||||||
++ void onAttributionChanged(AdjustAttribution attribution);
|
|
||||||
++}
|
|
||||||
+diff --git a/fenix/app/src/main/java/com/google/android/gms/ads/identifier/AdvertisingIdClient.java b/fenix/app/src/main/java/com/google/android/gms/ads/identifier/AdvertisingIdClient.java
|
|
||||||
+new file mode 100644
|
|
||||||
+index 0000000000..0f2a47b141
|
|
||||||
+--- /dev/null
|
|
||||||
++++ b/fenix/app/src/main/java/com/google/android/gms/ads/identifier/AdvertisingIdClient.java
|
|
||||||
+@@ -0,0 +1,23 @@
|
|
||||||
++/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
++ * License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
++
|
|
||||||
++package com.google.android.gms.ads.identifier;
|
|
||||||
++
|
|
||||||
++import android.content.Context;
|
|
||||||
++
|
|
||||||
++public class AdvertisingIdClient {
|
|
||||||
++
|
|
||||||
++ public static final class Info {
|
|
||||||
++
|
|
||||||
++ public String getId() {
|
|
||||||
++ return "";
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ public static Info getAdvertisingIdInfo(Context context) {
|
|
||||||
++ return new Info();
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++}
|
|
||||||
+diff --git a/fenix/app/src/main/java/com/google/android/gms/common/GooglePlayServicesNotAvailableException.java b/fenix/app/src/main/java/com/google/android/gms/common/GooglePlayServicesNotAvailableException.java
|
|
||||||
+new file mode 100644
|
|
||||||
+index 0000000000..d3bff12497
|
|
||||||
+--- /dev/null
|
|
||||||
++++ b/fenix/app/src/main/java/com/google/android/gms/common/GooglePlayServicesNotAvailableException.java
|
|
||||||
+@@ -0,0 +1,8 @@
|
|
||||||
++/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
++ * License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
++
|
|
||||||
++package com.google.android.gms.common;
|
|
||||||
++
|
|
||||||
++public class GooglePlayServicesNotAvailableException extends Exception {
|
|
||||||
++}
|
|
||||||
+diff --git a/fenix/app/src/main/java/com/google/android/gms/common/GooglePlayServicesRepairableException.java b/fenix/app/src/main/java/com/google/android/gms/common/GooglePlayServicesRepairableException.java
|
|
||||||
+new file mode 100644
|
|
||||||
+index 0000000000..b72a7cdb16
|
|
||||||
+--- /dev/null
|
|
||||||
++++ b/fenix/app/src/main/java/com/google/android/gms/common/GooglePlayServicesRepairableException.java
|
|
||||||
+@@ -0,0 +1,8 @@
|
|
||||||
++/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
++ * License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
++
|
|
||||||
++package com.google.android.gms.common;
|
|
||||||
++
|
|
||||||
++public class GooglePlayServicesRepairableException extends Exception {
|
|
||||||
++}
|
|
||||||
+diff --git a/fenix/app/src/main/java/com/google/firebase/messaging/FirebaseMessagingService.java b/fenix/app/src/main/java/com/google/firebase/messaging/FirebaseMessagingService.java
|
|
||||||
+new file mode 100644
|
|
||||||
+index 0000000000..4d5fd8153d
|
|
||||||
+--- /dev/null
|
|
||||||
++++ b/fenix/app/src/main/java/com/google/firebase/messaging/FirebaseMessagingService.java
|
|
||||||
+@@ -0,0 +1,42 @@
|
|
||||||
++// Copyright 2020 Google LLC
|
|
||||||
++//
|
|
||||||
++// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
++// you may not use this file except in compliance with the License.
|
|
||||||
++// You may obtain a copy of the License at
|
|
||||||
++//
|
|
||||||
++// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
++//
|
|
||||||
++// Unless required by applicable law or agreed to in writing, software
|
|
||||||
++// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
++// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
++// See the License for the specific language governing permissions and
|
|
||||||
++// limitations under the License.
|
|
||||||
++package com.google.firebase.messaging;
|
|
||||||
++
|
|
||||||
++import android.app.Service;
|
|
||||||
++import android.content.Intent;
|
|
||||||
++import android.os.Binder;
|
|
||||||
++import android.os.IBinder;
|
|
||||||
++
|
|
||||||
++public class FirebaseMessagingService extends Service {
|
|
||||||
++
|
|
||||||
++ private final IBinder mBinder = new Binder();
|
|
||||||
++
|
|
||||||
++ public void onMessageReceived(RemoteMessage message) {
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ public void onMessageSent(String msgId) {
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ public void onNewToken(String token) {
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ public void onSendError(String msgId, Exception exception) {
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ @Override
|
|
||||||
++ public IBinder onBind(Intent intent) {
|
|
||||||
++ return mBinder;
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++}
|
|
||||||
+diff --git a/fenix/app/src/main/java/com/google/firebase/messaging/RemoteMessage.java b/fenix/app/src/main/java/com/google/firebase/messaging/RemoteMessage.java
|
|
||||||
+new file mode 100644
|
|
||||||
+index 0000000000..9ad59a31e4
|
|
||||||
+--- /dev/null
|
|
||||||
++++ b/fenix/app/src/main/java/com/google/firebase/messaging/RemoteMessage.java
|
|
||||||
+@@ -0,0 +1,33 @@
|
|
||||||
++// Copyright 2020 Google LLC
|
|
||||||
++//
|
|
||||||
++// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
++// you may not use this file except in compliance with the License.
|
|
||||||
++// You may obtain a copy of the License at
|
|
||||||
++//
|
|
||||||
++// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
++//
|
|
||||||
++// Unless required by applicable law or agreed to in writing, software
|
|
||||||
++// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
++// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
++// See the License for the specific language governing permissions and
|
|
||||||
++// limitations under the License.
|
|
||||||
++package com.google.firebase.messaging;
|
|
||||||
++
|
|
||||||
++import android.os.Parcel;
|
|
||||||
++import android.os.Parcelable;
|
|
||||||
++import java.util.Map;
|
|
||||||
++
|
|
||||||
++public class RemoteMessage implements Parcelable {
|
|
||||||
++
|
|
||||||
++ public int describeContents() {
|
|
||||||
++ return 0;
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ public void writeToParcel(Parcel out, int flags) {
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ public Map<String, String> getData() {
|
|
||||||
++ return null;
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++}
|
|
||||||
+diff --git a/fenix/app/src/main/java/mozilla/components/lib/push/firebase/AbstractFirebasePushService.kt b/fenix/app/src/main/java/mozilla/components/lib/push/firebase/AbstractFirebasePushService.kt
|
|
||||||
+new file mode 100644
|
|
||||||
+index 0000000000..b50a6f03a2
|
|
||||||
+--- /dev/null
|
|
||||||
++++ b/fenix/app/src/main/java/mozilla/components/lib/push/firebase/AbstractFirebasePushService.kt
|
|
||||||
+@@ -0,0 +1,32 @@
|
|
||||||
++/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
++ * License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
++
|
|
||||||
++package mozilla.components.lib.push.firebase
|
|
||||||
++
|
|
||||||
++import android.content.Context
|
|
||||||
++import com.google.firebase.messaging.FirebaseMessagingService
|
|
||||||
++import com.google.firebase.messaging.RemoteMessage
|
|
||||||
++import mozilla.components.concept.push.PushService
|
|
||||||
++
|
|
||||||
++abstract class AbstractFirebasePushService() : FirebaseMessagingService(), PushService {
|
|
||||||
++
|
|
||||||
++ override fun start(context: Context) {
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ override fun onNewToken(newToken: String) {
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ override fun onMessageReceived(remoteMessage: RemoteMessage?) {
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ final override fun stop() {
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ override fun deleteToken() {
|
|
||||||
++ }
|
|
||||||
++
|
|
||||||
++ override fun isServiceAvailable(context: Context): Boolean {
|
|
||||||
++ return false
|
|
||||||
++ }
|
|
||||||
++}
|
|
||||||
+diff --git a/fenix/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt b/fenix/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt
|
|
||||||
+index d3d63c17b9..7228e67716 100644
|
|
||||||
+--- a/fenix/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt
|
|
||||||
++++ b/fenix/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt
|
|
||||||
+@@ -18,7 +18,7 @@ object FeatureFlags {
|
|
||||||
+ * This feature does not only depend on this flag. It requires the AMO collection override to
|
|
||||||
+ * be enabled which is behind the Secret Settings.
|
|
||||||
+ * */
|
|
||||||
+- val customExtensionCollectionFeature = Config.channel.isNightlyOrDebug || Config.channel.isBeta
|
|
||||||
++ val customExtensionCollectionFeature = true
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
+ * Pull-to-refresh allows you to pull the web content down far enough to have the page to
|
|
||||||
+@@ -37,7 +37,7 @@ object FeatureFlags {
|
|
||||||
+ fun isPocketRecommendationsFeatureEnabled(context: Context): Boolean {
|
|
||||||
+ val langTag = LocaleManager.getCurrentLocale(context)
|
|
||||||
+ ?.toLanguageTag() ?: getSystemDefault().toLanguageTag()
|
|
||||||
+- return listOf("en-US", "en-CA").contains(langTag)
|
|
||||||
++ return false && listOf("en-US", "en-CA").contains(langTag)
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
+diff --git a/fenix/app/src/main/java/org/mozilla/fenix/components/Analytics.kt b/fenix/app/src/main/java/org/mozilla/fenix/components/Analytics.kt
|
|
||||||
+index 3cd954a5bb..31f4e6fe34 100644
|
|
||||||
+--- a/fenix/app/src/main/java/org/mozilla/fenix/components/Analytics.kt
|
|
||||||
++++ b/fenix/app/src/main/java/org/mozilla/fenix/components/Analytics.kt
|
|
||||||
+@@ -137,11 +137,7 @@ class Analytics(
|
|
||||||
+ MetricController.create(
|
|
||||||
+ listOf(
|
|
||||||
+ GleanMetricsService(context),
|
|
||||||
+- AdjustMetricsService(
|
|
||||||
+- application = context as Application,
|
|
||||||
+- storage = metricsStorage,
|
|
||||||
+- crashReporter = crashReporter,
|
|
||||||
+- ),
|
|
||||||
++ AdjustMetricsService(context as Application),
|
|
||||||
+ InstallReferrerMetricsService(context),
|
|
||||||
+ ),
|
|
||||||
+ isDataTelemetryEnabled = { context.settings().isTelemetryEnabled },
|
|
||||||
+diff --git a/fenix/app/src/main/java/org/mozilla/fenix/components/Components.kt b/fenix/app/src/main/java/org/mozilla/fenix/components/Components.kt
|
|
||||||
+index d077ca2972..a55a167ad5 100644
|
|
||||||
+--- a/fenix/app/src/main/java/org/mozilla/fenix/components/Components.kt
|
|
||||||
++++ b/fenix/app/src/main/java/org/mozilla/fenix/components/Components.kt
|
|
||||||
+@@ -10,7 +10,6 @@ import android.content.Context
|
|
||||||
+ import androidx.compose.runtime.Composable
|
|
||||||
+ import androidx.compose.ui.platform.LocalContext
|
|
||||||
+ import androidx.core.app.NotificationManagerCompat
|
|
||||||
+-import com.google.android.play.core.review.ReviewManagerFactory
|
|
||||||
+ import mozilla.components.feature.addons.AddonManager
|
|
||||||
+ import mozilla.components.feature.addons.amo.AMOAddonsProvider
|
|
||||||
+ import mozilla.components.feature.addons.migration.DefaultSupportedAddonsChecker
|
|
||||||
+@@ -171,7 +170,6 @@ class Components(private val context: Context) {
|
|
||||||
+
|
|
||||||
+ val reviewPromptController by lazyMonitored {
|
|
||||||
+ ReviewPromptController(
|
|
||||||
+- manager = ReviewManagerFactory.create(context),
|
|
||||||
+ reviewSettings = FenixReviewSettings(settings),
|
|
||||||
+ )
|
|
||||||
+ }
|
|
||||||
+diff --git a/fenix/app/src/main/java/org/mozilla/fenix/components/Core.kt b/fenix/app/src/main/java/org/mozilla/fenix/components/Core.kt
|
|
||||||
+index f6d7a2b0df..366c256bdb 100644
|
|
||||||
+--- a/fenix/app/src/main/java/org/mozilla/fenix/components/Core.kt
|
|
||||||
++++ b/fenix/app/src/main/java/org/mozilla/fenix/components/Core.kt
|
|
||||||
+@@ -510,8 +510,14 @@ class Core(
|
|
||||||
+ } else {
|
|
||||||
+ defaultTopSites.add(
|
|
||||||
+ Pair(
|
|
||||||
+- context.getString(R.string.default_top_site_google),
|
|
||||||
+- SupportUtils.GOOGLE_URL,
|
|
||||||
++ context.getString(R.string.default_top_site_fdroid),
|
|
||||||
++ SupportUtils.FDROID_URL,
|
|
||||||
++ ),
|
|
||||||
++ )
|
|
||||||
++ defaultTopSites.add(
|
|
||||||
++ Pair(
|
|
||||||
++ context.getString(R.string.default_top_site_eff),
|
|
||||||
++ SupportUtils.EFF_URL,
|
|
||||||
+ ),
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+diff --git a/fenix/app/src/main/java/org/mozilla/fenix/components/ReviewPromptController.kt b/fenix/app/src/main/java/org/mozilla/fenix/components/ReviewPromptController.kt
|
|
||||||
+index 33e8704adc..ffa85e3e46 100644
|
|
||||||
+--- a/fenix/app/src/main/java/org/mozilla/fenix/components/ReviewPromptController.kt
|
|
||||||
++++ b/fenix/app/src/main/java/org/mozilla/fenix/components/ReviewPromptController.kt
|
|
||||||
+@@ -6,8 +6,6 @@ package org.mozilla.fenix.components
|
|
||||||
+
|
|
||||||
+ import android.app.Activity
|
|
||||||
+ import androidx.annotation.VisibleForTesting
|
|
||||||
+-import com.google.android.play.core.review.ReviewInfo
|
|
||||||
+-import com.google.android.play.core.review.ReviewManager
|
|
||||||
+ import kotlinx.coroutines.Dispatchers.Main
|
|
||||||
+ import kotlinx.coroutines.withContext
|
|
||||||
+ import org.mozilla.fenix.GleanMetrics.ReviewPrompt
|
|
||||||
+@@ -45,24 +43,9 @@ class FenixReviewSettings(
|
|
||||||
+ * Controls the Review Prompt behavior.
|
|
||||||
+ */
|
|
||||||
+ class ReviewPromptController(
|
|
||||||
+- private val manager: ReviewManager,
|
|
||||||
+ private val reviewSettings: ReviewSettings,
|
|
||||||
+ private val timeNowInMillis: () -> Long = { System.currentTimeMillis() },
|
|
||||||
+- private val tryPromptReview: suspend (Activity) -> Unit = { activity ->
|
|
||||||
+- val flow = manager.requestReviewFlow()
|
|
||||||
+-
|
|
||||||
+- withContext(Main) {
|
|
||||||
+- flow.addOnCompleteListener {
|
|
||||||
+- if (it.isSuccessful) {
|
|
||||||
+- manager.launchReviewFlow(activity, it.result)
|
|
||||||
+- recordReviewPromptEvent(
|
|
||||||
+- it.result.toString(),
|
|
||||||
+- reviewSettings.numberOfAppLaunches,
|
|
||||||
+- Date(),
|
|
||||||
+- )
|
|
||||||
+- }
|
|
||||||
+- }
|
|
||||||
+- }
|
|
||||||
++ private val tryPromptReview: suspend (Activity) -> Unit = { _ ->
|
|
||||||
+ },
|
|
||||||
+ ) {
|
|
||||||
+ @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
|
|
||||||
+diff --git a/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/AdjustMetricsService.kt b/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/AdjustMetricsService.kt
|
|
||||||
+index b979a08026..ae125ebd52 100644
|
|
||||||
+--- a/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/AdjustMetricsService.kt
|
|
||||||
++++ b/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/AdjustMetricsService.kt
|
|
||||||
+@@ -10,25 +10,13 @@ import android.os.Bundle
|
|
||||||
+ import android.util.Log
|
|
||||||
+ import com.adjust.sdk.Adjust
|
|
||||||
+ import com.adjust.sdk.AdjustConfig
|
|
||||||
+-import com.adjust.sdk.AdjustEvent
|
|
||||||
+-import com.adjust.sdk.Constants.ADJUST_PREINSTALL_SYSTEM_PROPERTY_PATH
|
|
||||||
+ import com.adjust.sdk.LogLevel
|
|
||||||
+-import kotlinx.coroutines.CoroutineDispatcher
|
|
||||||
+-import kotlinx.coroutines.CoroutineScope
|
|
||||||
+-import kotlinx.coroutines.Dispatchers
|
|
||||||
+-import kotlinx.coroutines.launch
|
|
||||||
+-import mozilla.components.lib.crash.CrashReporter
|
|
||||||
+ import org.mozilla.fenix.BuildConfig
|
|
||||||
+ import org.mozilla.fenix.Config
|
|
||||||
+ import org.mozilla.fenix.GleanMetrics.FirstSession
|
|
||||||
+ import org.mozilla.fenix.ext.settings
|
|
||||||
+
|
|
||||||
+-class AdjustMetricsService(
|
|
||||||
+- private val application: Application,
|
|
||||||
+- private val storage: MetricsStorage,
|
|
||||||
+- private val crashReporter: CrashReporter,
|
|
||||||
+- private val dispatcher: CoroutineDispatcher = Dispatchers.IO,
|
|
||||||
+-) : MetricsService {
|
|
||||||
++class AdjustMetricsService(private val application: Application) : MetricsService {
|
|
||||||
+ override val type = MetricServiceType.Marketing
|
|
||||||
+
|
|
||||||
+ override fun start() {
|
|
||||||
+@@ -42,15 +30,12 @@ class AdjustMetricsService(
|
|
||||||
+ return
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+- System.setProperty(ADJUST_PREINSTALL_SYSTEM_PROPERTY_PATH, "/preload/etc/adjust.preinstall")
|
|
||||||
+-
|
|
||||||
+ val config = AdjustConfig(
|
|
||||||
+ application,
|
|
||||||
+ BuildConfig.ADJUST_TOKEN,
|
|
||||||
+ AdjustConfig.ENVIRONMENT_PRODUCTION,
|
|
||||||
+ true,
|
|
||||||
+ )
|
|
||||||
+- config.setPreinstallTrackingEnabled(true)
|
|
||||||
+
|
|
||||||
+ val installationPing = FirstSessionPing(application)
|
|
||||||
+
|
|
||||||
+@@ -94,26 +79,8 @@ class AdjustMetricsService(
|
|
||||||
+ Adjust.gdprForgetMe(application.applicationContext)
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+- @Suppress("TooGenericExceptionCaught")
|
|
||||||
+- override fun track(event: Event) {
|
|
||||||
+- CoroutineScope(dispatcher).launch {
|
|
||||||
+- try {
|
|
||||||
+- if (event is Event.GrowthData) {
|
|
||||||
+- if (storage.shouldTrack(event)) {
|
|
||||||
+- Adjust.trackEvent(AdjustEvent(event.tokenName))
|
|
||||||
+- storage.updateSentState(event)
|
|
||||||
+- } else {
|
|
||||||
+- storage.updatePersistentState(event)
|
|
||||||
+- }
|
|
||||||
+- }
|
|
||||||
+- } catch (e: Exception) {
|
|
||||||
+- crashReporter.submitCaughtException(e)
|
|
||||||
+- }
|
|
||||||
+- }
|
|
||||||
+- }
|
|
||||||
+-
|
|
||||||
+- override fun shouldTrack(event: Event): Boolean =
|
|
||||||
+- event is Event.GrowthData
|
|
||||||
++ override fun track(event: Event) { /* noop */ }
|
|
||||||
++ override fun shouldTrack(event: Event): Boolean = false
|
|
||||||
+
|
|
||||||
+ companion object {
|
|
||||||
+ private const val LOGTAG = "AdjustMetricsService"
|
|
||||||
+diff --git a/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/InstallReferrerMetricsService.kt b/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/InstallReferrerMetricsService.kt
|
|
||||||
+index a65690bdce..5e88212347 100644
|
|
||||||
+--- a/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/InstallReferrerMetricsService.kt
|
|
||||||
++++ b/fenix/app/src/main/java/org/mozilla/fenix/components/metrics/InstallReferrerMetricsService.kt
|
|
||||||
+@@ -8,8 +8,6 @@ import android.content.Context
|
|
||||||
+ import android.net.UrlQuerySanitizer
|
|
||||||
+ import android.os.RemoteException
|
|
||||||
+ import androidx.annotation.VisibleForTesting
|
|
||||||
+-import com.android.installreferrer.api.InstallReferrerClient
|
|
||||||
+-import com.android.installreferrer.api.InstallReferrerStateListener
|
|
||||||
+ import org.mozilla.fenix.GleanMetrics.PlayStoreAttribution
|
|
||||||
+ import org.mozilla.fenix.ext.settings
|
|
||||||
+ import org.mozilla.fenix.utils.Settings
|
|
||||||
+@@ -23,60 +21,13 @@ import java.net.URLDecoder
|
|
||||||
+ class InstallReferrerMetricsService(private val context: Context) : MetricsService {
|
|
||||||
+ override val type = MetricServiceType.Marketing
|
|
||||||
+
|
|
||||||
+- private var referrerClient: InstallReferrerClient? = null
|
|
||||||
+-
|
|
||||||
+ override fun start() {
|
|
||||||
+ if (context.settings().utmParamsKnown) {
|
|
||||||
+ return
|
|
||||||
+ }
|
|
||||||
+-
|
|
||||||
+- val timerId = PlayStoreAttribution.attributionTime.start()
|
|
||||||
+- val client = InstallReferrerClient.newBuilder(context).build()
|
|
||||||
+- referrerClient = client
|
|
||||||
+-
|
|
||||||
+- client.startConnection(
|
|
||||||
+- object : InstallReferrerStateListener {
|
|
||||||
+- override fun onInstallReferrerSetupFinished(responseCode: Int) {
|
|
||||||
+- PlayStoreAttribution.attributionTime.stopAndAccumulate(timerId)
|
|
||||||
+- when (responseCode) {
|
|
||||||
+- InstallReferrerClient.InstallReferrerResponse.OK -> {
|
|
||||||
+- // Connection established.
|
|
||||||
+- try {
|
|
||||||
+- val response = client.installReferrer
|
|
||||||
+- recordInstallReferrer(context.settings(), response.installReferrer)
|
|
||||||
+- context.settings().utmParamsKnown = true
|
|
||||||
+- } catch (e: RemoteException) {
|
|
||||||
+- // NOOP.
|
|
||||||
+- // We can't do anything about this.
|
|
||||||
+- }
|
|
||||||
+- }
|
|
||||||
+-
|
|
||||||
+- InstallReferrerClient.InstallReferrerResponse.FEATURE_NOT_SUPPORTED -> {
|
|
||||||
+- // API not available on the current Play Store app.
|
|
||||||
+- context.settings().utmParamsKnown = true
|
|
||||||
+- }
|
|
||||||
+-
|
|
||||||
+- InstallReferrerClient.InstallReferrerResponse.SERVICE_UNAVAILABLE -> {
|
|
||||||
+- // Connection couldn't be established.
|
|
||||||
+- }
|
|
||||||
+- }
|
|
||||||
+- // End the connection, and null out the client.
|
|
||||||
+- stop()
|
|
||||||
+- }
|
|
||||||
+-
|
|
||||||
+- override fun onInstallReferrerServiceDisconnected() {
|
|
||||||
+- // Try to restart the connection on the next request to
|
|
||||||
+- // Google Play by calling the startConnection() method.
|
|
||||||
+- referrerClient = null
|
|
||||||
+- }
|
|
||||||
+- },
|
|
||||||
+- )
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+- override fun stop() {
|
|
||||||
+- referrerClient?.endConnection()
|
|
||||||
+- referrerClient = null
|
|
||||||
+- }
|
|
||||||
++ override fun stop() { /* noop */ }
|
|
||||||
+
|
|
||||||
+ override fun track(event: Event) = Unit
|
|
||||||
+
|
|
||||||
+diff --git a/fenix/app/src/main/java/org/mozilla/fenix/home/topsites/TopSiteItemViewHolder.kt b/fenix/app/src/main/java/org/mozilla/fenix/home/topsites/TopSiteItemViewHolder.kt
|
|
||||||
+index d69f27e570..171f54a6d5 100644
|
|
||||||
+--- a/fenix/app/src/main/java/org/mozilla/fenix/home/topsites/TopSiteItemViewHolder.kt
|
|
||||||
++++ b/fenix/app/src/main/java/org/mozilla/fenix/home/topsites/TopSiteItemViewHolder.kt
|
|
||||||
+@@ -176,6 +176,12 @@ class TopSiteItemViewHolder(
|
|
||||||
+ SupportUtils.MEITUAN_URL -> {
|
|
||||||
+ binding.faviconImage.setImageDrawable(getDrawable(itemView.context, R.drawable.ic_meituan))
|
|
||||||
+ }
|
|
||||||
++ SupportUtils.FDROID_URL -> {
|
|
||||||
++ binding.faviconImage.setImageDrawable(getDrawable(itemView.context, R.drawable.ic_fdroid))
|
|
||||||
++ }
|
|
||||||
++ SupportUtils.EFF_URL -> {
|
|
||||||
++ binding.faviconImage.setImageDrawable(getDrawable(itemView.context, R.drawable.ic_eff))
|
|
||||||
++ }
|
|
||||||
+ else -> {
|
|
||||||
+ itemView.context.components.core.icons.loadIntoView(binding.faviconImage, topSite.url)
|
|
||||||
+ }
|
|
||||||
+diff --git a/fenix/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt b/fenix/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt
|
|
||||||
+index e867be39f2..a1667b1c2b 100644
|
|
||||||
+--- a/fenix/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt
|
|
||||||
++++ b/fenix/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt
|
|
||||||
+@@ -38,6 +38,8 @@ object SupportUtils {
|
|
||||||
+ const val GOOGLE_US_URL = "https://www.google.com/webhp?client=firefox-b-1-m&channel=ts"
|
|
||||||
+ const val GOOGLE_XX_URL = "https://www.google.com/webhp?client=firefox-b-m&channel=ts"
|
|
||||||
+ const val WHATS_NEW_URL = "https://www.mozilla.org/firefox/android/notes"
|
|
||||||
++ const val FDROID_URL = "https://f-droid.org/"
|
|
||||||
++ const val EFF_URL = "https://www.eff.org/"
|
|
||||||
+
|
|
||||||
+ enum class SumoTopic(internal val topicStr: String) {
|
|
||||||
+ HELP("faq-android"),
|
|
||||||
+diff --git a/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt b/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
|
|
||||||
+index 01ed68bbe6..c35ab607f7 100644
|
|
||||||
+--- a/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
|
|
||||||
++++ b/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
|
|
||||||
+@@ -332,17 +332,17 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
|
||||||
+
|
|
||||||
+ var isTelemetryEnabled by booleanPreference(
|
|
||||||
+ appContext.getPreferenceKey(R.string.pref_key_telemetry),
|
|
||||||
+- default = true,
|
|
||||||
++ default = false,
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+ var isMarketingTelemetryEnabled by booleanPreference(
|
|
||||||
+ appContext.getPreferenceKey(R.string.pref_key_marketing_telemetry),
|
|
||||||
+- default = !Config.channel.isMozillaOnline,
|
|
||||||
++ default = false,
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+ var isExperimentationEnabled by booleanPreference(
|
|
||||||
+ appContext.getPreferenceKey(R.string.pref_key_experimentation),
|
|
||||||
+- default = true,
|
|
||||||
++ default = false,
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+ var isOverrideTPPopupsForPerformanceTest = false
|
|
||||||
+@@ -1553,7 +1553,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
|
||||||
+ var showPocketRecommendationsFeature by lazyFeatureFlagPreference(
|
|
||||||
+ appContext.getPreferenceKey(R.string.pref_key_pocket_homescreen_recommendations),
|
|
||||||
+ featureFlag = FeatureFlags.isPocketRecommendationsFeatureEnabled(appContext),
|
|
||||||
+- default = { homescreenSections[HomeScreenSection.POCKET] == true },
|
|
||||||
++ default = { false },
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
+@@ -1611,7 +1611,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
|
||||||
+ */
|
|
||||||
+ var showContileFeature by booleanPreference(
|
|
||||||
+ key = appContext.getPreferenceKey(R.string.pref_key_enable_contile),
|
|
||||||
+- default = true,
|
|
||||||
++ default = false,
|
|
||||||
+ )
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
+diff --git a/fenix/app/src/main/res/values/static_strings_extra.xml b/fenix/app/src/main/res/values/static_strings_extra.xml
|
|
||||||
+new file mode 100644
|
|
||||||
+index 0000000000..101f4e0d0a
|
|
||||||
+--- /dev/null
|
|
||||||
++++ b/fenix/app/src/main/res/values/static_strings_extra.xml
|
|
||||||
+@@ -0,0 +1,8 @@
|
|
||||||
++<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
|
||||||
++<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
++ - License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
++ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
||||||
++<resources>
|
|
||||||
++ <string name="default_top_site_fdroid" translatable="false">F-Droid</string>
|
|
||||||
++ <string name="default_top_site_eff" translatable="false">EFF</string>
|
|
||||||
++</resources>
|
|
||||||
+diff --git a/fenix/app/src/main/res/xml/preferences.xml b/fenix/app/src/main/res/xml/preferences.xml
|
|
||||||
+index 2e0366e11b..4a684b7fb6 100644
|
|
||||||
+--- a/fenix/app/src/main/res/xml/preferences.xml
|
|
||||||
++++ b/fenix/app/src/main/res/xml/preferences.xml
|
|
||||||
+@@ -133,11 +133,6 @@
|
|
||||||
+ app:iconSpaceReserved="false"
|
|
||||||
+ android:title="@string/preferences_notifications" />
|
|
||||||
+
|
|
||||||
+- <androidx.preference.Preference
|
|
||||||
+- android:key="@string/pref_key_data_choices"
|
|
||||||
+- app:iconSpaceReserved="false"
|
|
||||||
+- android:title="@string/preferences_data_collection" />
|
|
||||||
+-
|
|
||||||
+ </androidx.preference.PreferenceCategory>
|
|
||||||
+
|
|
||||||
+ <PreferenceCategory
|
|
||||||
+@@ -189,11 +184,6 @@
|
|
||||||
+ android:title="@string/preferences_category_about"
|
|
||||||
+ app:iconSpaceReserved="false"
|
|
||||||
+ android:layout="@layout/preference_category_no_icon_style">
|
|
||||||
+- <androidx.preference.Preference
|
|
||||||
+- android:key="@string/pref_key_rate"
|
|
||||||
+- app:iconSpaceReserved="false"
|
|
||||||
+- android:title="@string/preferences_rate" />
|
|
||||||
+-
|
|
||||||
+ <androidx.preference.Preference
|
|
||||||
+ android:key="@string/pref_key_about"
|
|
||||||
+ app:iconSpaceReserved="false"
|
|
||||||
+diff --git a/fenix/app/src/main/res/xml/site_permissions_details_exceptions_preferences.xml b/fenix/app/src/main/res/xml/site_permissions_details_exceptions_preferences.xml
|
|
||||||
+index 6bb8cfbbe6..1c15b5897c 100644
|
|
||||||
+--- a/fenix/app/src/main/res/xml/site_permissions_details_exceptions_preferences.xml
|
|
||||||
++++ b/fenix/app/src/main/res/xml/site_permissions_details_exceptions_preferences.xml
|
|
||||||
+@@ -3,7 +3,8 @@
|
|
||||||
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
||||||
+ <androidx.preference.PreferenceScreen
|
|
||||||
+- xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
++ xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
++ xmlns:app="http://schemas.android.com/apk/res-auto">
|
|
||||||
+ <androidx.preference.Preference
|
|
||||||
+ android:icon="@drawable/ic_camera_enabled"
|
|
||||||
+ android:key="@string/pref_key_phone_feature_camera"
|
|
||||||
+@@ -44,7 +45,8 @@
|
|
||||||
+ android:icon="@drawable/ic_link"
|
|
||||||
+ android:key="@string/pref_key_browser_feature_media_key_system_access"
|
|
||||||
+ android:title="@string/preference_phone_feature_media_key_system_access"
|
|
||||||
+- android:summary="@string/preference_option_phone_feature_ask_to_allow"/>
|
|
||||||
++ android:summary="@string/preference_option_phone_feature_ask_to_allow"
|
|
||||||
++ app:isPreferenceVisible="false"/>
|
|
||||||
+
|
|
||||||
+ <androidx.preference.Preference
|
|
||||||
+ android:icon="@drawable/ic_autoplay"
|
|
||||||
+diff --git a/fenix/app/src/main/res/xml/site_permissions_preferences.xml b/fenix/app/src/main/res/xml/site_permissions_preferences.xml
|
|
||||||
+index 64c90b599b..621f184e68 100644
|
|
||||||
+--- a/fenix/app/src/main/res/xml/site_permissions_preferences.xml
|
|
||||||
++++ b/fenix/app/src/main/res/xml/site_permissions_preferences.xml
|
|
||||||
+@@ -64,6 +64,7 @@
|
|
||||||
+ android:key="@string/pref_key_browser_feature_media_key_system_access"
|
|
||||||
+ android:title="@string/preference_phone_feature_media_key_system_access"
|
|
||||||
+ android:summary="@string/preference_option_phone_feature_ask_to_allow"
|
|
||||||
++ app:isPreferenceVisible="false"
|
|
||||||
+ app:allowDividerBelow="true"/>
|
|
||||||
+
|
|
||||||
+ <androidx.preference.Preference
|
|
||||||
+diff --git a/fenix/plugins/fenixdependencies/src/main/java/FenixDependenciesPlugin.kt b/fenix/plugins/fenixdependencies/src/main/java/FenixDependenciesPlugin.kt
|
|
||||||
+index fff754c099..35599805e6 100644
|
|
||||||
+--- a/fenix/plugins/fenixdependencies/src/main/java/FenixDependenciesPlugin.kt
|
|
||||||
++++ b/fenix/plugins/fenixdependencies/src/main/java/FenixDependenciesPlugin.kt
|
|
||||||
+@@ -70,9 +70,6 @@ object FenixDependencies {
|
|
||||||
+ const val protobuf_javalite = "com.google.protobuf:protobuf-javalite:${FenixVersions.protobuf}"
|
|
||||||
+ const val protobuf_compiler = "com.google.protobuf:protoc:${FenixVersions.protobuf}"
|
|
||||||
+
|
|
||||||
+- const val adjust = "com.adjust.sdk:adjust-android:${FenixVersions.adjust}"
|
|
||||||
+- const val installreferrer = "com.android.installreferrer:installreferrer:${FenixVersions.installreferrer}"
|
|
||||||
+-
|
|
||||||
+ const val mockk = "io.mockk:mockk:${FenixVersions.mockk}"
|
|
||||||
+ const val mockk_android = "io.mockk:mockk-android:${FenixVersions.mockk}"
|
|
||||||
+ const val falcon = "com.jraska:falcon:${FenixVersions.falcon}"
|
|
||||||
+@@ -97,12 +94,6 @@ object FenixDependencies {
|
|
||||||
+
|
|
||||||
+ const val mockwebserver = "com.squareup.okhttp3:mockwebserver:${FenixVersions.mockwebserver}"
|
|
||||||
+
|
|
||||||
+- const val google_ads_id = "com.google.android.gms:play-services-ads-identifier:${FenixVersions.google_ads_id_version}"
|
|
||||||
+-
|
|
||||||
+- // Required for in-app reviews
|
|
||||||
+- const val google_play_review = "com.google.android.play:review:${FenixVersions.google_play_review_version}"
|
|
||||||
+- const val google_play_review_ktx = "com.google.android.play:review-ktx:${FenixVersions.google_play_review_version}"
|
|
||||||
+-
|
|
||||||
+ const val junitApi = "org.junit.jupiter:junit-jupiter-api:${FenixVersions.junit}"
|
|
||||||
+ const val junitParams = "org.junit.jupiter:junit-jupiter-params:${FenixVersions.junit}"
|
|
||||||
+ const val junitEngine = "org.junit.jupiter:junit-jupiter-engine:${FenixVersions.junit}"
|
|
127
README.md
127
README.md
|
@ -1,27 +1,134 @@
|
||||||
# LeOSium Browser!
|
# Iceraven Browser! [![CI](https://github.com/fork-maintainers/iceraven-browser/actions/workflows/ci.yml/badge.svg)](https://github.com/fork-maintainers/iceraven-browser/actions/workflows/ci.yml) ![Release](https://img.shields.io/github/v/release/fork-maintainers/iceraven-browser)
|
||||||
|
|
||||||
Definitely not brought to you by Mozilla!
|
Definitely not brought to you by Mozilla!
|
||||||
|
|
||||||
LeOSium Browser is a fork of LeOSium.... thx fork-maintainer for the sources !!!!
|
Iceraven Browser is a web browser for Android, based on [Mozilla's Fenix version of Firefox](https://github.com/mozilla-mobile/fenix/), [GeckoView](https://mozilla.github.io/geckoview/) and [Mozilla Android Components](https://mozac.org/).
|
||||||
|
|
||||||
LeOSium Browser is a web browser for Android, based on [Mozilla's Fenix version of Firefox](https://github.com/mozilla-mobile/fenix/), [GeckoView](https://mozilla.github.io/geckoview/) and [Mozilla Android Components](https://mozac.org/).
|
|
||||||
|
|
||||||
Our goal is to be a close fork of the new Firefox for Android that seeks to provide users with more options, more opportunities to customize (including a broad extension library), and more information about the pages they visit and how their browsers are interacting with those pages.
|
Our goal is to be a close fork of the new Firefox for Android that seeks to provide users with more options, more opportunities to customize (including a broad extension library), and more information about the pages they visit and how their browsers are interacting with those pages.
|
||||||
|
|
||||||
Notable features include:
|
Notable features include:
|
||||||
* `about:config` support
|
* `about:config` support
|
||||||
* The ability to *attempt* to install a much longer list of add-ons than Mozilla's Fenix version of Firefox accepts. Currently the browser queries [this AMO collection](https://addons.mozilla.org/en-US/firefox/collections/16201230/What-I-want-on-Fenix/) **Most of them will not work**, because they depend on code that Mozilla is still working on writing in `android-components`, but you may attempt to install them. If you don't see an add-on you want, you can [request it](https://github.com/fork-maintainers/LeOSium-browser/issues/new).
|
* The ability to *attempt* to install a much longer list of add-ons than Mozilla's Fenix version of Firefox accepts. Currently the browser queries [this AMO collection](https://addons.mozilla.org/en-US/firefox/collections/16201230/What-I-want-on-Fenix/) **Most of them will not work**, because they depend on code that Mozilla is still working on writing in `android-components`, but you may attempt to install them. If you don't see an add-on you want, you can [request it](https://github.com/fork-maintainers/iceraven-browser/issues/new).
|
||||||
* Option to suspend tabs to avoid being killed for memory (https://bugzilla.mozilla.org/show_bug.cgi?id=1807364)
|
* Option to suspend tabs to avoid being killed for memory (https://bugzilla.mozilla.org/show_bug.cgi?id=1807364)
|
||||||
* **No warranties or guarantees of security or updates or even stability**! Note that LeOSium Browser includes some unstable code written by Mozilla, with our own added modifications on top, all shipped with the stable version of GeckoView engine. Hence, the browser may contain bugs introduced upstream. Binaries are currently built automatically by our Github release automation. These binaries are signed with a debug key. When we finally publish this somewhere official like F-droid, we will sign the apks with a proper key suitable for public release. Due to the current way we create the releases and sign them, you may not want to rely on such "alpha" quality software as your primary web browser, as it will have bugs. So, use this browser only if you are comfortable with these limitations/potential risks.
|
* **No warranties or guarantees of security or updates or even stability**! Note that Iceraven Browser includes some unstable code written by Mozilla, with our own added modifications on top, all shipped with the stable version of GeckoView engine. Hence, the browser may contain bugs introduced upstream. Binaries are currently built automatically by our Github release automation. These binaries are signed with a debug key. When we finally publish this somewhere official like F-droid, we will sign the apks with a proper key suitable for public release. Due to the current way we create the releases and sign them, you may not want to rely on such "alpha" quality software as your primary web browser, as it will have bugs. So, use this browser only if you are comfortable with these limitations/potential risks.
|
||||||
|
|
||||||
**Note/Disclaimer:** LeOSium Browser could not exist without the hardworking folks at the Mozilla Corporation who work on the Mozilla Android Components and Firefox projects, but it is not an official Mozilla product, and is not provided, endorsed, vetted, approved, or secured by Mozilla.
|
**Note/Disclaimer:** Iceraven Browser could not exist without the hardworking folks at the Mozilla Corporation who work on the Mozilla Android Components and Firefox projects, but it is not an official Mozilla product, and is not provided, endorsed, vetted, approved, or secured by Mozilla.
|
||||||
|
|
||||||
In addition, we intend to try to cut down on telemetry and proprietary code to as great of an extent as possible as long as doing so does not compromise the user experience or make the fork too hard to maintain. Right now, we believe that no telemetry should be being sent to Mozilla anymore, but we cannot guarantee this; data may still be sent. Because of the way we have implemented this, the app may still appear to contain trackers when analyzed by tools that look for the presence of known tracking libraries. These detected trackers should actually be non-functional substitutes, many of which are sourced [from here](https://gitlab.com/relan/fennecbuild/-/blob/master/fenix-liberate.patch). **If you catch the app actually sending data to Mozilla, Adjust, Leanplum, Firebase, or any other such service, please open an issue!** Presumably any data that reaches Mozilla is governed by Mozilla's privacy policy, but as LeOSium Browser is, again **not a Mozilla product**, we can make no promises.
|
In addition, we intend to try to cut down on telemetry and proprietary code to as great of an extent as possible as long as doing so does not compromise the user experience or make the fork too hard to maintain. Right now, we believe that no telemetry should be being sent to Mozilla anymore, but we cannot guarantee this; data may still be sent. Because of the way we have implemented this, the app may still appear to contain trackers when analyzed by tools that look for the presence of known tracking libraries. These detected trackers should actually be non-functional substitutes, many of which are sourced [from here](https://gitlab.com/relan/fennecbuild/-/blob/master/fenix-liberate.patch). **If you catch the app actually sending data to Mozilla, Adjust, Leanplum, Firebase, or any other such service, please open an issue!** Presumably any data that reaches Mozilla is governed by Mozilla's privacy policy, but as Iceraven Browser is, again **not a Mozilla product**, we can make no promises.
|
||||||
|
|
||||||
LeOSium Browser combines the power of Fenix (of which we are a fork) and the spirit of Fennec, with a respectful nod toward the grand tradition of Netscape Navigator, from which all Gecko-based projects came, including the earliest of our predecessors, the old Mozilla Phoenix and Mozilla Firefox desktop browsers.
|
Iceraven Browser combines the power of Fenix (of which we are a fork) and the spirit of Fennec, with a respectful nod toward the grand tradition of Netscape Navigator, from which all Gecko-based projects came, including the earliest of our predecessors, the old Mozilla Phoenix and Mozilla Firefox desktop browsers.
|
||||||
|
|
||||||
That said, LeOSium Browser is an independent all-volunteer project, and has no affiliation with Netscape, Netscape Navigator, Mozilla, Mozilla Firefox, Mozila Phoenix, Debian, Debian Iceweasel, Parabola GNU/Linux-libre Iceweasel, America Online, or Verizon, among others. :) Basically, if you don't like the browser, it's not their fault. :)
|
That said, Iceraven Browser is an independent all-volunteer project, and has no affiliation with Netscape, Netscape Navigator, Mozilla, Mozilla Firefox, Mozila Phoenix, Debian, Debian Iceweasel, Parabola GNU/Linux-libre Iceweasel, America Online, or Verizon, among others. :) Basically, if you don't like the browser, it's not their fault. :)
|
||||||
|
|
||||||
|
## 📥 Installation
|
||||||
|
|
||||||
|
Right now, releases are published as `.apk` files, through Github. You should download and install the appropriate one for your device.
|
||||||
|
|
||||||
|
1. **Determine what version you need**. If you have a newer, 64-bit device, or a device with more than 4 GB of memory, you probably want the `arm64-v8a` version. **Any ordinary phone or tablet should be able to use the `armeabi-v7a` version**, but it will be limited to using no more than 4 GB of memory. You almost certainly don't want the `x86` or `x86_64` versions; they are in case you are running Android on a PC.
|
||||||
|
|
||||||
|
2. [**Download the APK for the latest release from the Releases page**](https://github.com/fork-maintainers/iceraven-browser/releases). Make sure to pick the version you chose in step 1.
|
||||||
|
|
||||||
|
3. **Install the APK**. You will need to enable installation of apps from "unknown" (to Google) sources, and installatiuon of apps *by* whatever app you used to open the downloaded APK (i.e. your browser or file manager). Android will try to dissuade you from doing this, and suggest that it is dangerous. Iceraven is a browser for people who enjoy danger.
|
||||||
|
|
||||||
|
4. **Enjoy Iceraven**. Make sure to install the add-ons that are essential for you in the main menu under "Add-Ons". You may want to set Iceraven as your device's default browser app. If you do this, it will be able to provide so-called "Chrome" [custom tabs](https://developers.google.com/web/android/custom-tabs) for other applications, allowing you to use your add-ons there.
|
||||||
|
|
||||||
|
## 🔨 Building
|
||||||
|
|
||||||
|
1. Set up the environment. We need the Android SDK at `$ANDROID_SDK_ROOT` and a Java JDK at `$JAVA_HOME` that isn't the Ubuntu Java 8 one. We want environment variables that look something like:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# Where does our system install the JDK? This is the right path for the Ubuntu Java 11 JDK, if it is installed.
|
||||||
|
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
|
||||||
|
# Where did we install the Android SDK?
|
||||||
|
export ANDROID_SDK_ROOT=$HOME/android-sdk/android-sdk-linux/
|
||||||
|
```
|
||||||
|
|
||||||
|
If we don't have the Android SDK, we can install it thusly on Linux:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
mkdir -p $HOME/android-sdk/android-sdk-linux
|
||||||
|
cd $HOME/android-sdk/android-sdk-linux
|
||||||
|
mkdir -p licenses
|
||||||
|
echo "8933bad161af4178b1185d1a37fbf41ea5269c55" >> licenses/android-sdk-license
|
||||||
|
echo "d56f5187479451eabf01fb78af6dfcb131a6481e" >> licenses/android-sdk-license
|
||||||
|
echo "24333f8a63b6825ea9c5514f83c2829b004d1fee" >> licenses/android-sdk-license
|
||||||
|
mkdir cmdline-tools
|
||||||
|
cd cmdline-tools
|
||||||
|
wget "$(curl -s https://developer.android.com/studio | grep -oP "https://dl.google.com/android/repository/commandlinetools-linux-[0-9]+_latest.zip")"
|
||||||
|
unzip commandlinetools-linux-*_latest.zip
|
||||||
|
cd ..
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Clone the project.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone --recursive https://github.com/fork-maintainers/iceraven-browser
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Go inside `iceraven-browser`. That's where the build is coordinated from.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd iceraven-browser
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Configure the project. For your personal use you need to sign the apk file. The simplest way to do this is to use the debug key that is auto-generated by Android SDK. This is not a great idea for releasing, but acceptable for your personal use. You can configure it as follows:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
echo "autosignReleaseWithDebugKey=" >> local.properties
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Build the project. To build the Iceraven-branded release APKs, you can do:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./gradlew app:assemblefenixForkRelease -PversionName="$(git describe --tags HEAD)"
|
||||||
|
```
|
||||||
|
|
||||||
|
(If you don't use the `app:` prefix, you might get complaints about the build system being `unable to locate the objcopy executable`.)
|
||||||
|
|
||||||
|
The APKs will show up in `app/build/outputs/apk/fenix/forkRelease/`.
|
||||||
|
|
||||||
|
## Getting Involved
|
||||||
|
|
||||||
|
This is an all-volunteer project. No one is getting paid (at least not by the project itself.).
|
||||||
|
|
||||||
|
Therefore, everyone should feel free to open issues and pull requests. Join the club!
|
||||||
|
|
||||||
|
Developers are especially welcome, wanted, and needed.
|
||||||
|
|
||||||
|
## I want to open a Pull Request!
|
||||||
|
|
||||||
|
We encourage you to participate in this open source project. We love Pull Requests, Bug Reports, ideas, (security) code reviews or any other kind of positive contribution.
|
||||||
|
|
||||||
|
### How to Appease the Linter
|
||||||
|
|
||||||
|
If you are getting errors form `./gradelw ktlint`, try running `./gradlew ktlintFormat` to let `ktlint` decide how to lay out your code, instead of just yelling at you that you can't read its mind.
|
||||||
|
|
||||||
|
### 🙅 How to skip CI checks for PRs 🙅
|
||||||
|
|
||||||
|
If you want to skip Github CI checks in a PR, please add the following to the PR title exactly: `[skip ci]`.
|
||||||
|
Also, please include the exact phrase `[skip ci]` in every commit message. This is to avoid Travis CI checks as well as skipping Github CI checks after merging the commits to the `fork` branch.
|
||||||
|
|
||||||
|
This is useful to do **if** you are sure that your changes do not effect the app's code (ex: changes to `README.md`).
|
||||||
|
|
||||||
|
## 🚀 Release automation 🚀
|
||||||
|
|
||||||
|
We have now setup release automation so that Github actions automatically trigger a release build and publish a release when we push a tag to the repository.
|
||||||
|
|
||||||
|
**NOTE**: The tag should be of the format `iceraven-x.y.z`, where `x.y.z` is the release version, for the automation to kick in and also so that the built app will have the correct version name.
|
||||||
|
|
||||||
|
## ✏️ I want to file an issue!
|
||||||
|
|
||||||
|
Great! We encourage you to participate in this open source project. We love Pull Requests, Bug Reports, ideas, (security) code reviews or any other kind of positive contribution.
|
||||||
|
|
||||||
|
To make it easier to triage, we have these issue requirements:
|
||||||
|
|
||||||
|
* Please do your best to search for duplicate issues before filing a new issue so we can keep our issue board clean.
|
||||||
|
* Every issue should have **exactly** one bug/feature request described in it. Please do not file meta feedback list tickets as it is difficult to parse them and address their individual points.
|
||||||
|
* Feature Requests are better when they’re open-ended instead of demanding a specific solution -ie “I want an easier way to do X” instead of “add Y”
|
||||||
|
* Issues are not the place to go off topic or debate.
|
||||||
|
* While we do not yet have Community Participation Guidelines of our own, we ask that you show respect to everyone and treat others as you would like to be treated. Behavior that would violate [Mozilla's Community Participation Guidelines](https://www.mozilla.org/en-US/about/governance/policies/participation/) is almost certainly unwelcome. However, as a small project without community managers, we cannot promise prompt and consistent enforcement.
|
||||||
|
|
||||||
|
Please keep in mind that even though a feature you have in mind may seem like a small ask, as a small team, we have to prioritize our planned work and every new feature adds complexity and maintenance and may take up design, research, product, and engineering time. We appreciate everyone’s passion but we will not be able to incorporate every feature request or even fix every bug. That being said, just because we haven't replied, doesn't mean we don't care about the issue, please be patient with our response times as we're very busy.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,9 @@ juno-onboarding:
|
||||||
cards:
|
cards:
|
||||||
type: json
|
type: json
|
||||||
description: Collection of user facing onboarding cards.
|
description: Collection of user facing onboarding cards.
|
||||||
|
conditions:
|
||||||
|
type: json
|
||||||
|
description: "A collection of out the box conditional expressions to be used in determining whether a card should show or not. Each entry maps to a valid JEXL expression.\n"
|
||||||
messaging:
|
messaging:
|
||||||
description: "The in-app messaging system.\n"
|
description: "The in-app messaging system.\n"
|
||||||
hasExposure: true
|
hasExposure: true
|
||||||
|
|
2610
app/github.txt
2610
app/github.txt
File diff suppressed because it is too large
Load Diff
359
app/metrics.yaml
359
app/metrics.yaml
|
@ -7489,6 +7489,25 @@ first_session:
|
||||||
- Performance
|
- Performance
|
||||||
- Attribution
|
- Attribution
|
||||||
play_store_attribution:
|
play_store_attribution:
|
||||||
|
install_referrer_response:
|
||||||
|
type: text
|
||||||
|
send_in_pings:
|
||||||
|
- first-session
|
||||||
|
description: |
|
||||||
|
The full install referrer response.
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1862737
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/firefox-android/pull/4343
|
||||||
|
data_sensitivity:
|
||||||
|
# - technical
|
||||||
|
- web_activity # This is a workaround so we can use Text type for technical data.
|
||||||
|
notification_emails:
|
||||||
|
- android-probes@mozilla.com
|
||||||
|
expires: never
|
||||||
|
metadata:
|
||||||
|
tags:
|
||||||
|
- Attribution
|
||||||
source:
|
source:
|
||||||
type: string
|
type: string
|
||||||
send_in_pings:
|
send_in_pings:
|
||||||
|
@ -7611,6 +7630,80 @@ play_store_attribution:
|
||||||
tags:
|
tags:
|
||||||
- Attribution
|
- Attribution
|
||||||
- Performance
|
- Performance
|
||||||
|
meta_attribution:
|
||||||
|
app:
|
||||||
|
type: string
|
||||||
|
send_in_pings:
|
||||||
|
- first-session
|
||||||
|
description: |
|
||||||
|
The mobile application ID in Meta's attribution.
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1860133
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/firefox-android/pull/4171
|
||||||
|
data_sensitivity:
|
||||||
|
- technical
|
||||||
|
notification_emails:
|
||||||
|
- android-probes@mozilla.com
|
||||||
|
expires: never
|
||||||
|
metadata:
|
||||||
|
tags:
|
||||||
|
- Attribution
|
||||||
|
t:
|
||||||
|
type: string
|
||||||
|
send_in_pings:
|
||||||
|
- first-session
|
||||||
|
description: |
|
||||||
|
Value tracking user interaction with Meta attribution.
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1860133
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/firefox-android/pull/4171
|
||||||
|
data_sensitivity:
|
||||||
|
- technical
|
||||||
|
notification_emails:
|
||||||
|
- android-probes@mozilla.com
|
||||||
|
expires: never
|
||||||
|
metadata:
|
||||||
|
tags:
|
||||||
|
- Attribution
|
||||||
|
data:
|
||||||
|
type: text
|
||||||
|
send_in_pings:
|
||||||
|
- first-session
|
||||||
|
description: |
|
||||||
|
The Meta attribution data in encrypted format.
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1860133
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/firefox-android/pull/4171
|
||||||
|
data_sensitivity:
|
||||||
|
# - technical
|
||||||
|
- web_activity # This is a workaround so we can use Text type for technical data.
|
||||||
|
notification_emails:
|
||||||
|
- android-probes@mozilla.com
|
||||||
|
expires: never
|
||||||
|
metadata:
|
||||||
|
tags:
|
||||||
|
- Attribution
|
||||||
|
nonce:
|
||||||
|
type: string
|
||||||
|
send_in_pings:
|
||||||
|
- first-session
|
||||||
|
description: |
|
||||||
|
Nonce used to decrypt the encrypted Meta attribution data.
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1860133
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/firefox-android/pull/4171
|
||||||
|
data_sensitivity:
|
||||||
|
- technical
|
||||||
|
notification_emails:
|
||||||
|
- android-probes@mozilla.com
|
||||||
|
expires: never
|
||||||
|
metadata:
|
||||||
|
tags:
|
||||||
|
- Attribution
|
||||||
browser.search:
|
browser.search:
|
||||||
with_ads:
|
with_ads:
|
||||||
type: labeled_counter
|
type: labeled_counter
|
||||||
|
@ -8296,27 +8389,10 @@ autoplay:
|
||||||
- SitePermissions
|
- SitePermissions
|
||||||
|
|
||||||
cookie_banners:
|
cookie_banners:
|
||||||
visited_setting:
|
setting_changed_pmb:
|
||||||
type: event
|
|
||||||
description: A user visited the cookie banner handling screen
|
|
||||||
bugs:
|
|
||||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1796146
|
|
||||||
data_reviews:
|
|
||||||
- https://github.com/mozilla-mobile/fenix/pull/27561
|
|
||||||
- https://github.com/mozilla-mobile/firefox-android/pull/2597
|
|
||||||
- https://github.com/mozilla-mobile/firefox-android/pull/4039
|
|
||||||
data_sensitivity:
|
|
||||||
- interaction
|
|
||||||
notification_emails:
|
|
||||||
- android-probes@mozilla.com
|
|
||||||
expires: never
|
|
||||||
metadata:
|
|
||||||
tags:
|
|
||||||
- Privacy&Security
|
|
||||||
setting_changed:
|
|
||||||
type: event
|
type: event
|
||||||
description: |
|
description: |
|
||||||
A user changed their setting.
|
A user changed their setting in private mode.
|
||||||
extra_keys:
|
extra_keys:
|
||||||
cookie_banner_setting:
|
cookie_banner_setting:
|
||||||
description: |
|
description: |
|
||||||
|
@ -8392,80 +8468,6 @@ cookie_banners:
|
||||||
metadata:
|
metadata:
|
||||||
tags:
|
tags:
|
||||||
- Privacy&Security
|
- Privacy&Security
|
||||||
visited_re_engagement_dialog:
|
|
||||||
type: event
|
|
||||||
description: An user visited the cookie banner re-engagement dialog
|
|
||||||
bugs:
|
|
||||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1797593
|
|
||||||
data_reviews:
|
|
||||||
- https://github.com/mozilla-mobile/fenix/pull/28405#issuecomment-1372489596
|
|
||||||
- https://github.com/mozilla-mobile/firefox-android/pull/2597
|
|
||||||
- https://github.com/mozilla-mobile/firefox-android/pull/4039
|
|
||||||
data_sensitivity:
|
|
||||||
- interaction
|
|
||||||
notification_emails:
|
|
||||||
- android-probes@mozilla.com
|
|
||||||
expires: never
|
|
||||||
metadata:
|
|
||||||
tags:
|
|
||||||
- Privacy&Security
|
|
||||||
opt_out_re_engagement_dialog:
|
|
||||||
type: event
|
|
||||||
description: |
|
|
||||||
An user opt out the cookie banner re-engagement
|
|
||||||
dialog by clicking the X button
|
|
||||||
bugs:
|
|
||||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1797593
|
|
||||||
data_reviews:
|
|
||||||
- https://github.com/mozilla-mobile/fenix/pull/28405#issuecomment-1372489596
|
|
||||||
- https://github.com/mozilla-mobile/firefox-android/pull/2597
|
|
||||||
- https://github.com/mozilla-mobile/firefox-android/pull/4039
|
|
||||||
data_sensitivity:
|
|
||||||
- interaction
|
|
||||||
notification_emails:
|
|
||||||
- android-probes@mozilla.com
|
|
||||||
expires: never
|
|
||||||
metadata:
|
|
||||||
tags:
|
|
||||||
- Privacy&Security
|
|
||||||
not_now_re_engagement_dialog:
|
|
||||||
type: event
|
|
||||||
description: |
|
|
||||||
An user clicked the not now button on
|
|
||||||
the cookie banner re-engagement dialog
|
|
||||||
bugs:
|
|
||||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1797593
|
|
||||||
data_reviews:
|
|
||||||
- https://github.com/mozilla-mobile/fenix/pull/28405#issuecomment-1372489596
|
|
||||||
- https://github.com/mozilla-mobile/firefox-android/pull/2597
|
|
||||||
- https://github.com/mozilla-mobile/firefox-android/pull/4039
|
|
||||||
data_sensitivity:
|
|
||||||
- interaction
|
|
||||||
notification_emails:
|
|
||||||
- android-probes@mozilla.com
|
|
||||||
expires: never
|
|
||||||
metadata:
|
|
||||||
tags:
|
|
||||||
- Privacy&Security
|
|
||||||
allow_re_engagement_dialog:
|
|
||||||
type: event
|
|
||||||
description: |
|
|
||||||
An user clicked the dismiss banner button
|
|
||||||
on the cookie banner re-engagement dialog
|
|
||||||
bugs:
|
|
||||||
- https://bugzilla.mozilla.org/show_bug.cgi?id=1797593
|
|
||||||
data_reviews:
|
|
||||||
- https://github.com/mozilla-mobile/fenix/pull/28405#issuecomment-1372489596
|
|
||||||
- https://github.com/mozilla-mobile/firefox-android/pull/2597
|
|
||||||
- https://github.com/mozilla-mobile/firefox-android/pull/4039
|
|
||||||
data_sensitivity:
|
|
||||||
- interaction
|
|
||||||
notification_emails:
|
|
||||||
- android-probes@mozilla.com
|
|
||||||
expires: never
|
|
||||||
metadata:
|
|
||||||
tags:
|
|
||||||
- Privacy&Security
|
|
||||||
report_site_domain:
|
report_site_domain:
|
||||||
type: url
|
type: url
|
||||||
description: |
|
description: |
|
||||||
|
@ -8528,7 +8530,38 @@ cookie_banners:
|
||||||
metadata:
|
metadata:
|
||||||
tags:
|
tags:
|
||||||
- Privacy&Security
|
- Privacy&Security
|
||||||
|
cfr_shown:
|
||||||
|
type: event
|
||||||
|
description: The cookie banner cfr has been shown
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1859393
|
||||||
|
data_reviews:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1859393#c2
|
||||||
|
data_sensitivity:
|
||||||
|
- interaction
|
||||||
|
notification_emails:
|
||||||
|
- android-probes@mozilla.com
|
||||||
|
expires: never
|
||||||
|
metadata:
|
||||||
|
tags:
|
||||||
|
- Privacy&Security
|
||||||
|
cfr_dismissal:
|
||||||
|
type: event
|
||||||
|
description: |
|
||||||
|
The cookie banners CFR was dismissed by the user by interacting
|
||||||
|
with the outside of the popup
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1859393
|
||||||
|
data_reviews:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1859393#c2
|
||||||
|
data_sensitivity:
|
||||||
|
- interaction
|
||||||
|
notification_emails:
|
||||||
|
- android-probes@mozilla.com
|
||||||
|
expires: never
|
||||||
|
metadata:
|
||||||
|
tags:
|
||||||
|
- Privacy&Security
|
||||||
site_permissions:
|
site_permissions:
|
||||||
prompt_shown:
|
prompt_shown:
|
||||||
type: event
|
type: event
|
||||||
|
@ -10812,6 +10845,126 @@ shopping:
|
||||||
metadata:
|
metadata:
|
||||||
tags:
|
tags:
|
||||||
- Shopping
|
- Shopping
|
||||||
|
surface_stale_analysis_shown:
|
||||||
|
type: event
|
||||||
|
description: |
|
||||||
|
Records an event when the "New info to check" card is shown.
|
||||||
|
send_in_pings:
|
||||||
|
- events
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1862776
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/firefox-android/pull/4379#issuecomment-1794925138
|
||||||
|
data_sensitivity:
|
||||||
|
- interaction
|
||||||
|
notification_emails:
|
||||||
|
- android-probes@mozilla.com
|
||||||
|
expires: never
|
||||||
|
metadata:
|
||||||
|
tags:
|
||||||
|
- Shopping
|
||||||
|
surface_ads_impression:
|
||||||
|
type: event
|
||||||
|
description: |
|
||||||
|
The user viewed an ad in review checker for at least 1.5 seconds.
|
||||||
|
send_in_pings:
|
||||||
|
- events
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1865854
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/firefox-android/pull/4604#issuecomment-1827890623
|
||||||
|
data_sensitivity:
|
||||||
|
- interaction
|
||||||
|
notification_emails:
|
||||||
|
- android-probes@mozilla.com
|
||||||
|
expires: never
|
||||||
|
metadata:
|
||||||
|
tags:
|
||||||
|
- Shopping
|
||||||
|
surface_ads_clicked:
|
||||||
|
type: event
|
||||||
|
description: |
|
||||||
|
The user clicked an ad in review checker.
|
||||||
|
send_in_pings:
|
||||||
|
- events
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1865854
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/firefox-android/pull/4604#issuecomment-1827890623
|
||||||
|
data_sensitivity:
|
||||||
|
- interaction
|
||||||
|
notification_emails:
|
||||||
|
- android-probes@mozilla.com
|
||||||
|
expires: never
|
||||||
|
metadata:
|
||||||
|
tags:
|
||||||
|
- Shopping
|
||||||
|
surface_ads_setting_toggled:
|
||||||
|
type: event
|
||||||
|
description: |
|
||||||
|
The user toggled the ads display setting.
|
||||||
|
send_in_pings:
|
||||||
|
- events
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1865854
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/firefox-android/pull/4604#issuecomment-1827890623
|
||||||
|
data_sensitivity:
|
||||||
|
- interaction
|
||||||
|
notification_emails:
|
||||||
|
- android-probes@mozilla.com
|
||||||
|
expires: never
|
||||||
|
extra_keys:
|
||||||
|
action:
|
||||||
|
type: string
|
||||||
|
description: |
|
||||||
|
Whether the toggle was used to enable or disable ads. Possible values
|
||||||
|
are `enabled` and `disabled`.
|
||||||
|
metadata:
|
||||||
|
tags:
|
||||||
|
- Shopping
|
||||||
|
ads_exposure:
|
||||||
|
type: event
|
||||||
|
description: |
|
||||||
|
On a supported product page, the review checker showed analysis,
|
||||||
|
and the ads exposure pref was enabled, or review checker ads were enabled,
|
||||||
|
and when we tried to fetch an ad from the ad server, an ad was available.
|
||||||
|
Does not indicate whether the ad was actually shown.
|
||||||
|
send_in_pings:
|
||||||
|
- events
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1866992
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/firefox-android/pull/4622#issuecomment-1829905076
|
||||||
|
data_sensitivity:
|
||||||
|
- interaction
|
||||||
|
notification_emails:
|
||||||
|
- android-probes@mozilla.com
|
||||||
|
expires: never
|
||||||
|
metadata:
|
||||||
|
tags:
|
||||||
|
- Shopping
|
||||||
|
surface_no_ads_available:
|
||||||
|
type: event
|
||||||
|
description: |
|
||||||
|
On a supported product page, the review checker
|
||||||
|
showed analysis, and review checker ads were enabled,
|
||||||
|
but when we tried to fetch an ad from the ad server,
|
||||||
|
no ad was available.
|
||||||
|
send_in_pings:
|
||||||
|
- events
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1866992
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/firefox-android/pull/4622#issuecomment-1829905076
|
||||||
|
data_sensitivity:
|
||||||
|
- interaction
|
||||||
|
notification_emails:
|
||||||
|
- android-probes@mozilla.com
|
||||||
|
expires: never
|
||||||
|
metadata:
|
||||||
|
tags:
|
||||||
|
- Shopping
|
||||||
|
|
||||||
shopping.settings:
|
shopping.settings:
|
||||||
component_opted_out:
|
component_opted_out:
|
||||||
|
@ -10871,6 +11024,24 @@ shopping.settings:
|
||||||
metadata:
|
metadata:
|
||||||
tags:
|
tags:
|
||||||
- Shopping
|
- Shopping
|
||||||
|
disabled_ads:
|
||||||
|
type: boolean
|
||||||
|
description: |
|
||||||
|
Indicates if the user has disabled ads.
|
||||||
|
send_in_pings:
|
||||||
|
- metrics
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1865854
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/firefox-android/pull/4604#issuecomment-1827890623
|
||||||
|
data_sensitivity:
|
||||||
|
- interaction
|
||||||
|
notification_emails:
|
||||||
|
- android-probes@mozilla.com
|
||||||
|
expires: never
|
||||||
|
metadata:
|
||||||
|
tags:
|
||||||
|
- Shopping
|
||||||
fx_suggest:
|
fx_suggest:
|
||||||
ping_type:
|
ping_type:
|
||||||
type: string
|
type: string
|
||||||
|
|
|
@ -234,7 +234,38 @@ features:
|
||||||
"jump-back-in-cfr": true,
|
"jump-back-in-cfr": true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
query-parameter-stripping:
|
||||||
|
description: Features for query parameter stripping.
|
||||||
|
variables:
|
||||||
|
sections-enabled:
|
||||||
|
description: "This property provides a lookup table of whether or not the given section should be enabled."
|
||||||
|
type: Map<QueryParameterStrippingSection, String>
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
"query-parameter-stripping": "0",
|
||||||
|
"query-parameter-stripping-pmb": "0",
|
||||||
|
"query-parameter-stripping-allow-list": "",
|
||||||
|
"query-parameter-stripping-strip-list": "",
|
||||||
|
}
|
||||||
|
defaults:
|
||||||
|
- channel: developer
|
||||||
|
value: {
|
||||||
|
"sections-enabled": {
|
||||||
|
"query-parameter-stripping": "0",
|
||||||
|
"query-parameter-stripping-pmb": "0",
|
||||||
|
"query-parameter-stripping-allow-list": "",
|
||||||
|
"query-parameter-stripping-strip-list": "",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- channel: nightly
|
||||||
|
value: {
|
||||||
|
"sections-enabled": {
|
||||||
|
"query-parameter-stripping": "0",
|
||||||
|
"query-parameter-stripping-pmb": "0",
|
||||||
|
"query-parameter-stripping-allow-list": "",
|
||||||
|
"query-parameter-stripping-strip-list": "",
|
||||||
|
}
|
||||||
|
}
|
||||||
cookie-banners:
|
cookie-banners:
|
||||||
description: Features for cookie banner handling.
|
description: Features for cookie banner handling.
|
||||||
variables:
|
variables:
|
||||||
|
@ -245,8 +276,10 @@ features:
|
||||||
{
|
{
|
||||||
"feature-ui": 0,
|
"feature-ui": 0,
|
||||||
"feature-setting-value": 0,
|
"feature-setting-value": 0,
|
||||||
"dialog-re-engage-time": 4,
|
"feature-setting-value-pbm": 0,
|
||||||
"feature-setting-value-pbm": 0
|
"feature-setting-detect-only": 0,
|
||||||
|
"feature-setting-global-rules": 0,
|
||||||
|
"feature-setting-global-rules-sub-frames": 0,
|
||||||
}
|
}
|
||||||
defaults:
|
defaults:
|
||||||
- channel: developer
|
- channel: developer
|
||||||
|
@ -254,8 +287,10 @@ features:
|
||||||
"sections-enabled": {
|
"sections-enabled": {
|
||||||
"feature-ui": 1,
|
"feature-ui": 1,
|
||||||
"feature-setting-value": 0,
|
"feature-setting-value": 0,
|
||||||
"dialog-re-engage-time": 4,
|
"feature-setting-value-pbm": 1,
|
||||||
"feature-setting-value-pbm": 0
|
"feature-setting-detect-only": 0,
|
||||||
|
"feature-setting-global-rules": 0,
|
||||||
|
"feature-setting-global-rules-sub-frames": 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
- channel: nightly
|
- channel: nightly
|
||||||
|
@ -263,8 +298,21 @@ features:
|
||||||
"sections-enabled": {
|
"sections-enabled": {
|
||||||
"feature-ui": 1,
|
"feature-ui": 1,
|
||||||
"feature-setting-value": 0,
|
"feature-setting-value": 0,
|
||||||
"dialog-re-engage-time": 4,
|
"feature-setting-value-pbm": 1,
|
||||||
"feature-setting-value-pbm": 0
|
"feature-setting-detect-only": 0,
|
||||||
|
"feature-setting-global-rules": 0,
|
||||||
|
"feature-setting-global-rules-sub-frames": 0,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- channel: beta
|
||||||
|
value: {
|
||||||
|
"sections-enabled": {
|
||||||
|
"feature-ui": 1,
|
||||||
|
"feature-setting-value": 0,
|
||||||
|
"feature-setting-value-pbm": 1,
|
||||||
|
"feature-setting-detect-only": 0,
|
||||||
|
"feature-setting-global-rules": 0,
|
||||||
|
"feature-setting-global-rules-sub-frames": 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unified-search:
|
unified-search:
|
||||||
|
@ -359,10 +407,16 @@ features:
|
||||||
description: if true, recommended products feature is enabled to be shown to the user based on their preference.
|
description: if true, recommended products feature is enabled to be shown to the user based on their preference.
|
||||||
type: Boolean
|
type: Boolean
|
||||||
default: false
|
default: false
|
||||||
|
product-recommendations-exposure:
|
||||||
|
description: if true, we want to record recommended products inventory for opted-in users, even if product recommendations are disabled.
|
||||||
|
type: Boolean
|
||||||
|
default: false
|
||||||
defaults:
|
defaults:
|
||||||
- channel: developer
|
- channel: developer
|
||||||
value:
|
value:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
product-recommendations: true
|
||||||
|
product-recommendations-exposure: true
|
||||||
|
|
||||||
print:
|
print:
|
||||||
description: A feature for printing from the share or browser menu.
|
description: A feature for printing from the share or browser menu.
|
||||||
|
@ -461,13 +515,38 @@ types:
|
||||||
feature-setting-value:
|
feature-setting-value:
|
||||||
description: An integer either 0 or 1 indicating if cookie banner setting should be enabled or disabled,
|
description: An integer either 0 or 1 indicating if cookie banner setting should be enabled or disabled,
|
||||||
0 for setting the value to disabled, 1 for enabling the setting with the value reject_all.
|
0 for setting the value to disabled, 1 for enabling the setting with the value reject_all.
|
||||||
dialog-re-engage-time:
|
|
||||||
description: An integer indicating the number of hours that needs to happen before
|
|
||||||
the re-engagement dialog shows again since the last seen, for example if set to 4
|
|
||||||
that means if the users has seen the dialog, it will see it 4 hours later.
|
|
||||||
feature-setting-value-pbm:
|
feature-setting-value-pbm:
|
||||||
description: An integer either 0 or 1 indicating if cookie banner setting should be enabled or disabled,
|
description: An integer either 0 or 1 indicating if cookie banner setting should be enabled or disabled,
|
||||||
0 for setting the value to disabled, 1 for enabling the setting with the value reject_all.
|
0 for setting the value to disabled, 1 for enabling the setting with the value reject_all.
|
||||||
|
feature-setting-detect-only:
|
||||||
|
description: An integer either 0 or 1 indicating if cookie banner detect only mode
|
||||||
|
should be enabled or disabled. 0 for setting to be disabled, and 1 for enabling the setting.
|
||||||
|
feature-setting-global-rules:
|
||||||
|
description: An integer either 0 or 1 indicating if cookie banner global rules
|
||||||
|
should be enabled or disabled. 0 for setting to be disabled, and 1 for enabling the setting.
|
||||||
|
feature-setting-global-rules-sub-frames:
|
||||||
|
description: An integer either 0 or 1 indicating if cookie banner global rules sub-frames
|
||||||
|
should be enabled or disabled. 0 for setting to be disabled, and 1 for enabling the setting.
|
||||||
|
|
||||||
|
QueryParameterStrippingSection:
|
||||||
|
description: The identifiers for the options for the Query Parameter Stripping feature.
|
||||||
|
variants:
|
||||||
|
query-parameter-stripping:
|
||||||
|
description: An integer either 0 or 1 indicating if query parameter stripping
|
||||||
|
should be enabled or disabled in normal mode. 0 for setting to be disabled,
|
||||||
|
and 1 for enabling the setting.
|
||||||
|
query-parameter-stripping-pmb:
|
||||||
|
description: An integer either 0 or 1 indicating if query parameter stripping
|
||||||
|
should be enabled or disabled in private mode. 0 for setting to be disabled,
|
||||||
|
and 1 for enabling the setting.
|
||||||
|
query-parameter-stripping-allow-list:
|
||||||
|
description: An string separated by commas indicating the sites where should
|
||||||
|
from query stripping should be exempted.
|
||||||
|
query-parameter-stripping-strip-list:
|
||||||
|
description: An string separated by commas indicating the list of query params
|
||||||
|
to be stripped from URIs. This list will be merged with records
|
||||||
|
coming from RemoteSettings.
|
||||||
|
|
||||||
OnboardingPanel:
|
OnboardingPanel:
|
||||||
description: The types of onboarding panels in the onboarding page
|
description: The types of onboarding panels in the onboarding page
|
||||||
variants:
|
variants:
|
||||||
|
|
|
@ -5,6 +5,16 @@ features:
|
||||||
description: A feature that shows juno onboarding flow.
|
description: A feature that shows juno onboarding flow.
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
|
conditions:
|
||||||
|
description: >
|
||||||
|
A collection of out the box conditional expressions to be
|
||||||
|
used in determining whether a card should show or not.
|
||||||
|
Each entry maps to a valid JEXL expression.
|
||||||
|
type: Map<String, String>
|
||||||
|
default: {
|
||||||
|
ALWAYS: "true",
|
||||||
|
NEVER: "false"
|
||||||
|
}
|
||||||
cards:
|
cards:
|
||||||
description: Collection of user facing onboarding cards.
|
description: Collection of user facing onboarding cards.
|
||||||
type: Map<String, OnboardingCardData>
|
type: Map<String, OnboardingCardData>
|
||||||
|
@ -98,6 +108,20 @@ objects:
|
||||||
description: The text to display on the secondary button.
|
description: The text to display on the secondary button.
|
||||||
# This should never be defaulted.
|
# This should never be defaulted.
|
||||||
default: ""
|
default: ""
|
||||||
|
prerequisites:
|
||||||
|
type: List<String>
|
||||||
|
description: >
|
||||||
|
A list of strings corresponding to targeting expressions.
|
||||||
|
The card will be shown if all expressions are `true` and if
|
||||||
|
no expressions in the `disqualifiers` table are true, or
|
||||||
|
if the `disqualifiers` table is empty.
|
||||||
|
default: [ ALWAYS ]
|
||||||
|
disqualifiers:
|
||||||
|
type: List<String>
|
||||||
|
description: >
|
||||||
|
A list of strings corresponding to targeting expressions.
|
||||||
|
The card will not be shown if any expression is `true`.
|
||||||
|
default: [ NEVER ]
|
||||||
|
|
||||||
enums:
|
enums:
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
package org.mozilla.fenix.components
|
package org.mozilla.fenix.components
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import mozilla.components.service.fxa.ServerConfig
|
import mozilla.appservices.fxaclient.FxaConfig
|
||||||
import mozilla.components.service.fxa.ServerConfig.Server
|
import mozilla.appservices.fxaclient.FxaServer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility to configure Firefox Account stage servers.
|
* Utility to configure Firefox Account stage servers.
|
||||||
|
@ -17,7 +17,7 @@ object FxaServer {
|
||||||
private const val REDIRECT_URL = "urn:ietf:wg:oauth:2.0:oob:oauth-redirect-webchannel"
|
private const val REDIRECT_URL = "urn:ietf:wg:oauth:2.0:oob:oauth-redirect-webchannel"
|
||||||
|
|
||||||
@Suppress("UNUSED_PARAMETER")
|
@Suppress("UNUSED_PARAMETER")
|
||||||
fun config(context: Context): ServerConfig {
|
fun config(context: Context): FxaConfig {
|
||||||
return ServerConfig(Server.STAGE, CLIENT_ID, REDIRECT_URL)
|
return FxaConfig(FxaServer.Stage, CLIENT_ID, REDIRECT_URL)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,8 @@ class GenericExperimentIntegrationTest {
|
||||||
TestHelper.appContext.settings().showSecretDebugMenuThisSession = false
|
TestHelper.appContext.settings().showSecretDebugMenuThisSession = false
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun disableStudiesViaStudiesToggle() {
|
@Test
|
||||||
|
fun disableStudiesViaStudiesToggle() {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
}.openSettings {
|
}.openSettings {
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
[[source]]
|
[[source]]
|
||||||
url = "https://pypi.python.org/simple"
|
url = "https://pypi.python.org/simple"
|
||||||
verify_ssl = true
|
verify_ssl = true
|
||||||
name = "pypi"
|
name = "pypi"
|
||||||
|
|
||||||
[packages]
|
[packages]
|
||||||
|
pydantic = "*"
|
||||||
pytest = "*"
|
pytest = "*"
|
||||||
pytest-html = "*"
|
pytest-html = "*"
|
||||||
pytest-metadata = "*"
|
pytest-metadata = "*"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"hash": {
|
"hash": {
|
||||||
"sha256": "53501c7e751ae79697bf8c7289b6095f49fed97242fe186fea42989e800c39d5"
|
"sha256": "6dae5ac51aa7817578a25597da1ef783475050538443ba344c88a78969e68fd9"
|
||||||
},
|
},
|
||||||
"pipfile-spec": 6,
|
"pipfile-spec": 6,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -16,6 +16,14 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
|
"annotated-types": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43",
|
||||||
|
"sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"
|
||||||
|
],
|
||||||
|
"markers": "python_version >= '3.8'",
|
||||||
|
"version": "==0.6.0"
|
||||||
|
},
|
||||||
"certifi": {
|
"certifi": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082",
|
"sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082",
|
||||||
|
@ -226,23 +234,144 @@
|
||||||
"markers": "python_version >= '3.8'",
|
"markers": "python_version >= '3.8'",
|
||||||
"version": "==1.3.0"
|
"version": "==1.3.0"
|
||||||
},
|
},
|
||||||
"pytest": {
|
"pydantic": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:2f2301e797521b23e4d2585a0a3d7b5e50fdddaaf7e7d6773ea26ddb17c213ab",
|
"sha256:94f336138093a5d7f426aac732dcfe7ab4eb4da243c88f891d65deb4a2556ee7",
|
||||||
"sha256:460c9a59b14e27c602eb5ece2e47bec99dc5fc5f6513cf924a7d03a578991b1f"
|
"sha256:bc3ddf669d234f4220e6e1c4d96b061abe0998185a8d7855c0126782b7abc8c1"
|
||||||
],
|
],
|
||||||
"index": "pypi",
|
"index": "pypi",
|
||||||
"markers": "python_version >= '3.7'",
|
"markers": "python_version >= '3.7'",
|
||||||
"version": "==7.4.1"
|
"version": "==2.4.2"
|
||||||
|
},
|
||||||
|
"pydantic-core": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:042462d8d6ba707fd3ce9649e7bf268633a41018d6a998fb5fbacb7e928a183e",
|
||||||
|
"sha256:0523aeb76e03f753b58be33b26540880bac5aa54422e4462404c432230543f33",
|
||||||
|
"sha256:05560ab976012bf40f25d5225a58bfa649bb897b87192a36c6fef1ab132540d7",
|
||||||
|
"sha256:0675ba5d22de54d07bccde38997e780044dcfa9a71aac9fd7d4d7a1d2e3e65f7",
|
||||||
|
"sha256:073d4a470b195d2b2245d0343569aac7e979d3a0dcce6c7d2af6d8a920ad0bea",
|
||||||
|
"sha256:07ec6d7d929ae9c68f716195ce15e745b3e8fa122fc67698ac6498d802ed0fa4",
|
||||||
|
"sha256:0880e239827b4b5b3e2ce05e6b766a7414e5f5aedc4523be6b68cfbc7f61c5d0",
|
||||||
|
"sha256:0c27f38dc4fbf07b358b2bc90edf35e82d1703e22ff2efa4af4ad5de1b3833e7",
|
||||||
|
"sha256:0d8a8adef23d86d8eceed3e32e9cca8879c7481c183f84ed1a8edc7df073af94",
|
||||||
|
"sha256:0e2a35baa428181cb2270a15864ec6286822d3576f2ed0f4cd7f0c1708472aff",
|
||||||
|
"sha256:0f8682dbdd2f67f8e1edddcbffcc29f60a6182b4901c367fc8c1c40d30bb0a82",
|
||||||
|
"sha256:0fa467fd300a6f046bdb248d40cd015b21b7576c168a6bb20aa22e595c8ffcdd",
|
||||||
|
"sha256:128552af70a64660f21cb0eb4876cbdadf1a1f9d5de820fed6421fa8de07c893",
|
||||||
|
"sha256:1396e81b83516b9d5c9e26a924fa69164156c148c717131f54f586485ac3c15e",
|
||||||
|
"sha256:149b8a07712f45b332faee1a2258d8ef1fb4a36f88c0c17cb687f205c5dc6e7d",
|
||||||
|
"sha256:14ac492c686defc8e6133e3a2d9eaf5261b3df26b8ae97450c1647286750b901",
|
||||||
|
"sha256:14cfbb00959259e15d684505263d5a21732b31248a5dd4941f73a3be233865b9",
|
||||||
|
"sha256:14e09ff0b8fe6e46b93d36a878f6e4a3a98ba5303c76bb8e716f4878a3bee92c",
|
||||||
|
"sha256:154ea7c52e32dce13065dbb20a4a6f0cc012b4f667ac90d648d36b12007fa9f7",
|
||||||
|
"sha256:15d6bca84ffc966cc9976b09a18cf9543ed4d4ecbd97e7086f9ce9327ea48891",
|
||||||
|
"sha256:1d40f55222b233e98e3921df7811c27567f0e1a4411b93d4c5c0f4ce131bc42f",
|
||||||
|
"sha256:25bd966103890ccfa028841a8f30cebcf5875eeac8c4bde4fe221364c92f0c9a",
|
||||||
|
"sha256:2cf5bb4dd67f20f3bbc1209ef572a259027c49e5ff694fa56bed62959b41e1f9",
|
||||||
|
"sha256:2e0e2959ef5d5b8dc9ef21e1a305a21a36e254e6a34432d00c72a92fdc5ecda5",
|
||||||
|
"sha256:320f14bd4542a04ab23747ff2c8a778bde727158b606e2661349557f0770711e",
|
||||||
|
"sha256:3625578b6010c65964d177626fde80cf60d7f2e297d56b925cb5cdeda6e9925a",
|
||||||
|
"sha256:39215d809470f4c8d1881758575b2abfb80174a9e8daf8f33b1d4379357e417c",
|
||||||
|
"sha256:3f0ac9fb8608dbc6eaf17956bf623c9119b4db7dbb511650910a82e261e6600f",
|
||||||
|
"sha256:417243bf599ba1f1fef2bb8c543ceb918676954734e2dcb82bf162ae9d7bd514",
|
||||||
|
"sha256:420a692b547736a8d8703c39ea935ab5d8f0d2573f8f123b0a294e49a73f214b",
|
||||||
|
"sha256:443fed67d33aa85357464f297e3d26e570267d1af6fef1c21ca50921d2976302",
|
||||||
|
"sha256:48525933fea744a3e7464c19bfede85df4aba79ce90c60b94d8b6e1eddd67096",
|
||||||
|
"sha256:485a91abe3a07c3a8d1e082ba29254eea3e2bb13cbbd4351ea4e5a21912cc9b0",
|
||||||
|
"sha256:4a5be350f922430997f240d25f8219f93b0c81e15f7b30b868b2fddfc2d05f27",
|
||||||
|
"sha256:4d966c47f9dd73c2d32a809d2be529112d509321c5310ebf54076812e6ecd884",
|
||||||
|
"sha256:524ff0ca3baea164d6d93a32c58ac79eca9f6cf713586fdc0adb66a8cdeab96a",
|
||||||
|
"sha256:53df009d1e1ba40f696f8995683e067e3967101d4bb4ea6f667931b7d4a01357",
|
||||||
|
"sha256:5994985da903d0b8a08e4935c46ed8daf5be1cf217489e673910951dc533d430",
|
||||||
|
"sha256:5cabb9710f09d5d2e9e2748c3e3e20d991a4c5f96ed8f1132518f54ab2967221",
|
||||||
|
"sha256:5fdb39f67c779b183b0c853cd6b45f7db84b84e0571b3ef1c89cdb1dfc367325",
|
||||||
|
"sha256:600d04a7b342363058b9190d4e929a8e2e715c5682a70cc37d5ded1e0dd370b4",
|
||||||
|
"sha256:631cb7415225954fdcc2a024119101946793e5923f6c4d73a5914d27eb3d3a05",
|
||||||
|
"sha256:63974d168b6233b4ed6a0046296803cb13c56637a7b8106564ab575926572a55",
|
||||||
|
"sha256:64322bfa13e44c6c30c518729ef08fda6026b96d5c0be724b3c4ae4da939f875",
|
||||||
|
"sha256:655f8f4c8d6a5963c9a0687793da37b9b681d9ad06f29438a3b2326d4e6b7970",
|
||||||
|
"sha256:6835451b57c1b467b95ffb03a38bb75b52fb4dc2762bb1d9dbed8de31ea7d0fc",
|
||||||
|
"sha256:6db2eb9654a85ada248afa5a6db5ff1cf0f7b16043a6b070adc4a5be68c716d6",
|
||||||
|
"sha256:7c4d1894fe112b0864c1fa75dffa045720a194b227bed12f4be7f6045b25209f",
|
||||||
|
"sha256:7eb037106f5c6b3b0b864ad226b0b7ab58157124161d48e4b30c4a43fef8bc4b",
|
||||||
|
"sha256:8282bab177a9a3081fd3d0a0175a07a1e2bfb7fcbbd949519ea0980f8a07144d",
|
||||||
|
"sha256:82f55187a5bebae7d81d35b1e9aaea5e169d44819789837cdd4720d768c55d15",
|
||||||
|
"sha256:8572cadbf4cfa95fb4187775b5ade2eaa93511f07947b38f4cd67cf10783b118",
|
||||||
|
"sha256:8cdbbd92154db2fec4ec973d45c565e767ddc20aa6dbaf50142676484cbff8ee",
|
||||||
|
"sha256:8f6e6aed5818c264412ac0598b581a002a9f050cb2637a84979859e70197aa9e",
|
||||||
|
"sha256:92f675fefa977625105708492850bcbc1182bfc3e997f8eecb866d1927c98ae6",
|
||||||
|
"sha256:962ed72424bf1f72334e2f1e61b68f16c0e596f024ca7ac5daf229f7c26e4208",
|
||||||
|
"sha256:9badf8d45171d92387410b04639d73811b785b5161ecadabf056ea14d62d4ede",
|
||||||
|
"sha256:9c120c9ce3b163b985a3b966bb701114beb1da4b0468b9b236fc754783d85aa3",
|
||||||
|
"sha256:9f6f3e2598604956480f6c8aa24a3384dbf6509fe995d97f6ca6103bb8c2534e",
|
||||||
|
"sha256:a1254357f7e4c82e77c348dabf2d55f1d14d19d91ff025004775e70a6ef40ada",
|
||||||
|
"sha256:a1392e0638af203cee360495fd2cfdd6054711f2db5175b6e9c3c461b76f5175",
|
||||||
|
"sha256:a1c311fd06ab3b10805abb72109f01a134019739bd3286b8ae1bc2fc4e50c07a",
|
||||||
|
"sha256:a5cb87bdc2e5f620693148b5f8f842d293cae46c5f15a1b1bf7ceeed324a740c",
|
||||||
|
"sha256:a7a7902bf75779bc12ccfc508bfb7a4c47063f748ea3de87135d433a4cca7a2f",
|
||||||
|
"sha256:aad7bd686363d1ce4ee930ad39f14e1673248373f4a9d74d2b9554f06199fb58",
|
||||||
|
"sha256:aafdb89fdeb5fe165043896817eccd6434aee124d5ee9b354f92cd574ba5e78f",
|
||||||
|
"sha256:ae8a8843b11dc0b03b57b52793e391f0122e740de3df1474814c700d2622950a",
|
||||||
|
"sha256:b00bc4619f60c853556b35f83731bd817f989cba3e97dc792bb8c97941b8053a",
|
||||||
|
"sha256:b1f22a9ab44de5f082216270552aa54259db20189e68fc12484873d926426921",
|
||||||
|
"sha256:b3c01c2fb081fced3bbb3da78510693dc7121bb893a1f0f5f4b48013201f362e",
|
||||||
|
"sha256:b3dcd587b69bbf54fc04ca157c2323b8911033e827fffaecf0cafa5a892a0904",
|
||||||
|
"sha256:b4a6db486ac8e99ae696e09efc8b2b9fea67b63c8f88ba7a1a16c24a057a0776",
|
||||||
|
"sha256:bec7dd208a4182e99c5b6c501ce0b1f49de2802448d4056091f8e630b28e9a52",
|
||||||
|
"sha256:c0877239307b7e69d025b73774e88e86ce82f6ba6adf98f41069d5b0b78bd1bf",
|
||||||
|
"sha256:caa48fc31fc7243e50188197b5f0c4228956f97b954f76da157aae7f67269ae8",
|
||||||
|
"sha256:cfe1090245c078720d250d19cb05d67e21a9cd7c257698ef139bc41cf6c27b4f",
|
||||||
|
"sha256:d43002441932f9a9ea5d6f9efaa2e21458221a3a4b417a14027a1d530201ef1b",
|
||||||
|
"sha256:d64728ee14e667ba27c66314b7d880b8eeb050e58ffc5fec3b7a109f8cddbd63",
|
||||||
|
"sha256:d6495008733c7521a89422d7a68efa0a0122c99a5861f06020ef5b1f51f9ba7c",
|
||||||
|
"sha256:d8f1ebca515a03e5654f88411420fea6380fc841d1bea08effb28184e3d4899f",
|
||||||
|
"sha256:d99277877daf2efe074eae6338453a4ed54a2d93fb4678ddfe1209a0c93a2468",
|
||||||
|
"sha256:da01bec0a26befab4898ed83b362993c844b9a607a86add78604186297eb047e",
|
||||||
|
"sha256:db9a28c063c7c00844ae42a80203eb6d2d6bbb97070cfa00194dff40e6f545ab",
|
||||||
|
"sha256:dda81e5ec82485155a19d9624cfcca9be88a405e2857354e5b089c2a982144b2",
|
||||||
|
"sha256:e357571bb0efd65fd55f18db0a2fb0ed89d0bb1d41d906b138f088933ae618bb",
|
||||||
|
"sha256:e544246b859f17373bed915182ab841b80849ed9cf23f1f07b73b7c58baee5fb",
|
||||||
|
"sha256:e562617a45b5a9da5be4abe72b971d4f00bf8555eb29bb91ec2ef2be348cd132",
|
||||||
|
"sha256:e570ffeb2170e116a5b17e83f19911020ac79d19c96f320cbfa1fa96b470185b",
|
||||||
|
"sha256:e6f31a17acede6a8cd1ae2d123ce04d8cca74056c9d456075f4f6f85de055607",
|
||||||
|
"sha256:e9121b4009339b0f751955baf4543a0bfd6bc3f8188f8056b1a25a2d45099934",
|
||||||
|
"sha256:ebedb45b9feb7258fac0a268a3f6bec0a2ea4d9558f3d6f813f02ff3a6dc6698",
|
||||||
|
"sha256:ecaac27da855b8d73f92123e5f03612b04c5632fd0a476e469dfc47cd37d6b2e",
|
||||||
|
"sha256:ecdbde46235f3d560b18be0cb706c8e8ad1b965e5c13bbba7450c86064e96561",
|
||||||
|
"sha256:ed550ed05540c03f0e69e6d74ad58d026de61b9eaebebbaaf8873e585cbb18de",
|
||||||
|
"sha256:eeb3d3d6b399ffe55f9a04e09e635554012f1980696d6b0aca3e6cf42a17a03b",
|
||||||
|
"sha256:ef337945bbd76cce390d1b2496ccf9f90b1c1242a3a7bc242ca4a9fc5993427a",
|
||||||
|
"sha256:f1365e032a477c1430cfe0cf2856679529a2331426f8081172c4a74186f1d595",
|
||||||
|
"sha256:f23b55eb5464468f9e0e9a9935ce3ed2a870608d5f534025cd5536bca25b1402",
|
||||||
|
"sha256:f2e9072d71c1f6cfc79a36d4484c82823c560e6f5599c43c1ca6b5cdbd54f881",
|
||||||
|
"sha256:f323306d0556351735b54acbf82904fe30a27b6a7147153cbe6e19aaaa2aa429",
|
||||||
|
"sha256:f36a3489d9e28fe4b67be9992a23029c3cec0babc3bd9afb39f49844a8c721c5",
|
||||||
|
"sha256:f64f82cc3443149292b32387086d02a6c7fb39b8781563e0ca7b8d7d9cf72bd7",
|
||||||
|
"sha256:f6defd966ca3b187ec6c366604e9296f585021d922e666b99c47e78738b5666c",
|
||||||
|
"sha256:f7c2b8eb9fc872e68b46eeaf835e86bccc3a58ba57d0eedc109cbb14177be531",
|
||||||
|
"sha256:fa7db7558607afeccb33c0e4bf1c9a9a835e26599e76af6fe2fcea45904083a6",
|
||||||
|
"sha256:fcb83175cc4936a5425dde3356f079ae03c0802bbdf8ff82c035f8a54b333521"
|
||||||
|
],
|
||||||
|
"markers": "python_version >= '3.7'",
|
||||||
|
"version": "==2.10.1"
|
||||||
|
},
|
||||||
|
"pytest": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:1d881c6124e08ff0a1bb75ba3ec0bfd8b5354a01c194ddd5a0a870a48d99b002",
|
||||||
|
"sha256:a766259cfab564a2ad52cb1aae1b881a75c3eb7e34ca3779697c23ed47c47069"
|
||||||
|
],
|
||||||
|
"index": "pypi",
|
||||||
|
"markers": "python_version >= '3.7'",
|
||||||
|
"version": "==7.4.2"
|
||||||
},
|
},
|
||||||
"pytest-html": {
|
"pytest-html": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:3b473cc278272f8b5a34cd3bf10f88ac5fcb17cb5af22f9323514af00c310e64",
|
"sha256:88682b9e8e51392472546a70a2139b27d6bc1834a4afd3e41da33c9d9f91e4a4",
|
||||||
"sha256:79c4677ed6196417bf290d8b81f706342ae49f726f623728efa3f7dfff09f8eb"
|
"sha256:907c3e68462df129d3ee96dee58bd63f70216b06421836b22fd3fd57ef314acb"
|
||||||
],
|
],
|
||||||
"index": "pypi",
|
"index": "pypi",
|
||||||
"markers": "python_version >= '3.8'",
|
"markers": "python_version >= '3.8'",
|
||||||
"version": "==4.0.0"
|
"version": "==4.0.2"
|
||||||
},
|
},
|
||||||
"pytest-metadata": {
|
"pytest-metadata": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
|
@ -328,12 +457,19 @@
|
||||||
"markers": "python_version >= '3.7'",
|
"markers": "python_version >= '3.7'",
|
||||||
"version": "==2.31.0"
|
"version": "==2.31.0"
|
||||||
},
|
},
|
||||||
|
"typing-extensions": {
|
||||||
|
"hashes": [
|
||||||
|
"sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0",
|
||||||
|
"sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef"
|
||||||
|
],
|
||||||
|
"markers": "python_version >= '3.8'",
|
||||||
|
"version": "==4.8.0"
|
||||||
|
},
|
||||||
"urllib3": {
|
"urllib3": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:c97dfde1f7bd43a71c8d2a58e369e9b2bf692d1334ea9f9cae55add7d0dd0f84",
|
"sha256:c97dfde1f7bd43a71c8d2a58e369e9b2bf692d1334ea9f9cae55add7d0dd0f84",
|
||||||
"sha256:fdb6d215c776278489906c2f8916e6e7d4f5a9b602ccbcfdf7f016fc8da0596e"
|
"sha256:fdb6d215c776278489906c2f8916e6e7d4f5a9b602ccbcfdf7f016fc8da0596e"
|
||||||
],
|
],
|
||||||
"index": "pypi",
|
|
||||||
"markers": "python_version >= '3.7'",
|
"markers": "python_version >= '3.7'",
|
||||||
"version": "==2.0.7"
|
"version": "==2.0.7"
|
||||||
}
|
}
|
||||||
|
@ -341,32 +477,28 @@
|
||||||
"develop": {
|
"develop": {
|
||||||
"black": {
|
"black": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:01ede61aac8c154b55f35301fac3e730baf0c9cf8120f65a9cd61a81cfb4a0c3",
|
"sha256:0e232f24a337fed7a82c1185ae46c56c4a6167fb0fe37411b43e876892c76699",
|
||||||
"sha256:022a582720b0d9480ed82576c920a8c1dde97cc38ff11d8d8859b3bd6ca9eedb",
|
"sha256:30b78ac9b54cf87bcb9910ee3d499d2bc893afd52495066c49d9ee6b21eee06e",
|
||||||
"sha256:25cc308838fe71f7065df53aedd20327969d05671bac95b38fdf37ebe70ac087",
|
"sha256:31946ec6f9c54ed7ba431c38bc81d758970dd734b96b8e8c2b17a367d7908171",
|
||||||
"sha256:27eb7a0c71604d5de083757fbdb245b1a4fae60e9596514c6ec497eb63f95320",
|
"sha256:31b9f87b277a68d0e99d2905edae08807c007973eaa609da5f0c62def6b7c0bd",
|
||||||
"sha256:327a8c2550ddc573b51e2c352adb88143464bb9d92c10416feb86b0f5aee5ff6",
|
"sha256:47c4510f70ec2e8f9135ba490811c071419c115e46f143e4dce2ac45afdcf4c9",
|
||||||
"sha256:47e56d83aad53ca140da0af87678fb38e44fd6bc0af71eebab2d1f59b1acf1d3",
|
"sha256:481167c60cd3e6b1cb8ef2aac0f76165843a374346aeeaa9d86765fe0dd0318b",
|
||||||
"sha256:501387a9edcb75d7ae8a4412bb8749900386eaef258f1aefab18adddea1936bc",
|
"sha256:6901631b937acbee93c75537e74f69463adaf34379a04eef32425b88aca88a23",
|
||||||
"sha256:552513d5cd5694590d7ef6f46e1767a4df9af168d449ff767b13b084c020e63f",
|
"sha256:76baba9281e5e5b230c9b7f83a96daf67a95e919c2dfc240d9e6295eab7b9204",
|
||||||
"sha256:5c4bc552ab52f6c1c506ccae05681fab58c3f72d59ae6e6639e8885e94fe2587",
|
"sha256:7fb5fc36bb65160df21498d5a3dd330af8b6401be3f25af60c6ebfe23753f747",
|
||||||
"sha256:642496b675095d423f9b8448243336f8ec71c9d4d57ec17bf795b67f08132a91",
|
"sha256:960c21555be135c4b37b7018d63d6248bdae8514e5c55b71e994ad37407f45b8",
|
||||||
"sha256:6d1c6022b86f83b632d06f2b02774134def5d4d4f1dac8bef16d90cda18ba28a",
|
"sha256:a3c2ddb35f71976a4cfeca558848c2f2f89abc86b06e8dd89b5a65c1e6c0f22a",
|
||||||
"sha256:7f3bf2dec7d541b4619b8ce526bda74a6b0bffc480a163fed32eb8b3c9aed8ad",
|
"sha256:c870bee76ad5f7a5ea7bd01dc646028d05568d33b0b09b7ecfc8ec0da3f3f39c",
|
||||||
"sha256:831d8f54c3a8c8cf55f64d0422ee875eecac26f5f649fb6c1df65316b67c8926",
|
"sha256:d3d9129ce05b0829730323bdcb00f928a448a124af5acf90aa94d9aba6969604",
|
||||||
"sha256:8417dbd2f57b5701492cd46edcecc4f9208dc75529bcf76c514864e48da867d9",
|
"sha256:db451a3363b1e765c172c3fd86213a4ce63fb8524c938ebd82919bf2a6e28c6a",
|
||||||
"sha256:86cee259349b4448adb4ef9b204bb4467aae74a386bce85d56ba4f5dc0da27be",
|
"sha256:e223b731a0e025f8ef427dd79d8cd69c167da807f5710add30cdf131f13dd62e",
|
||||||
"sha256:893695a76b140881531062d48476ebe4a48f5d1e9388177e175d76234ca247cd",
|
"sha256:f20ff03f3fdd2fd4460b4f631663813e57dc277e37fb216463f3b907aa5a9bdd",
|
||||||
"sha256:9fd59d418c60c0348505f2ddf9609c1e1de8e7493eab96198fc89d9f865e7a96",
|
"sha256:f74892b4b836e5162aa0452393112a574dac85e13902c57dfbaaf388e4eda37c",
|
||||||
"sha256:ad0014efc7acf0bd745792bd0d8857413652979200ab924fbf239062adc12491",
|
"sha256:f8dc7d50d94063cdfd13c82368afd8588bac4ce360e4224ac399e769d6704e98"
|
||||||
"sha256:b5b0ee6d96b345a8b420100b7d71ebfdd19fab5e8301aff48ec270042cd40ac2",
|
|
||||||
"sha256:c333286dc3ddca6fdff74670b911cccedacb4ef0a60b34e491b8a67c833b343a",
|
|
||||||
"sha256:f9062af71c59c004cd519e2fb8f5d25d39e46d3af011b41ab43b9c74e27e236f",
|
|
||||||
"sha256:fb074d8b213749fa1d077d630db0d5f8cc3b2ae63587ad4116e8a436e9bbe995"
|
|
||||||
],
|
],
|
||||||
"index": "pypi",
|
"index": "pypi",
|
||||||
"markers": "python_version >= '3.8'",
|
"markers": "python_version >= '3.8'",
|
||||||
"version": "==23.7.0"
|
"version": "==23.10.0"
|
||||||
},
|
},
|
||||||
"click": {
|
"click": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
@ -9,6 +13,7 @@ import pytest
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from experimentintegration.gradlewbuild import GradlewBuild
|
from experimentintegration.gradlewbuild import GradlewBuild
|
||||||
|
from experimentintegration.models.models import TelemetryModel
|
||||||
|
|
||||||
KLAATU_SERVER_URL = "http://localhost:1378"
|
KLAATU_SERVER_URL = "http://localhost:1378"
|
||||||
KLAATU_LOCAL_SERVER_URL = "http://localhost:1378"
|
KLAATU_LOCAL_SERVER_URL = "http://localhost:1378"
|
||||||
|
@ -25,7 +30,6 @@ def pytest_addoption(parser):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(name="load_branches")
|
@pytest.fixture(name="load_branches")
|
||||||
def fixture_load_branches(experiment_url):
|
def fixture_load_branches(experiment_url):
|
||||||
branches = []
|
branches = []
|
||||||
|
@ -68,7 +72,7 @@ def fixture_experiment_data(experiment_url):
|
||||||
item["style"] = "URGENT"
|
item["style"] = "URGENT"
|
||||||
for count, trigger in enumerate(item["trigger"]):
|
for count, trigger in enumerate(item["trigger"]):
|
||||||
if "USER_EN_SPEAKER" not in trigger:
|
if "USER_EN_SPEAKER" not in trigger:
|
||||||
del(item["trigger"][count])
|
del item["trigger"][count]
|
||||||
return [data]
|
return [data]
|
||||||
|
|
||||||
|
|
||||||
|
@ -157,9 +161,50 @@ def fixture_send_test_results():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(name="check_ping_for_experiment")
|
||||||
|
def fixture_check_ping_for_experiment(experiment_slug, variables):
|
||||||
|
def _check_ping_for_experiment(
|
||||||
|
branch=None, experiment=experiment_slug, reason=None
|
||||||
|
):
|
||||||
|
model = TelemetryModel(branch=branch, experiment=experiment)
|
||||||
|
|
||||||
|
timeout = time.time() + 60 * 5
|
||||||
|
while time.time() < timeout:
|
||||||
|
data = requests.get(f"{variables['urls']['telemetry_server']}/pings").json()
|
||||||
|
events = []
|
||||||
|
for item in data:
|
||||||
|
event_items = item.get("events")
|
||||||
|
if event_items:
|
||||||
|
for event in event_items:
|
||||||
|
if (
|
||||||
|
"category" in event
|
||||||
|
and "nimbus_events" in event["category"]
|
||||||
|
and "extra" in event
|
||||||
|
and "branch" in event["extra"]
|
||||||
|
):
|
||||||
|
events.append(event)
|
||||||
|
for event in events:
|
||||||
|
event_name = event.get("name")
|
||||||
|
if (reason == "enrollment" and event_name == "enrollment") or (
|
||||||
|
reason == "unenrollment"
|
||||||
|
and event_name in ["unenrollment", "disqualification"]
|
||||||
|
):
|
||||||
|
telemetry_model = TelemetryModel(
|
||||||
|
branch=event["extra"]["branch"],
|
||||||
|
experiment=event["extra"]["experiment"],
|
||||||
|
)
|
||||||
|
if model == telemetry_model:
|
||||||
|
return True
|
||||||
|
time.sleep(5)
|
||||||
|
return False
|
||||||
|
|
||||||
|
return _check_ping_for_experiment
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(name="setup_experiment")
|
@pytest.fixture(name="setup_experiment")
|
||||||
def fixture_setup_experiment(experiment_slug, json_data, gradlewbuild_log):
|
def fixture_setup_experiment(experiment_slug, json_data, gradlewbuild_log, variables):
|
||||||
def _(branch):
|
def _(branch):
|
||||||
|
requests.delete(f"{variables['urls']['telemetry_server']}/pings")
|
||||||
logging.info(f"Testing experiment {experiment_slug}, BRANCH: {branch[0]}")
|
logging.info(f"Testing experiment {experiment_slug}, BRANCH: {branch[0]}")
|
||||||
command = f"nimbus-cli --app fenix --channel developer enroll {experiment_slug} --branch {branch[0]} --file {json_data} --reset-app"
|
command = f"nimbus-cli --app fenix --channel developer enroll {experiment_slug} --branch {branch[0]} --file {json_data} --reset-app"
|
||||||
logging.info(f"Running command {command}")
|
logging.info(f"Running command {command}")
|
||||||
|
|
|
@ -0,0 +1,82 @@
|
||||||
|
from pathlib import Path
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
|
||||||
|
def search_for_smoke_tests(tests_name):
|
||||||
|
"""Searches for smoke tests within the requested test module."""
|
||||||
|
path = Path("../ui")
|
||||||
|
files = sorted([x for x in path.iterdir() if x.is_file()])
|
||||||
|
locations = []
|
||||||
|
file_name = None
|
||||||
|
test_names = []
|
||||||
|
|
||||||
|
for name in files:
|
||||||
|
if tests_name in name.name:
|
||||||
|
file_name = name
|
||||||
|
break
|
||||||
|
|
||||||
|
with open(file_name, "r") as file:
|
||||||
|
code = file.read().split(" ")
|
||||||
|
code = [item for item in code if item != ""]
|
||||||
|
|
||||||
|
for count, item in enumerate(code):
|
||||||
|
if "class" in item or "@SmokeTest" in item:
|
||||||
|
locations.append(count)
|
||||||
|
|
||||||
|
for location in locations:
|
||||||
|
if len(test_names) == 0:
|
||||||
|
class_name = code[location + 1]
|
||||||
|
test_names.append(class_name)
|
||||||
|
else:
|
||||||
|
test_names.append(f"{class_name}#{code[location+3].strip('()')}")
|
||||||
|
return test_names
|
||||||
|
|
||||||
|
|
||||||
|
def create_test_file():
|
||||||
|
"""Create the python file to hold the tests."""
|
||||||
|
|
||||||
|
path = Path("tests/")
|
||||||
|
filename = "test_smoke_scenarios.py"
|
||||||
|
final_path = path / filename
|
||||||
|
|
||||||
|
if final_path.exists():
|
||||||
|
print("File Exists, you need to delete it to create a new one.")
|
||||||
|
return
|
||||||
|
# file exists
|
||||||
|
subprocess.run([f"touch {final_path}"], encoding="utf8", shell=True)
|
||||||
|
assert final_path.exists()
|
||||||
|
with open(final_path, "w") as file:
|
||||||
|
file.write("import pytest\n\n")
|
||||||
|
|
||||||
|
|
||||||
|
def generate_smoke_tests(tests_names=None):
|
||||||
|
"""Generate pytest code for the requested tests."""
|
||||||
|
pytest_file = "tests/test_smoke_scenarios.py"
|
||||||
|
tests = []
|
||||||
|
|
||||||
|
for test in tests_names[1:]:
|
||||||
|
test_name = test.replace("#", "_").lower()
|
||||||
|
tests.append(
|
||||||
|
f"""
|
||||||
|
@pytest.mark.smoke_test
|
||||||
|
def test_smoke_{test_name}(setup_experiment, gradlewbuild, load_branches, check_ping_for_experiment):
|
||||||
|
setup_experiment(load_branches)
|
||||||
|
gradlewbuild.test("{test}", smoke=True)
|
||||||
|
assert check_ping_for_experiment
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
with open(pytest_file, "a") as file:
|
||||||
|
for item in tests:
|
||||||
|
file.writelines(f"{item}")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
test_modules = None
|
||||||
|
create_test_file()
|
||||||
|
with open("variables.yaml", "r") as file:
|
||||||
|
test_modules = yaml.safe_load(file)
|
||||||
|
for item in test_modules.get("smoke_tests"):
|
||||||
|
tests = search_for_smoke_tests(item)
|
||||||
|
generate_smoke_tests(tests)
|
|
@ -16,12 +16,17 @@ class GradlewBuild(object):
|
||||||
def __init__(self, log):
|
def __init__(self, log):
|
||||||
self.log = log
|
self.log = log
|
||||||
|
|
||||||
def test(self, identifier):
|
def test(self, identifier, smoke=None):
|
||||||
# self.adbrun.launch()
|
# self.adbrun.launch()
|
||||||
|
|
||||||
# Change path accordingly to go to root folder to run gradlew
|
# Change path accordingly to go to root folder to run gradlew
|
||||||
os.chdir("../../../../../../../..")
|
os.chdir("../../../../../../../..")
|
||||||
cmd = f"adb shell am instrument -w -e class org.mozilla.fenix.experimentintegration.{identifier} org.mozilla.fenix.debug.test/androidx.test.runner.AndroidJUnitRunner"
|
test_type = "ui" if smoke else "experimentintegration"
|
||||||
|
cmd = f"adb shell am instrument -w -e class org.mozilla.fenix.{test_type}.{identifier} org.mozilla.fenix.debug.test/androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
# if smoke:
|
||||||
|
# cmd = f"adb shell am instrument -w -e class org.mozilla.fenix.ui.{identifier} org.mozilla.fenix.debug.test/androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
# else:
|
||||||
|
# cmd = f"adb shell am instrument -w -e class org.mozilla.fenix.experimentintegration.{identifier} org.mozilla.fenix.debug.test/androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
self.logger.info("Running cmd: {}".format(cmd))
|
self.logger.info("Running cmd: {}".format(cmd))
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
@ -0,0 +1,14 @@
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
"""Data class Models"""
|
||||||
|
|
||||||
|
from pydantic import BaseModel
|
||||||
|
|
||||||
|
|
||||||
|
class TelemetryModel(BaseModel):
|
||||||
|
"""Experiment Telemetry model"""
|
||||||
|
|
||||||
|
branch: str
|
||||||
|
experiment: str
|
|
@ -1,12 +1,17 @@
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
@pytest.mark.parametrize("load_branches", [("branch")], indirect=True)
|
@pytest.mark.parametrize("load_branches", [("branch")], indirect=True)
|
||||||
def test_experiment_unenrolls_via_studies_toggle(setup_experiment, gradlewbuild, load_branches):
|
def test_experiment_unenrolls_via_studies_toggle(setup_experiment, gradlewbuild, load_branches, check_ping_for_experiment):
|
||||||
setup_experiment(load_branches)
|
setup_experiment(load_branches)
|
||||||
gradlewbuild.test("GenericExperimentIntegrationTest#disableStudiesViaStudiesToggle")
|
gradlewbuild.test("GenericExperimentIntegrationTest#disableStudiesViaStudiesToggle")
|
||||||
gradlewbuild.test("GenericExperimentIntegrationTest#testExperimentUnenrolls")
|
assert check_ping_for_experiment(reason="enrollment", branch=load_branches[0])
|
||||||
|
gradlewbuild.test("GenericExperimentIntegrationTest#testExperimentUnenrolled")
|
||||||
|
assert check_ping_for_experiment(reason="unenrollment", branch=load_branches[0])
|
||||||
|
|
||||||
@pytest.mark.parametrize("load_branches", [("branch")], indirect=True)
|
@pytest.mark.parametrize("load_branches", [("branch")], indirect=True)
|
||||||
def test_experiment_unenrolls_via_secret_menu(setup_experiment, gradlewbuild, load_branches):
|
def test_experiment_unenrolls_via_secret_menu(setup_experiment, gradlewbuild, load_branches, check_ping_for_experiment):
|
||||||
setup_experiment(load_branches)
|
setup_experiment(load_branches)
|
||||||
gradlewbuild.test("GenericExperimentIntegrationTest#testExperimentUnenrollsViaSecretMenu")
|
gradlewbuild.test("GenericExperimentIntegrationTest#testExperimentUnenrolledViaSecretMenu")
|
||||||
|
assert check_ping_for_experiment(reason="enrollment", branch=load_branches[0])
|
||||||
|
gradlewbuild.test("GenericExperimentIntegrationTest#testExperimentUnenrolled")
|
||||||
|
assert check_ping_for_experiment(reason="unenrollment", branch=load_branches[0])
|
||||||
|
|
|
@ -1,22 +1,47 @@
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("load_branches", [("branch")], indirect=True)
|
@pytest.mark.parametrize("load_branches", [("branch")], indirect=True)
|
||||||
def test_survey_navigates_correctly(setup_experiment, gradlewbuild, load_branches):
|
def test_survey_navigates_correctly(
|
||||||
|
setup_experiment, gradlewbuild, load_branches, check_ping_for_experiment
|
||||||
|
):
|
||||||
setup_experiment(load_branches)
|
setup_experiment(load_branches)
|
||||||
gradlewbuild.test("SurveyExperimentIntegrationTest#checkSurveyNavigatesCorrectly")
|
gradlewbuild.test("SurveyExperimentIntegrationTest#checkSurveyNavigatesCorrectly")
|
||||||
|
assert check_ping_for_experiment(reason="enrollment", branch=load_branches[0])
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("load_branches", [("branch")], indirect=True)
|
@pytest.mark.parametrize("load_branches", [("branch")], indirect=True)
|
||||||
def test_survey_no_thanks_navigates_correctly(setup_experiment, gradlewbuild, load_branches):
|
def test_survey_no_thanks_navigates_correctly(
|
||||||
|
setup_experiment, gradlewbuild, load_branches, check_ping_for_experiment
|
||||||
|
):
|
||||||
setup_experiment(load_branches)
|
setup_experiment(load_branches)
|
||||||
gradlewbuild.test("SurveyExperimentIntegrationTest#checkSurveyNoThanksNavigatesCorrectly")
|
gradlewbuild.test(
|
||||||
|
"SurveyExperimentIntegrationTest#checkSurveyNoThanksNavigatesCorrectly"
|
||||||
|
)
|
||||||
|
assert check_ping_for_experiment(reason="enrollment", branch=load_branches[0])
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("load_branches", [("branch")], indirect=True)
|
@pytest.mark.parametrize("load_branches", [("branch")], indirect=True)
|
||||||
def test_homescreen_survey_dismisses_correctly(setup_experiment, gradlewbuild, load_branches):
|
def test_homescreen_survey_dismisses_correctly(
|
||||||
|
setup_experiment, gradlewbuild, load_branches, check_ping_for_experiment
|
||||||
|
):
|
||||||
setup_experiment(load_branches)
|
setup_experiment(load_branches)
|
||||||
gradlewbuild.test("SurveyExperimentIntegrationTest#checkHomescreenSurveyDismissesCorrectly")
|
gradlewbuild.test(
|
||||||
|
"SurveyExperimentIntegrationTest#checkHomescreenSurveyDismissesCorrectly"
|
||||||
|
)
|
||||||
|
assert check_ping_for_experiment(reason="enrollment", branch=load_branches[0])
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("load_branches", [("branch")], indirect=True)
|
@pytest.mark.parametrize("load_branches", [("branch")], indirect=True)
|
||||||
def test_survey_landscape_looks_correct(setup_experiment, gradlewbuild, load_branches):
|
def test_survey_landscape_looks_correct(
|
||||||
|
setup_experiment, gradlewbuild, load_branches, check_ping_for_experiment
|
||||||
|
):
|
||||||
setup_experiment(load_branches)
|
setup_experiment(load_branches)
|
||||||
gradlewbuild.test("SurveyExperimentIntegrationTest#checkSurveyLandscapeLooksCorrect")
|
gradlewbuild.test(
|
||||||
|
"SurveyExperimentIntegrationTest#checkSurveyLandscapeLooksCorrect"
|
||||||
|
)
|
||||||
|
assert check_ping_for_experiment(reason="enrollment", branch=load_branches[0])
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
urls:
|
urls:
|
||||||
stage_server: "https://stage.experimenter.nonprod.dataops.mozgcp.net"
|
stage_server: "https://stage.experimenter.nonprod.dataops.mozgcp.net"
|
||||||
prod_server: "https://experimenter.services.mozilla.com"
|
prod_server: "https://experimenter.services.mozilla.com"
|
||||||
|
telemetry_server: "http://172.25.58.187:5000"
|
||||||
|
smoke_tests:
|
||||||
|
- "AddressAutofillTest"
|
||||||
|
|
|
@ -0,0 +1,362 @@
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
@file:Suppress("DEPRECATION")
|
||||||
|
|
||||||
|
package org.mozilla.fenix.helpers
|
||||||
|
|
||||||
|
import android.Manifest
|
||||||
|
import android.app.ActivityManager
|
||||||
|
import android.content.ActivityNotFoundException
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import android.content.pm.PackageManager
|
||||||
|
import android.content.res.Configuration
|
||||||
|
import android.net.Uri
|
||||||
|
import android.os.Build
|
||||||
|
import android.os.storage.StorageManager
|
||||||
|
import android.os.storage.StorageVolume
|
||||||
|
import android.provider.Settings
|
||||||
|
import android.util.Log
|
||||||
|
import androidx.annotation.RequiresApi
|
||||||
|
import androidx.compose.ui.test.junit4.AndroidComposeTestRule
|
||||||
|
import androidx.test.espresso.Espresso
|
||||||
|
import androidx.test.espresso.IdlingRegistry
|
||||||
|
import androidx.test.espresso.IdlingResource
|
||||||
|
import androidx.test.espresso.intent.Intents.intended
|
||||||
|
import androidx.test.espresso.intent.matcher.IntentMatchers.toPackage
|
||||||
|
import androidx.test.platform.app.InstrumentationRegistry
|
||||||
|
import androidx.test.rule.ActivityTestRule
|
||||||
|
import androidx.test.runner.permission.PermissionRequester
|
||||||
|
import androidx.test.uiautomator.By
|
||||||
|
import androidx.test.uiautomator.UiObject
|
||||||
|
import androidx.test.uiautomator.UiSelector
|
||||||
|
import androidx.test.uiautomator.Until
|
||||||
|
import junit.framework.AssertionFailedError
|
||||||
|
import org.junit.Assert
|
||||||
|
import org.junit.Assert.assertEquals
|
||||||
|
import org.mozilla.fenix.Config
|
||||||
|
import org.mozilla.fenix.HomeActivity
|
||||||
|
import org.mozilla.fenix.customtabs.ExternalAppBrowserActivity
|
||||||
|
import org.mozilla.fenix.helpers.Constants.PackageName.YOUTUBE_APP
|
||||||
|
import org.mozilla.fenix.helpers.Constants.TAG
|
||||||
|
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
||||||
|
import org.mozilla.fenix.helpers.ext.waitNotNull
|
||||||
|
import org.mozilla.fenix.helpers.idlingresource.NetworkConnectionIdlingResource
|
||||||
|
import org.mozilla.fenix.ui.robots.BrowserRobot
|
||||||
|
import org.mozilla.gecko.util.ThreadUtils
|
||||||
|
import java.io.File
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
|
object AppAndSystemHelper {
|
||||||
|
|
||||||
|
fun getPermissionAllowID(): String {
|
||||||
|
return when
|
||||||
|
(Build.VERSION.SDK_INT > Build.VERSION_CODES.P) {
|
||||||
|
true -> "com.android.permissioncontroller"
|
||||||
|
false -> "com.android.packageinstaller"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequiresApi(Build.VERSION_CODES.R)
|
||||||
|
fun deleteDownloadedFileOnStorage(fileName: String) {
|
||||||
|
val storageManager: StorageManager? = TestHelper.appContext.getSystemService(Context.STORAGE_SERVICE) as StorageManager?
|
||||||
|
val storageVolumes = storageManager!!.storageVolumes
|
||||||
|
val storageVolume: StorageVolume = storageVolumes[0]
|
||||||
|
val file = File(storageVolume.directory!!.path + "/Download/" + fileName)
|
||||||
|
try {
|
||||||
|
if (file.exists()) {
|
||||||
|
file.delete()
|
||||||
|
Log.d("TestLog", "File delete try 1")
|
||||||
|
Assert.assertFalse("The file was not deleted", file.exists())
|
||||||
|
}
|
||||||
|
} catch (e: AssertionError) {
|
||||||
|
file.delete()
|
||||||
|
Log.d("TestLog", "File delete retried")
|
||||||
|
Assert.assertFalse("The file was not deleted", file.exists())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequiresApi(Build.VERSION_CODES.R)
|
||||||
|
fun clearDownloadsFolder() {
|
||||||
|
val storageManager: StorageManager? = TestHelper.appContext.getSystemService(Context.STORAGE_SERVICE) as StorageManager?
|
||||||
|
val storageVolumes = storageManager!!.storageVolumes
|
||||||
|
val storageVolume: StorageVolume = storageVolumes[0]
|
||||||
|
val downloadsFolder = File(storageVolume.directory!!.path + "/Download/")
|
||||||
|
|
||||||
|
// Check if the downloads folder exists
|
||||||
|
if (downloadsFolder.exists() && downloadsFolder.isDirectory) {
|
||||||
|
Log.i(TAG, "clearDownloadsFolder: Verified that \"DOWNLOADS\" folder exists")
|
||||||
|
val files = downloadsFolder.listFiles()
|
||||||
|
|
||||||
|
// Check if the folder is not empty
|
||||||
|
if (files != null && files.isNotEmpty()) {
|
||||||
|
Log.i(TAG, "clearDownloadsFolder: Verified that \"DOWNLOADS\" folder is not empty")
|
||||||
|
// Delete all files in the folder
|
||||||
|
for (file in files) {
|
||||||
|
file.delete()
|
||||||
|
Log.i(TAG, "clearDownloadsFolder: Deleted $file from \"DOWNLOADS\" folder")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setNetworkEnabled(enabled: Boolean) {
|
||||||
|
val networkDisconnectedIdlingResource = NetworkConnectionIdlingResource(false)
|
||||||
|
val networkConnectedIdlingResource = NetworkConnectionIdlingResource(true)
|
||||||
|
|
||||||
|
when (enabled) {
|
||||||
|
true -> {
|
||||||
|
mDevice.executeShellCommand("svc data enable")
|
||||||
|
mDevice.executeShellCommand("svc wifi enable")
|
||||||
|
|
||||||
|
// Wait for network connection to be completely enabled
|
||||||
|
IdlingRegistry.getInstance().register(networkConnectedIdlingResource)
|
||||||
|
Espresso.onIdle {
|
||||||
|
IdlingRegistry.getInstance().unregister(networkConnectedIdlingResource)
|
||||||
|
}
|
||||||
|
Log.i(TAG, "setNetworkEnabled: Network connection was enabled")
|
||||||
|
}
|
||||||
|
|
||||||
|
false -> {
|
||||||
|
mDevice.executeShellCommand("svc data disable")
|
||||||
|
mDevice.executeShellCommand("svc wifi disable")
|
||||||
|
|
||||||
|
// Wait for network connection to be completely disabled
|
||||||
|
IdlingRegistry.getInstance().register(networkDisconnectedIdlingResource)
|
||||||
|
Espresso.onIdle {
|
||||||
|
IdlingRegistry.getInstance().unregister(networkDisconnectedIdlingResource)
|
||||||
|
}
|
||||||
|
Log.i(TAG, "setNetworkEnabled: Network connection was disabled")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun isPackageInstalled(packageName: String): Boolean {
|
||||||
|
return try {
|
||||||
|
val packageManager = InstrumentationRegistry.getInstrumentation().context.packageManager
|
||||||
|
packageManager.getApplicationInfo(packageName, 0).enabled
|
||||||
|
} catch (e: PackageManager.NameNotFoundException) {
|
||||||
|
Log.i(TAG, "isPackageInstalled: Catch block - ${e.message}")
|
||||||
|
false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun assertExternalAppOpens(appPackageName: String) {
|
||||||
|
if (isPackageInstalled(appPackageName)) {
|
||||||
|
Log.i(TAG, "assertExternalAppOpens: $appPackageName is installed on device")
|
||||||
|
try {
|
||||||
|
Log.i(TAG, "assertExternalAppOpens: Try block")
|
||||||
|
intended(toPackage(appPackageName))
|
||||||
|
Log.i(TAG, "assertExternalAppOpens: Matched intent to $appPackageName")
|
||||||
|
} catch (e: AssertionFailedError) {
|
||||||
|
Log.i(TAG, "assertExternalAppOpens: Catch block - ${e.message}")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mDevice.waitNotNull(
|
||||||
|
Until.findObject(By.text("Could not open file")),
|
||||||
|
TestAssetHelper.waitingTime,
|
||||||
|
)
|
||||||
|
Log.i(TAG, "assertExternalAppOpens: Verified \"Could not open file\" message")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun assertNativeAppOpens(appPackageName: String, url: String = "") {
|
||||||
|
if (isPackageInstalled(appPackageName)) {
|
||||||
|
mDevice.waitForIdle(TestAssetHelper.waitingTimeShort)
|
||||||
|
Assert.assertTrue(
|
||||||
|
TestHelper.mDevice.findObject(UiSelector().packageName(appPackageName))
|
||||||
|
.waitForExists(TestAssetHelper.waitingTime),
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
BrowserRobot().verifyUrl(url)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun assertYoutubeAppOpens() = intended(toPackage(YOUTUBE_APP))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether the latest activity of the application is used for custom tabs or PWAs.
|
||||||
|
*
|
||||||
|
* @return Boolean value that helps us know if the current activity supports custom tabs or PWAs.
|
||||||
|
*/
|
||||||
|
fun isExternalAppBrowserActivityInCurrentTask(): Boolean {
|
||||||
|
val activityManager = TestHelper.appContext.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager
|
||||||
|
|
||||||
|
mDevice.waitForIdle(TestAssetHelper.waitingTimeShort)
|
||||||
|
|
||||||
|
return activityManager.appTasks[0].taskInfo.topActivity!!.className == ExternalAppBrowserActivity::class.java.name
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Run test with automatically registering idling resources and cleanup.
|
||||||
|
*
|
||||||
|
* @param idlingResources zero or more [IdlingResource] to be used when running [testBlock].
|
||||||
|
* @param testBlock test code to execute.
|
||||||
|
*/
|
||||||
|
fun registerAndCleanupIdlingResources(
|
||||||
|
vararg idlingResources: IdlingResource,
|
||||||
|
testBlock: () -> Unit,
|
||||||
|
) {
|
||||||
|
idlingResources.forEach {
|
||||||
|
IdlingRegistry.getInstance().register(it)
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
testBlock()
|
||||||
|
} finally {
|
||||||
|
idlingResources.forEach {
|
||||||
|
IdlingRegistry.getInstance().unregister(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Permission allow dialogs differ on various Android APIs
|
||||||
|
fun grantSystemPermission() {
|
||||||
|
val whileUsingTheAppPermissionButton: UiObject =
|
||||||
|
mDevice.findObject(UiSelector().textContains("While using the app"))
|
||||||
|
|
||||||
|
val allowPermissionButton: UiObject =
|
||||||
|
mDevice.findObject(
|
||||||
|
UiSelector()
|
||||||
|
.textContains("Allow")
|
||||||
|
.className("android.widget.Button"),
|
||||||
|
)
|
||||||
|
|
||||||
|
if (Build.VERSION.SDK_INT >= 23) {
|
||||||
|
if (whileUsingTheAppPermissionButton.waitForExists(TestAssetHelper.waitingTimeShort)) {
|
||||||
|
whileUsingTheAppPermissionButton.click()
|
||||||
|
} else if (allowPermissionButton.waitForExists(TestAssetHelper.waitingTimeShort)) {
|
||||||
|
allowPermissionButton.click()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Permission deny dialogs differ on various Android APIs
|
||||||
|
fun denyPermission() {
|
||||||
|
mDevice.findObject(UiSelector().textContains("Deny")).waitForExists(TestAssetHelper.waitingTime)
|
||||||
|
mDevice.findObject(UiSelector().textContains("Deny")).click()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun isTestLab(): Boolean {
|
||||||
|
return Settings.System.getString(TestHelper.appContext.contentResolver, "firebase.test.lab").toBoolean()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Changes the default language of the entire device, not just the app.
|
||||||
|
* Runs on Debug variant as we don't want to adjust Release permission manifests
|
||||||
|
* Runs the test in its testBlock.
|
||||||
|
* Cleans up and sets the default locale after it's done.
|
||||||
|
*/
|
||||||
|
fun runWithSystemLocaleChanged(locale: Locale, testRule: ActivityTestRule<HomeActivity>, testBlock: () -> Unit) {
|
||||||
|
if (Config.channel.isDebug) {
|
||||||
|
/* Sets permission to change device language */
|
||||||
|
PermissionRequester().apply {
|
||||||
|
addPermissions(
|
||||||
|
Manifest.permission.CHANGE_CONFIGURATION,
|
||||||
|
)
|
||||||
|
requestPermissions()
|
||||||
|
}
|
||||||
|
|
||||||
|
val defaultLocale = Locale.getDefault()
|
||||||
|
|
||||||
|
try {
|
||||||
|
setSystemLocale(locale)
|
||||||
|
testBlock()
|
||||||
|
ThreadUtils.runOnUiThread { testRule.activity.recreate() }
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
} finally {
|
||||||
|
setSystemLocale(defaultLocale)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Changes the default language of the entire device, not just the app.
|
||||||
|
*/
|
||||||
|
fun setSystemLocale(locale: Locale) {
|
||||||
|
val activityManagerNative = Class.forName("android.app.ActivityManagerNative")
|
||||||
|
val am = activityManagerNative.getMethod("getDefault", *arrayOfNulls(0))
|
||||||
|
.invoke(activityManagerNative, *arrayOfNulls(0))
|
||||||
|
val config = InstrumentationRegistry.getInstrumentation().context.resources.configuration
|
||||||
|
config.javaClass.getDeclaredField("locale")[config] = locale
|
||||||
|
config.javaClass.getDeclaredField("userSetLocale").setBoolean(config, true)
|
||||||
|
am.javaClass.getMethod(
|
||||||
|
"updateConfiguration",
|
||||||
|
Configuration::class.java,
|
||||||
|
).invoke(am, config)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun putAppToBackground() {
|
||||||
|
mDevice.pressRecentApps()
|
||||||
|
mDevice.findObject(UiSelector().resourceId("${TestHelper.packageName}:id/container")).waitUntilGone(
|
||||||
|
TestAssetHelper.waitingTime,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun bringAppToForeground() {
|
||||||
|
mDevice.pressRecentApps()
|
||||||
|
mDevice.findObject(UiSelector().resourceId("${TestHelper.packageName}:id/container")).waitForExists(
|
||||||
|
TestAssetHelper.waitingTime,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun verifyKeyboardVisibility(isExpectedToBeVisible: Boolean = true) {
|
||||||
|
mDevice.waitForIdle()
|
||||||
|
|
||||||
|
assertEquals(
|
||||||
|
"Keyboard not shown",
|
||||||
|
isExpectedToBeVisible,
|
||||||
|
mDevice
|
||||||
|
.executeShellCommand("dumpsys input_method | grep mInputShown")
|
||||||
|
.contains("mInputShown=true"),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun openAppFromExternalLink(url: String) {
|
||||||
|
val context = InstrumentationRegistry.getInstrumentation().getTargetContext()
|
||||||
|
val intent = Intent().apply {
|
||||||
|
action = Intent.ACTION_VIEW
|
||||||
|
data = Uri.parse(url)
|
||||||
|
`package` = TestHelper.packageName
|
||||||
|
flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
context.startActivity(intent)
|
||||||
|
} catch (ex: ActivityNotFoundException) {
|
||||||
|
intent.setPackage(null)
|
||||||
|
context.startActivity(intent)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wrapper for tests to run only when certain conditions are met.
|
||||||
|
* For example: this method will avoid accidentally running a test on GV versions where the feature is disabled.
|
||||||
|
*/
|
||||||
|
fun runWithCondition(condition: Boolean, testBlock: () -> Unit) {
|
||||||
|
if (condition) {
|
||||||
|
testBlock()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wrapper to launch the app using the launcher intent.
|
||||||
|
*/
|
||||||
|
fun runWithLauncherIntent(
|
||||||
|
activityTestRule: AndroidComposeTestRule<HomeActivityIntentTestRule, HomeActivity>,
|
||||||
|
testBlock: () -> Unit,
|
||||||
|
) {
|
||||||
|
val launcherIntent = Intent(Intent.ACTION_MAIN).apply {
|
||||||
|
addCategory(Intent.CATEGORY_LAUNCHER)
|
||||||
|
}
|
||||||
|
|
||||||
|
activityTestRule.activityRule.withIntent(launcherIntent).launchActivity(launcherIntent)
|
||||||
|
|
||||||
|
try {
|
||||||
|
testBlock()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,10 +4,13 @@
|
||||||
|
|
||||||
package org.mozilla.fenix.helpers
|
package org.mozilla.fenix.helpers
|
||||||
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.getSponsoredShortcutTitle
|
import org.mozilla.fenix.helpers.DataGenerationHelper.getSponsoredShortcutTitle
|
||||||
|
|
||||||
object Constants {
|
object Constants {
|
||||||
|
|
||||||
|
// Tag used for logging
|
||||||
|
const val TAG = "MozUITestLog"
|
||||||
|
|
||||||
// Device or AVD requires a Google Services Android OS installation
|
// Device or AVD requires a Google Services Android OS installation
|
||||||
object PackageName {
|
object PackageName {
|
||||||
const val GOOGLE_PLAY_SERVICES = "com.android.vending"
|
const val GOOGLE_PLAY_SERVICES = "com.android.vending"
|
||||||
|
@ -18,6 +21,7 @@ object Constants {
|
||||||
const val GMAIL_APP = "com.google.android.gm"
|
const val GMAIL_APP = "com.google.android.gm"
|
||||||
const val PHONE_APP = "com.android.dialer"
|
const val PHONE_APP = "com.android.dialer"
|
||||||
const val ANDROID_SETTINGS = "com.android.settings"
|
const val ANDROID_SETTINGS = "com.android.settings"
|
||||||
|
const val PRINT_SPOOLER = "com.android.printspooler"
|
||||||
}
|
}
|
||||||
|
|
||||||
const val SPEECH_RECOGNITION = "android.speech.action.RECOGNIZE_SPEECH"
|
const val SPEECH_RECOGNITION = "android.speech.action.RECOGNIZE_SPEECH"
|
||||||
|
|
|
@ -0,0 +1,113 @@
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
package org.mozilla.fenix.helpers
|
||||||
|
|
||||||
|
import android.app.PendingIntent
|
||||||
|
import android.content.ClipData
|
||||||
|
import android.content.ClipboardManager
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import android.graphics.Bitmap
|
||||||
|
import android.graphics.Canvas
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.net.Uri
|
||||||
|
import androidx.browser.customtabs.CustomTabsIntent
|
||||||
|
import androidx.test.platform.app.InstrumentationRegistry
|
||||||
|
import androidx.test.uiautomator.UiSelector
|
||||||
|
import mozilla.components.browser.state.search.SearchEngine
|
||||||
|
import mozilla.components.browser.state.state.availableSearchEngines
|
||||||
|
import org.junit.Assert
|
||||||
|
import org.mozilla.fenix.ext.components
|
||||||
|
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
||||||
|
import org.mozilla.fenix.utils.IntentUtils
|
||||||
|
|
||||||
|
object DataGenerationHelper {
|
||||||
|
val appContext: Context = InstrumentationRegistry.getInstrumentation().targetContext
|
||||||
|
|
||||||
|
fun createCustomTabIntent(
|
||||||
|
pageUrl: String,
|
||||||
|
customMenuItemLabel: String = "",
|
||||||
|
customActionButtonDescription: String = "",
|
||||||
|
): Intent {
|
||||||
|
val appContext = InstrumentationRegistry.getInstrumentation()
|
||||||
|
.targetContext
|
||||||
|
.applicationContext
|
||||||
|
val pendingIntent = PendingIntent.getActivity(appContext, 0, Intent(), IntentUtils.defaultIntentPendingFlags)
|
||||||
|
val customTabsIntent = CustomTabsIntent.Builder()
|
||||||
|
.addMenuItem(customMenuItemLabel, pendingIntent)
|
||||||
|
.setShareState(CustomTabsIntent.SHARE_STATE_ON)
|
||||||
|
.setActionButton(
|
||||||
|
createTestBitmap(),
|
||||||
|
customActionButtonDescription,
|
||||||
|
pendingIntent,
|
||||||
|
true,
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
customTabsIntent.intent.data = Uri.parse(pageUrl)
|
||||||
|
return customTabsIntent.intent
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun createTestBitmap(): Bitmap {
|
||||||
|
val bitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888)
|
||||||
|
val canvas = Canvas(bitmap)
|
||||||
|
canvas.drawColor(Color.GREEN)
|
||||||
|
return bitmap
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getStringResource(id: Int, argument: String = TestHelper.appName) = TestHelper.appContext.resources.getString(id, argument)
|
||||||
|
|
||||||
|
private val charPool: List<Char> = ('a'..'z') + ('A'..'Z') + ('0'..'9')
|
||||||
|
fun generateRandomString(stringLength: Int) =
|
||||||
|
(1..stringLength)
|
||||||
|
.map { kotlin.random.Random.nextInt(0, charPool.size) }
|
||||||
|
.map(charPool::get)
|
||||||
|
.joinToString("")
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates clipboard data.
|
||||||
|
*/
|
||||||
|
fun setTextToClipBoard(context: Context, message: String) {
|
||||||
|
val clipBoard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
|
||||||
|
val clipData = ClipData.newPlainText("label", message)
|
||||||
|
|
||||||
|
clipBoard.setPrimaryClip(clipData)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns sponsored shortcut title based on the index.
|
||||||
|
*/
|
||||||
|
fun getSponsoredShortcutTitle(position: Int): String {
|
||||||
|
val sponsoredShortcut = mDevice.findObject(
|
||||||
|
UiSelector()
|
||||||
|
.resourceId("${TestHelper.packageName}:id/top_site_item")
|
||||||
|
.index(position - 1),
|
||||||
|
).getChild(
|
||||||
|
UiSelector()
|
||||||
|
.resourceId("${TestHelper.packageName}:id/top_site_title"),
|
||||||
|
).text
|
||||||
|
|
||||||
|
return sponsoredShortcut
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The list of Search engines for the "home" region of the user.
|
||||||
|
* For en-us it will return the 6 engines selected by default: Google, Bing, DuckDuckGo, Amazon, Ebay, Wikipedia.
|
||||||
|
*/
|
||||||
|
fun getRegionSearchEnginesList(): List<SearchEngine> {
|
||||||
|
val searchEnginesList = appContext.components.core.store.state.search.regionSearchEngines
|
||||||
|
Assert.assertTrue("Search engines list returned nothing", searchEnginesList.isNotEmpty())
|
||||||
|
return searchEnginesList
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The list of Search engines available to be added by user choice.
|
||||||
|
* For en-us it will return the 2 engines: Reddit, Youtube.
|
||||||
|
*/
|
||||||
|
fun getAvailableSearchEngines(): List<SearchEngine> {
|
||||||
|
val searchEnginesList = TestHelper.appContext.components.core.store.state.search.availableSearchEngines
|
||||||
|
Assert.assertTrue("Search engines list returned nothing", searchEnginesList.isNotEmpty())
|
||||||
|
return searchEnginesList
|
||||||
|
}
|
||||||
|
}
|
|
@ -67,11 +67,6 @@ interface FeatureSettingsHelper {
|
||||||
*/
|
*/
|
||||||
var etpPolicy: ETPPolicy
|
var etpPolicy: ETPPolicy
|
||||||
|
|
||||||
/**
|
|
||||||
* Enable or disable cookie banner reduction dialog.
|
|
||||||
*/
|
|
||||||
var isCookieBannerReductionDialogEnabled: Boolean
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable or disable open in app banner.
|
* Enable or disable open in app banner.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -33,7 +33,6 @@ class FeatureSettingsHelperDelegate() : FeatureSettingsHelper {
|
||||||
isTCPCFREnabled = settings.shouldShowTotalCookieProtectionCFR,
|
isTCPCFREnabled = settings.shouldShowTotalCookieProtectionCFR,
|
||||||
isWallpaperOnboardingEnabled = settings.showWallpaperOnboarding,
|
isWallpaperOnboardingEnabled = settings.showWallpaperOnboarding,
|
||||||
isDeleteSitePermissionsEnabled = settings.deleteSitePermissions,
|
isDeleteSitePermissionsEnabled = settings.deleteSitePermissions,
|
||||||
isCookieBannerReductionDialogEnabled = !settings.userOptOutOfReEngageCookieBannerDialog,
|
|
||||||
isOpenInAppBannerEnabled = settings.shouldShowOpenInAppBanner,
|
isOpenInAppBannerEnabled = settings.shouldShowOpenInAppBanner,
|
||||||
etpPolicy = getETPPolicy(settings),
|
etpPolicy = getETPPolicy(settings),
|
||||||
tabsTrayRewriteEnabled = settings.enableTabsTrayToCompose,
|
tabsTrayRewriteEnabled = settings.enableTabsTrayToCompose,
|
||||||
|
@ -63,7 +62,6 @@ class FeatureSettingsHelperDelegate() : FeatureSettingsHelper {
|
||||||
override var isRecentlyVisitedFeatureEnabled: Boolean by updatedFeatureFlags::isRecentlyVisitedFeatureEnabled
|
override var isRecentlyVisitedFeatureEnabled: Boolean by updatedFeatureFlags::isRecentlyVisitedFeatureEnabled
|
||||||
override var isPWAsPromptEnabled: Boolean by updatedFeatureFlags::isPWAsPromptEnabled
|
override var isPWAsPromptEnabled: Boolean by updatedFeatureFlags::isPWAsPromptEnabled
|
||||||
override var isTCPCFREnabled: Boolean by updatedFeatureFlags::isTCPCFREnabled
|
override var isTCPCFREnabled: Boolean by updatedFeatureFlags::isTCPCFREnabled
|
||||||
override var isCookieBannerReductionDialogEnabled: Boolean by updatedFeatureFlags::isCookieBannerReductionDialogEnabled
|
|
||||||
override var isOpenInAppBannerEnabled: Boolean by updatedFeatureFlags::isOpenInAppBannerEnabled
|
override var isOpenInAppBannerEnabled: Boolean by updatedFeatureFlags::isOpenInAppBannerEnabled
|
||||||
override var etpPolicy: ETPPolicy by updatedFeatureFlags::etpPolicy
|
override var etpPolicy: ETPPolicy by updatedFeatureFlags::etpPolicy
|
||||||
override var tabsTrayRewriteEnabled: Boolean by updatedFeatureFlags::tabsTrayRewriteEnabled
|
override var tabsTrayRewriteEnabled: Boolean by updatedFeatureFlags::tabsTrayRewriteEnabled
|
||||||
|
@ -90,7 +88,6 @@ class FeatureSettingsHelperDelegate() : FeatureSettingsHelper {
|
||||||
settings.shouldShowTotalCookieProtectionCFR = featureFlags.isTCPCFREnabled
|
settings.shouldShowTotalCookieProtectionCFR = featureFlags.isTCPCFREnabled
|
||||||
settings.showWallpaperOnboarding = featureFlags.isWallpaperOnboardingEnabled
|
settings.showWallpaperOnboarding = featureFlags.isWallpaperOnboardingEnabled
|
||||||
settings.deleteSitePermissions = featureFlags.isDeleteSitePermissionsEnabled
|
settings.deleteSitePermissions = featureFlags.isDeleteSitePermissionsEnabled
|
||||||
settings.userOptOutOfReEngageCookieBannerDialog = !featureFlags.isCookieBannerReductionDialogEnabled
|
|
||||||
settings.shouldShowOpenInAppBanner = featureFlags.isOpenInAppBannerEnabled
|
settings.shouldShowOpenInAppBanner = featureFlags.isOpenInAppBannerEnabled
|
||||||
settings.enableTabsTrayToCompose = featureFlags.tabsTrayRewriteEnabled
|
settings.enableTabsTrayToCompose = featureFlags.tabsTrayRewriteEnabled
|
||||||
settings.enableComposeTopSites = featureFlags.composeTopSitesEnabled
|
settings.enableComposeTopSites = featureFlags.composeTopSitesEnabled
|
||||||
|
@ -109,7 +106,6 @@ private data class FeatureFlags(
|
||||||
var isTCPCFREnabled: Boolean,
|
var isTCPCFREnabled: Boolean,
|
||||||
var isWallpaperOnboardingEnabled: Boolean,
|
var isWallpaperOnboardingEnabled: Boolean,
|
||||||
var isDeleteSitePermissionsEnabled: Boolean,
|
var isDeleteSitePermissionsEnabled: Boolean,
|
||||||
var isCookieBannerReductionDialogEnabled: Boolean,
|
|
||||||
var isOpenInAppBannerEnabled: Boolean,
|
var isOpenInAppBannerEnabled: Boolean,
|
||||||
var etpPolicy: ETPPolicy,
|
var etpPolicy: ETPPolicy,
|
||||||
var tabsTrayRewriteEnabled: Boolean,
|
var tabsTrayRewriteEnabled: Boolean,
|
||||||
|
|
|
@ -52,7 +52,6 @@ class HomeActivityTestRule(
|
||||||
isTCPCFREnabled: Boolean = settings.shouldShowTotalCookieProtectionCFR,
|
isTCPCFREnabled: Boolean = settings.shouldShowTotalCookieProtectionCFR,
|
||||||
isWallpaperOnboardingEnabled: Boolean = settings.showWallpaperOnboarding,
|
isWallpaperOnboardingEnabled: Boolean = settings.showWallpaperOnboarding,
|
||||||
isDeleteSitePermissionsEnabled: Boolean = settings.deleteSitePermissions,
|
isDeleteSitePermissionsEnabled: Boolean = settings.deleteSitePermissions,
|
||||||
isCookieBannerReductionDialogEnabled: Boolean = !settings.userOptOutOfReEngageCookieBannerDialog,
|
|
||||||
isOpenInAppBannerEnabled: Boolean = settings.shouldShowOpenInAppBanner,
|
isOpenInAppBannerEnabled: Boolean = settings.shouldShowOpenInAppBanner,
|
||||||
etpPolicy: ETPPolicy = getETPPolicy(settings),
|
etpPolicy: ETPPolicy = getETPPolicy(settings),
|
||||||
tabsTrayRewriteEnabled: Boolean = false,
|
tabsTrayRewriteEnabled: Boolean = false,
|
||||||
|
@ -67,7 +66,6 @@ class HomeActivityTestRule(
|
||||||
this.isTCPCFREnabled = isTCPCFREnabled
|
this.isTCPCFREnabled = isTCPCFREnabled
|
||||||
this.isWallpaperOnboardingEnabled = isWallpaperOnboardingEnabled
|
this.isWallpaperOnboardingEnabled = isWallpaperOnboardingEnabled
|
||||||
this.isDeleteSitePermissionsEnabled = isDeleteSitePermissionsEnabled
|
this.isDeleteSitePermissionsEnabled = isDeleteSitePermissionsEnabled
|
||||||
this.isCookieBannerReductionDialogEnabled = isCookieBannerReductionDialogEnabled
|
|
||||||
this.isOpenInAppBannerEnabled = isOpenInAppBannerEnabled
|
this.isOpenInAppBannerEnabled = isOpenInAppBannerEnabled
|
||||||
this.etpPolicy = etpPolicy
|
this.etpPolicy = etpPolicy
|
||||||
this.tabsTrayRewriteEnabled = tabsTrayRewriteEnabled
|
this.tabsTrayRewriteEnabled = tabsTrayRewriteEnabled
|
||||||
|
@ -126,7 +124,6 @@ class HomeActivityTestRule(
|
||||||
isPWAsPromptEnabled = false,
|
isPWAsPromptEnabled = false,
|
||||||
isTCPCFREnabled = false,
|
isTCPCFREnabled = false,
|
||||||
isWallpaperOnboardingEnabled = false,
|
isWallpaperOnboardingEnabled = false,
|
||||||
isCookieBannerReductionDialogEnabled = false,
|
|
||||||
isOpenInAppBannerEnabled = false,
|
isOpenInAppBannerEnabled = false,
|
||||||
composeTopSitesEnabled = composeTopSitesEnabled,
|
composeTopSitesEnabled = composeTopSitesEnabled,
|
||||||
)
|
)
|
||||||
|
@ -164,7 +161,6 @@ class HomeActivityIntentTestRule internal constructor(
|
||||||
isTCPCFREnabled: Boolean = settings.shouldShowTotalCookieProtectionCFR,
|
isTCPCFREnabled: Boolean = settings.shouldShowTotalCookieProtectionCFR,
|
||||||
isWallpaperOnboardingEnabled: Boolean = settings.showWallpaperOnboarding,
|
isWallpaperOnboardingEnabled: Boolean = settings.showWallpaperOnboarding,
|
||||||
isDeleteSitePermissionsEnabled: Boolean = settings.deleteSitePermissions,
|
isDeleteSitePermissionsEnabled: Boolean = settings.deleteSitePermissions,
|
||||||
isCookieBannerReductionDialogEnabled: Boolean = !settings.userOptOutOfReEngageCookieBannerDialog,
|
|
||||||
isOpenInAppBannerEnabled: Boolean = settings.shouldShowOpenInAppBanner,
|
isOpenInAppBannerEnabled: Boolean = settings.shouldShowOpenInAppBanner,
|
||||||
etpPolicy: ETPPolicy = getETPPolicy(settings),
|
etpPolicy: ETPPolicy = getETPPolicy(settings),
|
||||||
tabsTrayRewriteEnabled: Boolean = false,
|
tabsTrayRewriteEnabled: Boolean = false,
|
||||||
|
@ -179,7 +175,6 @@ class HomeActivityIntentTestRule internal constructor(
|
||||||
this.isTCPCFREnabled = isTCPCFREnabled
|
this.isTCPCFREnabled = isTCPCFREnabled
|
||||||
this.isWallpaperOnboardingEnabled = isWallpaperOnboardingEnabled
|
this.isWallpaperOnboardingEnabled = isWallpaperOnboardingEnabled
|
||||||
this.isDeleteSitePermissionsEnabled = isDeleteSitePermissionsEnabled
|
this.isDeleteSitePermissionsEnabled = isDeleteSitePermissionsEnabled
|
||||||
this.isCookieBannerReductionDialogEnabled = isCookieBannerReductionDialogEnabled
|
|
||||||
this.isOpenInAppBannerEnabled = isOpenInAppBannerEnabled
|
this.isOpenInAppBannerEnabled = isOpenInAppBannerEnabled
|
||||||
this.etpPolicy = etpPolicy
|
this.etpPolicy = etpPolicy
|
||||||
this.tabsTrayRewriteEnabled = tabsTrayRewriteEnabled
|
this.tabsTrayRewriteEnabled = tabsTrayRewriteEnabled
|
||||||
|
@ -244,7 +239,6 @@ class HomeActivityIntentTestRule internal constructor(
|
||||||
isTCPCFREnabled = settings.shouldShowTotalCookieProtectionCFR
|
isTCPCFREnabled = settings.shouldShowTotalCookieProtectionCFR
|
||||||
isWallpaperOnboardingEnabled = settings.showWallpaperOnboarding
|
isWallpaperOnboardingEnabled = settings.showWallpaperOnboarding
|
||||||
isDeleteSitePermissionsEnabled = settings.deleteSitePermissions
|
isDeleteSitePermissionsEnabled = settings.deleteSitePermissions
|
||||||
isCookieBannerReductionDialogEnabled = !settings.userOptOutOfReEngageCookieBannerDialog
|
|
||||||
isOpenInAppBannerEnabled = settings.shouldShowOpenInAppBanner
|
isOpenInAppBannerEnabled = settings.shouldShowOpenInAppBanner
|
||||||
etpPolicy = getETPPolicy(settings)
|
etpPolicy = getETPPolicy(settings)
|
||||||
}
|
}
|
||||||
|
@ -275,7 +269,6 @@ class HomeActivityIntentTestRule internal constructor(
|
||||||
isPWAsPromptEnabled = false,
|
isPWAsPromptEnabled = false,
|
||||||
isTCPCFREnabled = false,
|
isTCPCFREnabled = false,
|
||||||
isWallpaperOnboardingEnabled = false,
|
isWallpaperOnboardingEnabled = false,
|
||||||
isCookieBannerReductionDialogEnabled = false,
|
|
||||||
isOpenInAppBannerEnabled = false,
|
isOpenInAppBannerEnabled = false,
|
||||||
composeTopSitesEnabled = composeTopSitesEnabled,
|
composeTopSitesEnabled = composeTopSitesEnabled,
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,10 +4,12 @@
|
||||||
|
|
||||||
package org.mozilla.fenix.helpers
|
package org.mozilla.fenix.helpers
|
||||||
|
|
||||||
|
import android.util.Log
|
||||||
import androidx.test.uiautomator.UiObject
|
import androidx.test.uiautomator.UiObject
|
||||||
import androidx.test.uiautomator.UiSelector
|
import androidx.test.uiautomator.UiSelector
|
||||||
import org.junit.Assert.assertFalse
|
import org.junit.Assert.assertFalse
|
||||||
import org.junit.Assert.assertTrue
|
import org.junit.Assert.assertTrue
|
||||||
|
import org.mozilla.fenix.helpers.Constants.TAG
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
|
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeShort
|
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeShort
|
||||||
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
||||||
|
@ -17,101 +19,131 @@ import org.mozilla.fenix.helpers.TestHelper.mDevice
|
||||||
*/
|
*/
|
||||||
object MatcherHelper {
|
object MatcherHelper {
|
||||||
|
|
||||||
fun itemWithResId(resourceId: String) =
|
fun itemWithResId(resourceId: String): UiObject {
|
||||||
mDevice.findObject(UiSelector().resourceId(resourceId))
|
Log.i(TAG, "Looking for item with resource id: $resourceId")
|
||||||
|
return mDevice.findObject(UiSelector().resourceId(resourceId))
|
||||||
|
}
|
||||||
|
|
||||||
fun itemContainingText(itemText: String) =
|
fun itemContainingText(itemText: String): UiObject {
|
||||||
mDevice.findObject(UiSelector().textContains(itemText))
|
Log.i(TAG, "Looking for item with text: $itemText")
|
||||||
|
return mDevice.findObject(UiSelector().textContains(itemText))
|
||||||
|
}
|
||||||
|
|
||||||
fun itemWithText(itemText: String) =
|
fun itemWithText(itemText: String): UiObject {
|
||||||
mDevice.findObject(UiSelector().text(itemText))
|
Log.i(TAG, "Looking for item with text: $itemText")
|
||||||
|
return mDevice.findObject(UiSelector().text(itemText))
|
||||||
|
}
|
||||||
|
|
||||||
fun itemWithDescription(description: String) =
|
fun itemWithDescription(description: String): UiObject {
|
||||||
mDevice.findObject(UiSelector().descriptionContains(description))
|
Log.i(TAG, "Looking for item with description: $description")
|
||||||
|
return mDevice.findObject(UiSelector().descriptionContains(description))
|
||||||
|
}
|
||||||
|
|
||||||
fun checkedItemWithResId(resourceId: String, isChecked: Boolean) =
|
fun itemWithIndex(index: Int): UiObject {
|
||||||
mDevice.findObject(UiSelector().resourceId(resourceId).checked(isChecked))
|
Log.i(TAG, "Looking for item with index: $index")
|
||||||
|
return mDevice.findObject(UiSelector().index(index))
|
||||||
|
}
|
||||||
|
|
||||||
fun checkedItemWithResIdAndText(resourceId: String, text: String, isChecked: Boolean) =
|
fun itemWithClassName(className: String): UiObject {
|
||||||
mDevice.findObject(
|
Log.i(TAG, "Looking for item with class name: $className")
|
||||||
|
return mDevice.findObject(UiSelector().className(className))
|
||||||
|
}
|
||||||
|
|
||||||
|
fun itemWithResIdAndIndex(resourceId: String, index: Int): UiObject {
|
||||||
|
Log.i(TAG, "Looking for item with resource id: $resourceId and index: $index")
|
||||||
|
return mDevice.findObject(UiSelector().resourceId(resourceId).index(index))
|
||||||
|
}
|
||||||
|
|
||||||
|
fun itemWithClassNameAndIndex(className: String, index: Int): UiObject {
|
||||||
|
Log.i(TAG, "Looking for item with class name: $className and index: $index")
|
||||||
|
return mDevice.findObject(UiSelector().className(className).index(index))
|
||||||
|
}
|
||||||
|
|
||||||
|
fun checkedItemWithResId(resourceId: String, isChecked: Boolean): UiObject {
|
||||||
|
Log.i(TAG, "Looking for checked item with resource id: $resourceId")
|
||||||
|
return mDevice.findObject(UiSelector().resourceId(resourceId).checked(isChecked))
|
||||||
|
}
|
||||||
|
|
||||||
|
fun checkedItemWithResIdAndText(resourceId: String, text: String, isChecked: Boolean): UiObject {
|
||||||
|
Log.i(TAG, "Looking for checked item with resource id: $resourceId and text: $text")
|
||||||
|
return mDevice.findObject(
|
||||||
UiSelector()
|
UiSelector()
|
||||||
.resourceId(resourceId)
|
.resourceId(resourceId)
|
||||||
.textContains(text)
|
.textContains(text)
|
||||||
.checked(isChecked),
|
.checked(isChecked),
|
||||||
)
|
)
|
||||||
|
|
||||||
fun itemWithResIdAndDescription(resourceId: String, description: String) =
|
|
||||||
mDevice.findObject(UiSelector().resourceId(resourceId).descriptionContains(description))
|
|
||||||
|
|
||||||
fun itemWithResIdAndText(resourceId: String, text: String) =
|
|
||||||
mDevice.findObject(UiSelector().resourceId(resourceId).text(text))
|
|
||||||
|
|
||||||
fun itemWithResIdContainingText(resourceId: String, text: String) =
|
|
||||||
mDevice.findObject(UiSelector().resourceId(resourceId).textContains(text))
|
|
||||||
|
|
||||||
fun assertItemWithResIdExists(vararg appItems: UiObject, exists: Boolean = true) {
|
|
||||||
if (exists) {
|
|
||||||
for (appItem in appItems) {
|
|
||||||
assertTrue(appItem.waitForExists(waitingTime))
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (appItem in appItems) {
|
|
||||||
assertFalse(appItem.waitForExists(waitingTimeShort))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun assertItemContainingTextExists(vararg appItems: UiObject, exists: Boolean = true) {
|
fun itemWithResIdAndDescription(resourceId: String, description: String): UiObject {
|
||||||
|
Log.i(TAG, "Looking for item with resource id: $resourceId and description: $description")
|
||||||
|
return mDevice.findObject(UiSelector().resourceId(resourceId).descriptionContains(description))
|
||||||
|
}
|
||||||
|
|
||||||
|
fun itemWithResIdAndText(resourceId: String, text: String): UiObject {
|
||||||
|
Log.i(TAG, "Looking for item with resource id: $resourceId and text: $text")
|
||||||
|
return mDevice.findObject(UiSelector().resourceId(resourceId).text(text))
|
||||||
|
}
|
||||||
|
|
||||||
|
fun itemWithResIdContainingText(resourceId: String, text: String): UiObject {
|
||||||
|
Log.i(TAG, "Looking for item with resource id: $resourceId and containing text: $text")
|
||||||
|
return mDevice.findObject(UiSelector().resourceId(resourceId).textContains(text))
|
||||||
|
}
|
||||||
|
|
||||||
|
fun assertUIObjectExists(
|
||||||
|
vararg appItems: UiObject,
|
||||||
|
exists: Boolean = true,
|
||||||
|
waitingTime: Long = TestAssetHelper.waitingTime,
|
||||||
|
) {
|
||||||
for (appItem in appItems) {
|
for (appItem in appItems) {
|
||||||
if (exists) {
|
if (exists) {
|
||||||
assertTrue(appItem.waitForExists(waitingTime))
|
assertTrue("${appItem.selector} does not exist", appItem.waitForExists(waitingTime))
|
||||||
|
Log.i(TAG, "assertUIObjectExists: Verified ${appItem.selector} exists")
|
||||||
} else {
|
} else {
|
||||||
assertFalse(appItem.waitForExists(waitingTimeShort))
|
assertFalse("${appItem.selector} exists", appItem.waitForExists(waitingTimeShort))
|
||||||
|
Log.i(TAG, "assertUIObjectExists: Verified ${appItem.selector} does not exist")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun assertItemWithDescriptionExists(vararg appItems: UiObject, exists: Boolean = true) {
|
fun assertUIObjectIsGone(vararg appItems: UiObject) {
|
||||||
for (appItem in appItems) {
|
for (appItem in appItems) {
|
||||||
if (exists) {
|
assertTrue("${appItem.selector} is not gone", appItem.waitUntilGone(waitingTime))
|
||||||
assertTrue(appItem.waitForExists(waitingTime))
|
Log.i(TAG, "assertUIObjectIsGone: Verified ${appItem.selector} is gone")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun assertItemTextEquals(vararg appItems: UiObject, expectedText: String, isEqual: Boolean = true) {
|
||||||
|
for (appItem in appItems) {
|
||||||
|
if (isEqual) {
|
||||||
|
assertTrue(
|
||||||
|
"${appItem.selector} text does not equal to $expectedText",
|
||||||
|
appItem.text.equals(expectedText),
|
||||||
|
)
|
||||||
|
Log.i(TAG, "assertItemTextEquals: Verified ${appItem.selector} text equals to $expectedText")
|
||||||
} else {
|
} else {
|
||||||
assertFalse(appItem.waitForExists(waitingTimeShort))
|
assertFalse(
|
||||||
|
"${appItem.selector} text equals to $expectedText",
|
||||||
|
appItem.text.equals(expectedText),
|
||||||
|
)
|
||||||
|
Log.i(TAG, "assertItemTextEquals: Verified ${appItem.selector} text does not equal to $expectedText")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun assertCheckedItemWithResIdExists(vararg appItems: UiObject) {
|
fun assertItemTextContains(vararg appItems: UiObject, itemText: String) {
|
||||||
for (appItem in appItems) {
|
for (appItem in appItems) {
|
||||||
assertTrue(appItem.waitForExists(waitingTime))
|
assertTrue(
|
||||||
}
|
"${appItem.selector} text does not contain $itemText",
|
||||||
}
|
appItem.text.contains(itemText),
|
||||||
|
)
|
||||||
fun assertCheckedItemWithResIdAndTextExists(vararg appItems: UiObject) {
|
Log.i(TAG, "assertItemTextContains: Verified ${appItem.selector} text contains $itemText")
|
||||||
for (appItem in appItems) {
|
|
||||||
assertTrue(appItem.waitForExists(waitingTime))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun assertItemWithResIdAndDescriptionExists(vararg appItems: UiObject) {
|
|
||||||
for (appItem in appItems) {
|
|
||||||
assertTrue(appItem.waitForExists(waitingTime))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun assertItemWithResIdAndTextExists(vararg appItems: UiObject, exists: Boolean = true) {
|
|
||||||
for (appItem in appItems) {
|
|
||||||
if (exists) {
|
|
||||||
assertTrue(appItem.waitForExists(waitingTime))
|
|
||||||
} else {
|
|
||||||
assertFalse(appItem.waitForExists(waitingTimeShort))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun assertItemIsEnabledAndVisible(vararg appItems: UiObject) {
|
fun assertItemIsEnabledAndVisible(vararg appItems: UiObject) {
|
||||||
for (appItem in appItems) {
|
for (appItem in appItems) {
|
||||||
assertTrue(appItem.waitForExists(waitingTime) && appItem.isEnabled)
|
assertTrue(appItem.waitForExists(waitingTime) && appItem.isEnabled)
|
||||||
|
Log.i(TAG, "assertItemIsEnabledAndVisible: Verified ${appItem.selector} is visible and enabled")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,9 +13,9 @@ import org.junit.rules.TestRule
|
||||||
import org.junit.runner.Description
|
import org.junit.runner.Description
|
||||||
import org.junit.runners.model.Statement
|
import org.junit.runners.model.Statement
|
||||||
import org.mozilla.fenix.components.PermissionStorage
|
import org.mozilla.fenix.components.PermissionStorage
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.setNetworkEnabled
|
||||||
import org.mozilla.fenix.helpers.IdlingResourceHelper.unregisterAllIdlingResources
|
import org.mozilla.fenix.helpers.IdlingResourceHelper.unregisterAllIdlingResources
|
||||||
import org.mozilla.fenix.helpers.TestHelper.appContext
|
import org.mozilla.fenix.helpers.TestHelper.appContext
|
||||||
import org.mozilla.fenix.helpers.TestHelper.setNetworkEnabled
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rule to retry flaky tests for a given number of times, catching some of the more common exceptions.
|
* Rule to retry flaky tests for a given number of times, catching some of the more common exceptions.
|
||||||
|
|
|
@ -2,83 +2,43 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
@file:Suppress("DEPRECATION")
|
|
||||||
|
|
||||||
package org.mozilla.fenix.helpers
|
package org.mozilla.fenix.helpers
|
||||||
|
|
||||||
import android.Manifest
|
|
||||||
import android.app.ActivityManager
|
|
||||||
import android.app.PendingIntent
|
|
||||||
import android.content.ActivityNotFoundException
|
|
||||||
import android.content.ClipData
|
|
||||||
import android.content.ClipboardManager
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
|
||||||
import android.content.pm.PackageManager
|
|
||||||
import android.content.res.Configuration
|
|
||||||
import android.graphics.Bitmap
|
|
||||||
import android.graphics.Canvas
|
|
||||||
import android.graphics.Color
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Build
|
|
||||||
import android.os.storage.StorageManager
|
|
||||||
import android.os.storage.StorageVolume
|
|
||||||
import android.provider.Settings
|
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.annotation.RequiresApi
|
import androidx.test.core.app.launchActivity
|
||||||
import androidx.browser.customtabs.CustomTabsIntent
|
|
||||||
import androidx.test.espresso.Espresso
|
|
||||||
import androidx.test.espresso.Espresso.onView
|
import androidx.test.espresso.Espresso.onView
|
||||||
import androidx.test.espresso.IdlingRegistry
|
|
||||||
import androidx.test.espresso.IdlingResource
|
|
||||||
import androidx.test.espresso.action.ViewActions.longClick
|
import androidx.test.espresso.action.ViewActions.longClick
|
||||||
import androidx.test.espresso.assertion.ViewAssertions
|
import androidx.test.espresso.assertion.ViewAssertions
|
||||||
import androidx.test.espresso.intent.Intents
|
import androidx.test.espresso.intent.Intents
|
||||||
import androidx.test.espresso.intent.Intents.intended
|
|
||||||
import androidx.test.espresso.intent.matcher.IntentMatchers.toPackage
|
|
||||||
import androidx.test.espresso.matcher.ViewMatchers.hasSibling
|
import androidx.test.espresso.matcher.ViewMatchers.hasSibling
|
||||||
import androidx.test.espresso.matcher.ViewMatchers.withChild
|
import androidx.test.espresso.matcher.ViewMatchers.withChild
|
||||||
import androidx.test.espresso.matcher.ViewMatchers.withId
|
import androidx.test.espresso.matcher.ViewMatchers.withId
|
||||||
import androidx.test.espresso.matcher.ViewMatchers.withParent
|
import androidx.test.espresso.matcher.ViewMatchers.withParent
|
||||||
import androidx.test.espresso.matcher.ViewMatchers.withText
|
import androidx.test.espresso.matcher.ViewMatchers.withText
|
||||||
import androidx.test.platform.app.InstrumentationRegistry
|
import androidx.test.platform.app.InstrumentationRegistry
|
||||||
import androidx.test.rule.ActivityTestRule
|
|
||||||
import androidx.test.runner.permission.PermissionRequester
|
|
||||||
import androidx.test.uiautomator.By
|
import androidx.test.uiautomator.By
|
||||||
import androidx.test.uiautomator.UiDevice
|
import androidx.test.uiautomator.UiDevice
|
||||||
import androidx.test.uiautomator.UiObject
|
import androidx.test.uiautomator.UiObject
|
||||||
import androidx.test.uiautomator.UiScrollable
|
import androidx.test.uiautomator.UiScrollable
|
||||||
import androidx.test.uiautomator.UiSelector
|
import androidx.test.uiautomator.UiSelector
|
||||||
import androidx.test.uiautomator.Until
|
import androidx.test.uiautomator.Until
|
||||||
import junit.framework.AssertionFailedError
|
|
||||||
import mozilla.components.browser.state.search.SearchEngine
|
|
||||||
import mozilla.components.browser.state.state.availableSearchEngines
|
|
||||||
import mozilla.components.support.ktx.android.content.appName
|
import mozilla.components.support.ktx.android.content.appName
|
||||||
import org.hamcrest.CoreMatchers
|
import org.hamcrest.CoreMatchers
|
||||||
import org.hamcrest.CoreMatchers.allOf
|
import org.hamcrest.CoreMatchers.allOf
|
||||||
import org.hamcrest.Matcher
|
import org.hamcrest.Matcher
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
import org.junit.Assert.assertEquals
|
|
||||||
import org.junit.Assert.assertFalse
|
import org.junit.Assert.assertFalse
|
||||||
import org.junit.Assert.assertTrue
|
import org.junit.Assert.assertTrue
|
||||||
import org.mozilla.fenix.Config
|
|
||||||
import org.mozilla.fenix.HomeActivity
|
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.customtabs.ExternalAppBrowserActivity
|
import org.mozilla.fenix.helpers.Constants.TAG
|
||||||
import org.mozilla.fenix.ext.components
|
|
||||||
import org.mozilla.fenix.helpers.Constants.PackageName.YOUTUBE_APP
|
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdAndText
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdAndText
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
|
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTime
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeShort
|
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeShort
|
||||||
import org.mozilla.fenix.helpers.ext.waitNotNull
|
import org.mozilla.fenix.helpers.ext.waitNotNull
|
||||||
import org.mozilla.fenix.helpers.idlingresource.NetworkConnectionIdlingResource
|
|
||||||
import org.mozilla.fenix.ui.robots.BrowserRobot
|
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
import org.mozilla.fenix.utils.IntentUtils
|
|
||||||
import org.mozilla.gecko.util.ThreadUtils
|
|
||||||
import java.io.File
|
|
||||||
import java.util.Locale
|
|
||||||
|
|
||||||
object TestHelper {
|
object TestHelper {
|
||||||
|
|
||||||
|
@ -125,14 +85,6 @@ object TestHelper {
|
||||||
activity.launchActivity(null)
|
activity.launchActivity(null)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getPermissionAllowID(): String {
|
|
||||||
return when
|
|
||||||
(Build.VERSION.SDK_INT > Build.VERSION_CODES.P) {
|
|
||||||
true -> "com.android.permissioncontroller"
|
|
||||||
false -> "com.android.packageinstaller"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun waitUntilObjectIsFound(resourceName: String) {
|
fun waitUntilObjectIsFound(resourceName: String) {
|
||||||
mDevice.waitNotNull(
|
mDevice.waitNotNull(
|
||||||
Until.findObjects(By.res(resourceName)),
|
Until.findObjects(By.res(resourceName)),
|
||||||
|
@ -164,180 +116,13 @@ object TestHelper {
|
||||||
onView(withId(resId)).check(ViewAssertions.matches(withText(CoreMatchers.containsString(urlSubstring))))
|
onView(withId(resId)).check(ViewAssertions.matches(withText(CoreMatchers.containsString(urlSubstring))))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun openAppFromExternalLink(url: String) {
|
|
||||||
val context = InstrumentationRegistry.getInstrumentation().getTargetContext()
|
|
||||||
val intent = Intent().apply {
|
|
||||||
action = Intent.ACTION_VIEW
|
|
||||||
data = Uri.parse(url)
|
|
||||||
`package` = packageName
|
|
||||||
flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
context.startActivity(intent)
|
|
||||||
} catch (ex: ActivityNotFoundException) {
|
|
||||||
intent.setPackage(null)
|
|
||||||
context.startActivity(intent)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.R)
|
|
||||||
fun deleteDownloadedFileOnStorage(fileName: String) {
|
|
||||||
val storageManager: StorageManager? = appContext.getSystemService(Context.STORAGE_SERVICE) as StorageManager?
|
|
||||||
val storageVolumes = storageManager!!.storageVolumes
|
|
||||||
val storageVolume: StorageVolume = storageVolumes[0]
|
|
||||||
val file = File(storageVolume.directory!!.path + "/Download/" + fileName)
|
|
||||||
try {
|
|
||||||
if (file.exists()) {
|
|
||||||
file.delete()
|
|
||||||
Log.d("TestLog", "File delete try 1")
|
|
||||||
assertFalse("The file was not deleted", file.exists())
|
|
||||||
}
|
|
||||||
} catch (e: AssertionError) {
|
|
||||||
file.delete()
|
|
||||||
Log.d("TestLog", "File delete retried")
|
|
||||||
assertFalse("The file was not deleted", file.exists())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun setNetworkEnabled(enabled: Boolean) {
|
|
||||||
val networkDisconnectedIdlingResource = NetworkConnectionIdlingResource(false)
|
|
||||||
val networkConnectedIdlingResource = NetworkConnectionIdlingResource(true)
|
|
||||||
|
|
||||||
when (enabled) {
|
|
||||||
true -> {
|
|
||||||
mDevice.executeShellCommand("svc data enable")
|
|
||||||
mDevice.executeShellCommand("svc wifi enable")
|
|
||||||
|
|
||||||
// Wait for network connection to be completely enabled
|
|
||||||
IdlingRegistry.getInstance().register(networkConnectedIdlingResource)
|
|
||||||
Espresso.onIdle {
|
|
||||||
IdlingRegistry.getInstance().unregister(networkConnectedIdlingResource)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
false -> {
|
|
||||||
mDevice.executeShellCommand("svc data disable")
|
|
||||||
mDevice.executeShellCommand("svc wifi disable")
|
|
||||||
|
|
||||||
// Wait for network connection to be completely disabled
|
|
||||||
IdlingRegistry.getInstance().register(networkDisconnectedIdlingResource)
|
|
||||||
Espresso.onIdle {
|
|
||||||
IdlingRegistry.getInstance().unregister(networkDisconnectedIdlingResource)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun createCustomTabIntent(
|
|
||||||
pageUrl: String,
|
|
||||||
customMenuItemLabel: String = "",
|
|
||||||
customActionButtonDescription: String = "",
|
|
||||||
): Intent {
|
|
||||||
val appContext = InstrumentationRegistry.getInstrumentation()
|
|
||||||
.targetContext
|
|
||||||
.applicationContext
|
|
||||||
val pendingIntent = PendingIntent.getActivity(appContext, 0, Intent(), IntentUtils.defaultIntentPendingFlags)
|
|
||||||
val customTabsIntent = CustomTabsIntent.Builder()
|
|
||||||
.addMenuItem(customMenuItemLabel, pendingIntent)
|
|
||||||
.setShareState(CustomTabsIntent.SHARE_STATE_ON)
|
|
||||||
.setActionButton(
|
|
||||||
createTestBitmap(),
|
|
||||||
customActionButtonDescription,
|
|
||||||
pendingIntent,
|
|
||||||
true,
|
|
||||||
)
|
|
||||||
.build()
|
|
||||||
customTabsIntent.intent.data = Uri.parse(pageUrl)
|
|
||||||
return customTabsIntent.intent
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun createTestBitmap(): Bitmap {
|
|
||||||
val bitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888)
|
|
||||||
val canvas = Canvas(bitmap)
|
|
||||||
canvas.drawColor(Color.GREEN)
|
|
||||||
return bitmap
|
|
||||||
}
|
|
||||||
|
|
||||||
fun isPackageInstalled(packageName: String): Boolean {
|
|
||||||
return try {
|
|
||||||
val packageManager = InstrumentationRegistry.getInstrumentation().context.packageManager
|
|
||||||
packageManager.getApplicationInfo(packageName, 0).enabled
|
|
||||||
} catch (exception: PackageManager.NameNotFoundException) {
|
|
||||||
false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun assertExternalAppOpens(appPackageName: String) {
|
|
||||||
if (isPackageInstalled(appPackageName)) {
|
|
||||||
try {
|
|
||||||
intended(toPackage(appPackageName))
|
|
||||||
} catch (e: AssertionFailedError) {
|
|
||||||
e.printStackTrace()
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
mDevice.waitNotNull(
|
|
||||||
Until.findObject(By.text("Could not open file")),
|
|
||||||
waitingTime,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun assertNativeAppOpens(appPackageName: String, url: String = "") {
|
|
||||||
if (isPackageInstalled(appPackageName)) {
|
|
||||||
mDevice.waitForIdle(waitingTimeShort)
|
|
||||||
assertTrue(
|
|
||||||
mDevice.findObject(UiSelector().packageName(appPackageName))
|
|
||||||
.waitForExists(waitingTime),
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
BrowserRobot().verifyUrl(url)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun assertYoutubeAppOpens() = intended(toPackage(YOUTUBE_APP))
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks whether the latest activity of the application is used for custom tabs or PWAs.
|
|
||||||
*
|
|
||||||
* @return Boolean value that helps us know if the current activity supports custom tabs or PWAs.
|
|
||||||
*/
|
|
||||||
fun isExternalAppBrowserActivityInCurrentTask(): Boolean {
|
|
||||||
val activityManager = appContext.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager
|
|
||||||
|
|
||||||
mDevice.waitForIdle(waitingTimeShort)
|
|
||||||
|
|
||||||
return activityManager.appTasks[0].taskInfo.topActivity!!.className == ExternalAppBrowserActivity::class.java.name
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Run test with automatically registering idling resources and cleanup.
|
|
||||||
*
|
|
||||||
* @param idlingResources zero or more [IdlingResource] to be used when running [testBlock].
|
|
||||||
* @param testBlock test code to execute.
|
|
||||||
*/
|
|
||||||
fun registerAndCleanupIdlingResources(
|
|
||||||
vararg idlingResources: IdlingResource,
|
|
||||||
testBlock: () -> Unit,
|
|
||||||
) {
|
|
||||||
idlingResources.forEach {
|
|
||||||
IdlingRegistry.getInstance().register(it)
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
testBlock()
|
|
||||||
} finally {
|
|
||||||
idlingResources.forEach {
|
|
||||||
IdlingRegistry.getInstance().unregister(it)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// exit from Menus to home screen or browser
|
// exit from Menus to home screen or browser
|
||||||
fun exitMenu() {
|
fun exitMenu() {
|
||||||
val toolbar =
|
val toolbar =
|
||||||
mDevice.findObject(UiSelector().resourceId("$packageName:id/toolbar"))
|
mDevice.findObject(UiSelector().resourceId("$packageName:id/toolbar"))
|
||||||
while (!toolbar.waitForExists(waitingTimeShort)) {
|
while (!toolbar.waitForExists(waitingTimeShort)) {
|
||||||
mDevice.pressBack()
|
mDevice.pressBack()
|
||||||
|
Log.i(TAG, "exitMenu: Exiting app settings menus using device back button")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -356,172 +141,8 @@ object TestHelper {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getStringResource(id: Int, argument: String = appName) = appContext.resources.getString(id, argument)
|
|
||||||
|
|
||||||
// Permission allow dialogs differ on various Android APIs
|
|
||||||
fun grantSystemPermission() {
|
|
||||||
val whileUsingTheAppPermissionButton: UiObject =
|
|
||||||
mDevice.findObject(UiSelector().textContains("While using the app"))
|
|
||||||
|
|
||||||
val allowPermissionButton: UiObject =
|
|
||||||
mDevice.findObject(
|
|
||||||
UiSelector()
|
|
||||||
.textContains("Allow")
|
|
||||||
.className("android.widget.Button"),
|
|
||||||
)
|
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= 23) {
|
|
||||||
if (whileUsingTheAppPermissionButton.waitForExists(waitingTimeShort)) {
|
|
||||||
whileUsingTheAppPermissionButton.click()
|
|
||||||
} else if (allowPermissionButton.waitForExists(waitingTimeShort)) {
|
|
||||||
allowPermissionButton.click()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Permission deny dialogs differ on various Android APIs
|
|
||||||
fun denyPermission() {
|
|
||||||
mDevice.findObject(UiSelector().textContains("Deny")).waitForExists(waitingTime)
|
|
||||||
mDevice.findObject(UiSelector().textContains("Deny")).click()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun isTestLab(): Boolean {
|
|
||||||
return Settings.System.getString(appContext.contentResolver, "firebase.test.lab").toBoolean()
|
|
||||||
}
|
|
||||||
|
|
||||||
private val charPool: List<Char> = ('a'..'z') + ('A'..'Z') + ('0'..'9')
|
|
||||||
fun generateRandomString(stringLength: Int) =
|
|
||||||
(1..stringLength)
|
|
||||||
.map { kotlin.random.Random.nextInt(0, charPool.size) }
|
|
||||||
.map(charPool::get)
|
|
||||||
.joinToString("")
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Changes the default language of the entire device, not just the app.
|
|
||||||
* Runs on Debug variant as we don't want to adjust Release permission manifests
|
|
||||||
* Runs the test in its testBlock.
|
|
||||||
* Cleans up and sets the default locale after it's done.
|
|
||||||
*/
|
|
||||||
fun runWithSystemLocaleChanged(locale: Locale, testRule: ActivityTestRule<HomeActivity>, testBlock: () -> Unit) {
|
|
||||||
if (Config.channel.isDebug) {
|
|
||||||
/* Sets permission to change device language */
|
|
||||||
PermissionRequester().apply {
|
|
||||||
addPermissions(
|
|
||||||
Manifest.permission.CHANGE_CONFIGURATION,
|
|
||||||
)
|
|
||||||
requestPermissions()
|
|
||||||
}
|
|
||||||
|
|
||||||
val defaultLocale = Locale.getDefault()
|
|
||||||
|
|
||||||
try {
|
|
||||||
setSystemLocale(locale)
|
|
||||||
testBlock()
|
|
||||||
ThreadUtils.runOnUiThread { testRule.activity.recreate() }
|
|
||||||
} catch (e: Exception) {
|
|
||||||
e.printStackTrace()
|
|
||||||
} finally {
|
|
||||||
setSystemLocale(defaultLocale)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Changes the default language of the entire device, not just the app.
|
|
||||||
*/
|
|
||||||
fun setSystemLocale(locale: Locale) {
|
|
||||||
val activityManagerNative = Class.forName("android.app.ActivityManagerNative")
|
|
||||||
val am = activityManagerNative.getMethod("getDefault", *arrayOfNulls(0))
|
|
||||||
.invoke(activityManagerNative, *arrayOfNulls(0))
|
|
||||||
val config = InstrumentationRegistry.getInstrumentation().context.resources.configuration
|
|
||||||
config.javaClass.getDeclaredField("locale")[config] = locale
|
|
||||||
config.javaClass.getDeclaredField("userSetLocale").setBoolean(config, true)
|
|
||||||
am.javaClass.getMethod(
|
|
||||||
"updateConfiguration",
|
|
||||||
Configuration::class.java,
|
|
||||||
).invoke(am, config)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates clipboard data.
|
|
||||||
*/
|
|
||||||
fun setTextToClipBoard(context: Context, message: String) {
|
|
||||||
val clipBoard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
|
|
||||||
val clipData = ClipData.newPlainText("label", message)
|
|
||||||
|
|
||||||
clipBoard.setPrimaryClip(clipData)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns sponsored shortcut title based on the index.
|
|
||||||
*/
|
|
||||||
fun getSponsoredShortcutTitle(position: Int): String {
|
|
||||||
val sponsoredShortcut = mDevice.findObject(
|
|
||||||
UiSelector()
|
|
||||||
.resourceId("$packageName:id/top_site_item")
|
|
||||||
.index(position - 1),
|
|
||||||
).getChild(
|
|
||||||
UiSelector()
|
|
||||||
.resourceId("$packageName:id/top_site_title"),
|
|
||||||
).text
|
|
||||||
|
|
||||||
return sponsoredShortcut
|
|
||||||
}
|
|
||||||
|
|
||||||
fun verifyLightThemeApplied(expected: Boolean) =
|
fun verifyLightThemeApplied(expected: Boolean) =
|
||||||
assertFalse("Light theme not selected", expected)
|
assertFalse("Light theme not selected", expected)
|
||||||
|
|
||||||
fun verifyDarkThemeApplied(expected: Boolean) = assertTrue("Dark theme not selected", expected)
|
fun verifyDarkThemeApplied(expected: Boolean) = assertTrue("Dark theme not selected", expected)
|
||||||
|
|
||||||
/**
|
|
||||||
* Wrapper for tests to run only when certain conditions are met.
|
|
||||||
* For example: this method will avoid accidentally running a test on GV versions where the feature is disabled.
|
|
||||||
*/
|
|
||||||
fun runWithCondition(condition: Boolean, testBlock: () -> Unit) {
|
|
||||||
if (condition) {
|
|
||||||
testBlock()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun putAppToBackground() {
|
|
||||||
mDevice.pressRecentApps()
|
|
||||||
mDevice.findObject(UiSelector().resourceId("$packageName:id/container")).waitUntilGone(waitingTime)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun bringAppToForeground() {
|
|
||||||
mDevice.pressRecentApps()
|
|
||||||
mDevice.findObject(UiSelector().resourceId("$packageName:id/container")).waitForExists(waitingTime)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun verifyKeyboardVisibility(isExpectedToBeVisible: Boolean = true) {
|
|
||||||
mDevice.waitForIdle()
|
|
||||||
|
|
||||||
assertEquals(
|
|
||||||
"Keyboard not shown",
|
|
||||||
isExpectedToBeVisible,
|
|
||||||
mDevice
|
|
||||||
.executeShellCommand("dumpsys input_method | grep mInputShown")
|
|
||||||
.contains("mInputShown=true"),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The list of Search engines for the "home" region of the user.
|
|
||||||
* For en-us it will return the 6 engines selected by default: Google, Bing, DuckDuckGo, Amazon, Ebay, Wikipedia.
|
|
||||||
*/
|
|
||||||
fun getRegionSearchEnginesList(): List<SearchEngine> {
|
|
||||||
val searchEnginesList = appContext.components.core.store.state.search.regionSearchEngines
|
|
||||||
assertTrue("Search engines list returned nothing", searchEnginesList.isNotEmpty())
|
|
||||||
return searchEnginesList
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The list of Search engines available to be added by user choice.
|
|
||||||
* For en-us it will return the 2 engines: Reddit, Youtube.
|
|
||||||
*/
|
|
||||||
fun getAvailableSearchEngines(): List<SearchEngine> {
|
|
||||||
val searchEnginesList = appContext.components.core.store.state.search.availableSearchEngines
|
|
||||||
assertTrue("Search engines list returned nothing", searchEnginesList.isNotEmpty())
|
|
||||||
return searchEnginesList
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,11 @@
|
||||||
|
|
||||||
package org.mozilla.fenix.helpers.ext
|
package org.mozilla.fenix.helpers.ext
|
||||||
|
|
||||||
|
import android.util.Log
|
||||||
import androidx.test.uiautomator.SearchCondition
|
import androidx.test.uiautomator.SearchCondition
|
||||||
import androidx.test.uiautomator.UiDevice
|
import androidx.test.uiautomator.UiDevice
|
||||||
import org.junit.Assert.assertNotNull
|
import org.junit.Assert.assertNotNull
|
||||||
|
import org.mozilla.fenix.helpers.Constants.TAG
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,4 +19,8 @@ import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
fun UiDevice.waitNotNull(
|
fun UiDevice.waitNotNull(
|
||||||
searchCondition: SearchCondition<*>,
|
searchCondition: SearchCondition<*>,
|
||||||
waitTime: Long = TestAssetHelper.waitingTime,
|
waitTime: Long = TestAssetHelper.waitingTime,
|
||||||
) = assertNotNull(wait(searchCondition, waitTime))
|
) {
|
||||||
|
Log.i(TAG, "Wait not null: $searchCondition")
|
||||||
|
assertNotNull(wait(searchCondition, waitTime))
|
||||||
|
Log.i(TAG, "Found $searchCondition not null")
|
||||||
|
}
|
||||||
|
|
|
@ -4,12 +4,19 @@
|
||||||
|
|
||||||
package org.mozilla.fenix.onboarding.view
|
package org.mozilla.fenix.onboarding.view
|
||||||
|
|
||||||
|
import io.mockk.every
|
||||||
|
import io.mockk.mockk
|
||||||
|
import mozilla.components.service.nimbus.evalJexlSafe
|
||||||
import org.junit.Assert.assertEquals
|
import org.junit.Assert.assertEquals
|
||||||
|
import org.junit.Before
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
import org.mozilla.experiments.nimbus.GleanPlumbMessageHelper
|
||||||
import org.mozilla.experiments.nimbus.StringHolder
|
import org.mozilla.experiments.nimbus.StringHolder
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
|
import org.mozilla.fenix.nimbus.FxNimbus
|
||||||
|
import org.mozilla.fenix.nimbus.JunoOnboarding
|
||||||
import org.mozilla.fenix.nimbus.OnboardingCardData
|
import org.mozilla.fenix.nimbus.OnboardingCardData
|
||||||
import org.mozilla.fenix.nimbus.OnboardingCardType
|
import org.mozilla.fenix.nimbus.OnboardingCardType
|
||||||
|
|
||||||
|
@ -19,28 +26,242 @@ class JunoOnboardingMapperTest {
|
||||||
val activityTestRule =
|
val activityTestRule =
|
||||||
HomeActivityIntentTestRule.withDefaultSettingsOverrides(skipOnboarding = true)
|
HomeActivityIntentTestRule.withDefaultSettingsOverrides(skipOnboarding = true)
|
||||||
|
|
||||||
|
private lateinit var junoOnboardingFeature: JunoOnboarding
|
||||||
|
private lateinit var jexlConditions: Map<String, String>
|
||||||
|
private lateinit var jexlHelper: GleanPlumbMessageHelper
|
||||||
|
private lateinit var evalFunction: (String) -> Boolean
|
||||||
|
|
||||||
|
@Before
|
||||||
|
fun setup() {
|
||||||
|
junoOnboardingFeature = FxNimbus.features.junoOnboarding.value()
|
||||||
|
jexlConditions = junoOnboardingFeature.conditions
|
||||||
|
|
||||||
|
jexlHelper = mockk(relaxed = true)
|
||||||
|
evalFunction = { condition -> jexlHelper.evalJexlSafe(condition) }
|
||||||
|
|
||||||
|
every { evalFunction("true") } returns true
|
||||||
|
every { evalFunction("false") } returns false
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun showNotificationTrue_showAddWidgetFalse_pagesToDisplay_returnsSortedListOfAllConvertedPages_withoutAddWidgetPage() {
|
fun showNotificationTrue_showAddWidgetFalse_pagesToDisplay_returnsSortedListOfAllConvertedPages_withoutAddWidgetPage() {
|
||||||
val expected = listOf(defaultBrowserPageUiData, syncPageUiData, notificationPageUiData)
|
val expected = listOf(defaultBrowserPageUiData, syncPageUiData, notificationPageUiData)
|
||||||
assertEquals(expected, unsortedAllKnownCardData.toPageUiData(true, false))
|
assertEquals(
|
||||||
|
expected,
|
||||||
|
unsortedAllKnownCardData.toPageUiData(
|
||||||
|
showNotificationPage = true,
|
||||||
|
showAddWidgetPage = false,
|
||||||
|
jexlConditions = jexlConditions,
|
||||||
|
func = evalFunction,
|
||||||
|
),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun showNotificationFalse_showAddWidgetFalse_pagesToDisplay_returnsSortedListOfConvertedPages_withoutNotificationPage_and_addWidgetPage() {
|
fun showNotificationFalse_showAddWidgetFalse_pagesToDisplay_returnsSortedListOfConvertedPages_withoutNotificationPage_and_addWidgetPage() {
|
||||||
val expected = listOf(defaultBrowserPageUiData, syncPageUiData)
|
val expected = listOf(defaultBrowserPageUiData, syncPageUiData)
|
||||||
assertEquals(expected, unsortedAllKnownCardData.toPageUiData(false, false))
|
assertEquals(
|
||||||
|
expected,
|
||||||
|
unsortedAllKnownCardData.toPageUiData(
|
||||||
|
showNotificationPage = false,
|
||||||
|
showAddWidgetPage = false,
|
||||||
|
jexlConditions = jexlConditions,
|
||||||
|
func = evalFunction,
|
||||||
|
),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun showNotificationFalse_showAddWidgetTrue_pagesToDisplay_returnsSortedListOfAllConvertedPages_withoutNotificationPage() {
|
fun showNotificationFalse_showAddWidgetTrue_pagesToDisplay_returnsSortedListOfAllConvertedPages_withoutNotificationPage() {
|
||||||
val expected = listOf(defaultBrowserPageUiData, addSearchWidgetPageUiData, syncPageUiData)
|
val expected = listOf(defaultBrowserPageUiData, addSearchWidgetPageUiData, syncPageUiData)
|
||||||
assertEquals(expected, unsortedAllKnownCardData.toPageUiData(false, true))
|
assertEquals(
|
||||||
|
expected,
|
||||||
|
unsortedAllKnownCardData.toPageUiData(
|
||||||
|
showNotificationPage = false,
|
||||||
|
showAddWidgetPage = true,
|
||||||
|
jexlConditions = jexlConditions,
|
||||||
|
func = evalFunction,
|
||||||
|
),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun showNotificationTrue_and_showAddWidgetTrue_pagesToDisplay_returnsSortedListOfConvertedPages() {
|
fun showNotificationTrue_and_showAddWidgetTrue_pagesToDisplay_returnsSortedListOfConvertedPages() {
|
||||||
val expected = listOf(defaultBrowserPageUiData, addSearchWidgetPageUiData, syncPageUiData, notificationPageUiData)
|
val expected = listOf(
|
||||||
assertEquals(expected, unsortedAllKnownCardData.toPageUiData(true, true))
|
defaultBrowserPageUiData,
|
||||||
|
addSearchWidgetPageUiData,
|
||||||
|
syncPageUiData,
|
||||||
|
notificationPageUiData,
|
||||||
|
)
|
||||||
|
assertEquals(
|
||||||
|
expected,
|
||||||
|
unsortedAllKnownCardData.toPageUiData(
|
||||||
|
showNotificationPage = true,
|
||||||
|
showAddWidgetPage = true,
|
||||||
|
jexlConditions = jexlConditions,
|
||||||
|
func = evalFunction,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun cardConditionsMatchJexlConditions_shouldDisplayCard_returnsConvertedPage() {
|
||||||
|
val jexlConditions = mapOf("ALWAYS" to "true", "NEVER" to "false")
|
||||||
|
val expected = listOf(defaultBrowserPageUiData)
|
||||||
|
|
||||||
|
assertEquals(
|
||||||
|
expected,
|
||||||
|
listOf(defaultBrowserCardData).toPageUiData(
|
||||||
|
showNotificationPage = false,
|
||||||
|
showAddWidgetPage = false,
|
||||||
|
jexlConditions = jexlConditions,
|
||||||
|
func = evalFunction,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun noJexlConditionsAndNoCardConditions_shouldDisplayCard_returnsNoPage() {
|
||||||
|
val jexlConditions = mapOf<String, String>()
|
||||||
|
val expected = emptyList<OnboardingPageUiData>()
|
||||||
|
|
||||||
|
assertEquals(
|
||||||
|
expected,
|
||||||
|
listOf(addSearchWidgetCardDataNoConditions).toPageUiData(
|
||||||
|
showNotificationPage = false,
|
||||||
|
showAddWidgetPage = false,
|
||||||
|
jexlConditions = jexlConditions,
|
||||||
|
func = evalFunction,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun noJexlConditions_shouldDisplayCard_returnsNoPage() {
|
||||||
|
val jexlConditions = mapOf<String, String>()
|
||||||
|
val expected = emptyList<OnboardingPageUiData>()
|
||||||
|
|
||||||
|
assertEquals(
|
||||||
|
expected,
|
||||||
|
listOf(defaultBrowserCardData).toPageUiData(
|
||||||
|
showNotificationPage = false,
|
||||||
|
showAddWidgetPage = false,
|
||||||
|
jexlConditions = jexlConditions,
|
||||||
|
func = evalFunction,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun prerequisitesMatchJexlConditions_shouldDisplayCard_returnsConvertedPage() {
|
||||||
|
val jexlConditions = mapOf("ALWAYS" to "true")
|
||||||
|
val expected = listOf(defaultBrowserPageUiData)
|
||||||
|
|
||||||
|
assertEquals(
|
||||||
|
expected,
|
||||||
|
listOf(defaultBrowserCardData).toPageUiData(
|
||||||
|
showNotificationPage = false,
|
||||||
|
showAddWidgetPage = false,
|
||||||
|
jexlConditions = jexlConditions,
|
||||||
|
func = evalFunction,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun prerequisitesDontMatchJexlConditions_shouldDisplayCard_returnsNoPage() {
|
||||||
|
val jexlConditions = mapOf("NEVER" to "false")
|
||||||
|
val expected = emptyList<OnboardingPageUiData>()
|
||||||
|
|
||||||
|
assertEquals(
|
||||||
|
expected,
|
||||||
|
listOf(defaultBrowserCardData).toPageUiData(
|
||||||
|
showNotificationPage = false,
|
||||||
|
showAddWidgetPage = false,
|
||||||
|
jexlConditions = jexlConditions,
|
||||||
|
func = evalFunction,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun noCardConditions_shouldDisplayCard_returnsNoPage() {
|
||||||
|
val jexlConditions = mapOf("ALWAYS" to "true", "NEVER" to "false")
|
||||||
|
val expected = emptyList<OnboardingPageUiData>()
|
||||||
|
|
||||||
|
assertEquals(
|
||||||
|
expected,
|
||||||
|
listOf(addSearchWidgetCardDataNoConditions).toPageUiData(
|
||||||
|
showNotificationPage = false,
|
||||||
|
showAddWidgetPage = false,
|
||||||
|
jexlConditions = jexlConditions,
|
||||||
|
func = evalFunction,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun noDisqualifiers_shouldDisplayCard_returnsConvertedPage() {
|
||||||
|
val jexlConditions = mapOf("ALWAYS" to "true", "NEVER" to "false")
|
||||||
|
val expected = listOf(defaultBrowserPageUiData)
|
||||||
|
|
||||||
|
assertEquals(
|
||||||
|
expected,
|
||||||
|
listOf(defaultBrowserCardDataNoDisqualifiers).toPageUiData(
|
||||||
|
showNotificationPage = false,
|
||||||
|
showAddWidgetPage = false,
|
||||||
|
jexlConditions = jexlConditions,
|
||||||
|
func = evalFunction,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun disqualifiersMatchJexlConditions_shouldDisplayCard_returnsConvertedPage() {
|
||||||
|
val jexlConditions = mapOf("NEVER" to "false")
|
||||||
|
val expected = listOf(syncPageUiData)
|
||||||
|
|
||||||
|
assertEquals(
|
||||||
|
expected,
|
||||||
|
listOf(syncCardData).toPageUiData(
|
||||||
|
showNotificationPage = false,
|
||||||
|
showAddWidgetPage = false,
|
||||||
|
jexlConditions = jexlConditions,
|
||||||
|
func = evalFunction,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun disqualifiersDontMatchJexlConditions_shouldDisplayCard_returnsNoPage() {
|
||||||
|
val jexlConditions = mapOf("NEVER" to "false")
|
||||||
|
val expected = listOf<OnboardingPageUiData>()
|
||||||
|
|
||||||
|
assertEquals(
|
||||||
|
expected,
|
||||||
|
listOf(notificationCardData).toPageUiData(
|
||||||
|
showNotificationPage = false,
|
||||||
|
showAddWidgetPage = false,
|
||||||
|
jexlConditions = jexlConditions,
|
||||||
|
func = evalFunction,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun noPrerequisites_shouldDisplayCard_returnsConvertedPage() {
|
||||||
|
val jexlConditions = mapOf("ALWAYS" to "true", "NEVER" to "false")
|
||||||
|
val expected = listOf(syncPageUiData)
|
||||||
|
|
||||||
|
assertEquals(
|
||||||
|
expected,
|
||||||
|
listOf(syncCardData).toPageUiData(
|
||||||
|
showNotificationPage = false,
|
||||||
|
showAddWidgetPage = false,
|
||||||
|
jexlConditions = jexlConditions,
|
||||||
|
func = evalFunction,
|
||||||
|
),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +309,36 @@ private val defaultBrowserCardData = OnboardingCardData(
|
||||||
primaryButtonLabel = StringHolder(null, "default browser primary button text"),
|
primaryButtonLabel = StringHolder(null, "default browser primary button text"),
|
||||||
secondaryButtonLabel = StringHolder(null, "default browser secondary button text"),
|
secondaryButtonLabel = StringHolder(null, "default browser secondary button text"),
|
||||||
ordering = 10,
|
ordering = 10,
|
||||||
|
prerequisites = listOf("ALWAYS"),
|
||||||
|
disqualifiers = listOf("NEVER"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
private val defaultBrowserCardDataNoDisqualifiers = OnboardingCardData(
|
||||||
|
cardType = OnboardingCardType.DEFAULT_BROWSER,
|
||||||
|
imageRes = R.drawable.ic_onboarding_welcome,
|
||||||
|
title = StringHolder(null, "default browser title"),
|
||||||
|
body = StringHolder(null, "default browser body with link text"),
|
||||||
|
linkText = StringHolder(null, "link text"),
|
||||||
|
primaryButtonLabel = StringHolder(null, "default browser primary button text"),
|
||||||
|
secondaryButtonLabel = StringHolder(null, "default browser secondary button text"),
|
||||||
|
ordering = 10,
|
||||||
|
prerequisites = listOf("ALWAYS"),
|
||||||
|
disqualifiers = listOf(),
|
||||||
|
)
|
||||||
|
|
||||||
|
private val addSearchWidgetCardDataNoConditions = OnboardingCardData(
|
||||||
|
cardType = OnboardingCardType.ADD_SEARCH_WIDGET,
|
||||||
|
imageRes = R.drawable.ic_onboarding_search_widget,
|
||||||
|
title = StringHolder(null, "add search widget title"),
|
||||||
|
body = StringHolder(null, "add search widget body with link text"),
|
||||||
|
linkText = StringHolder(null, "link text"),
|
||||||
|
primaryButtonLabel = StringHolder(null, "add search widget primary button text"),
|
||||||
|
secondaryButtonLabel = StringHolder(null, "add search widget secondary button text"),
|
||||||
|
ordering = 15,
|
||||||
|
prerequisites = listOf(),
|
||||||
|
disqualifiers = listOf(),
|
||||||
|
)
|
||||||
|
|
||||||
private val addSearchWidgetCardData = OnboardingCardData(
|
private val addSearchWidgetCardData = OnboardingCardData(
|
||||||
cardType = OnboardingCardType.ADD_SEARCH_WIDGET,
|
cardType = OnboardingCardType.ADD_SEARCH_WIDGET,
|
||||||
imageRes = R.drawable.ic_onboarding_search_widget,
|
imageRes = R.drawable.ic_onboarding_search_widget,
|
||||||
|
@ -99,6 +349,7 @@ private val addSearchWidgetCardData = OnboardingCardData(
|
||||||
secondaryButtonLabel = StringHolder(null, "add search widget secondary button text"),
|
secondaryButtonLabel = StringHolder(null, "add search widget secondary button text"),
|
||||||
ordering = 15,
|
ordering = 15,
|
||||||
)
|
)
|
||||||
|
|
||||||
private val syncCardData = OnboardingCardData(
|
private val syncCardData = OnboardingCardData(
|
||||||
cardType = OnboardingCardType.SYNC_SIGN_IN,
|
cardType = OnboardingCardType.SYNC_SIGN_IN,
|
||||||
imageRes = R.drawable.ic_onboarding_sync,
|
imageRes = R.drawable.ic_onboarding_sync,
|
||||||
|
@ -107,7 +358,10 @@ private val syncCardData = OnboardingCardData(
|
||||||
primaryButtonLabel = StringHolder(null, "sync primary button text"),
|
primaryButtonLabel = StringHolder(null, "sync primary button text"),
|
||||||
secondaryButtonLabel = StringHolder(null, "sync secondary button text"),
|
secondaryButtonLabel = StringHolder(null, "sync secondary button text"),
|
||||||
ordering = 20,
|
ordering = 20,
|
||||||
|
prerequisites = listOf(),
|
||||||
|
disqualifiers = listOf("NEVER"),
|
||||||
)
|
)
|
||||||
|
|
||||||
private val notificationCardData = OnboardingCardData(
|
private val notificationCardData = OnboardingCardData(
|
||||||
cardType = OnboardingCardType.NOTIFICATION_PERMISSION,
|
cardType = OnboardingCardType.NOTIFICATION_PERMISSION,
|
||||||
imageRes = R.drawable.ic_notification_permission,
|
imageRes = R.drawable.ic_notification_permission,
|
||||||
|
@ -116,6 +370,8 @@ private val notificationCardData = OnboardingCardData(
|
||||||
primaryButtonLabel = StringHolder(null, "notification primary button text"),
|
primaryButtonLabel = StringHolder(null, "notification primary button text"),
|
||||||
secondaryButtonLabel = StringHolder(null, "notification secondary button text"),
|
secondaryButtonLabel = StringHolder(null, "notification secondary button text"),
|
||||||
ordering = 30,
|
ordering = 30,
|
||||||
|
prerequisites = listOf(),
|
||||||
|
disqualifiers = listOf("NEVER", "OTHER"),
|
||||||
)
|
)
|
||||||
|
|
||||||
private val unsortedAllKnownCardData = listOf(
|
private val unsortedAllKnownCardData = listOf(
|
||||||
|
|
|
@ -26,11 +26,9 @@ import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.ext.toUri
|
|
||||||
import org.mozilla.fenix.helpers.ext.waitNotNull
|
import org.mozilla.fenix.helpers.ext.waitNotNull
|
||||||
import org.mozilla.fenix.ui.robots.accountSettings
|
import org.mozilla.fenix.ui.robots.accountSettings
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
import org.mozilla.fenix.ui.robots.navigationToolbar
|
|
||||||
import org.mozilla.fenix.ui.robots.settingsSubMenuLoginsAndPassword
|
import org.mozilla.fenix.ui.robots.settingsSubMenuLoginsAndPassword
|
||||||
|
|
||||||
@Suppress("RECEIVER_NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS")
|
@Suppress("RECEIVER_NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS")
|
||||||
|
@ -55,9 +53,10 @@ class SyncIntegrationTest {
|
||||||
mockWebServer.shutdown()
|
mockWebServer.shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/352905
|
||||||
// History item Desktop -> Fenix
|
// History item Desktop -> Fenix
|
||||||
@Test
|
@Test
|
||||||
fun checkHistoryFromDesktopTest() {
|
fun syncHistoryBetweenMobileAndDesktopTest() {
|
||||||
signInFxSync()
|
signInFxSync()
|
||||||
tapReturnToPreviousApp()
|
tapReturnToPreviousApp()
|
||||||
// Let's wait until homescreen is shown to go to three dot menu
|
// Let's wait until homescreen is shown to go to three dot menu
|
||||||
|
@ -70,9 +69,10 @@ class SyncIntegrationTest {
|
||||||
historyAfterSyncIsShown()
|
historyAfterSyncIsShown()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/330146
|
||||||
// Bookmark item Desktop -> Fenix
|
// Bookmark item Desktop -> Fenix
|
||||||
@Test
|
@Test
|
||||||
fun checkBookmarkFromDesktopTest() {
|
fun syncBookmarksTest() {
|
||||||
signInFxSync()
|
signInFxSync()
|
||||||
tapReturnToPreviousApp()
|
tapReturnToPreviousApp()
|
||||||
homeScreen {
|
homeScreen {
|
||||||
|
@ -81,9 +81,10 @@ class SyncIntegrationTest {
|
||||||
bookmarkAfterSyncIsShown()
|
bookmarkAfterSyncIsShown()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243353
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun checkAccountSettings() {
|
fun manageAccountSettingsTest() {
|
||||||
signInFxSync()
|
signInFxSync()
|
||||||
mDevice.waitNotNull(Until.findObjects(By.text("Account")), TestAssetHelper.waitingTime)
|
mDevice.waitNotNull(Until.findObjects(By.text("Account")), TestAssetHelper.waitingTime)
|
||||||
|
|
||||||
|
@ -104,9 +105,10 @@ class SyncIntegrationTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/466387
|
||||||
// Login item Desktop -> Fenix
|
// Login item Desktop -> Fenix
|
||||||
@Test
|
@Test
|
||||||
fun checkLoginsFromDesktopTest() {
|
fun synLoginsTest() {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
}.openSettings {
|
}.openSettings {
|
||||||
|
@ -136,44 +138,6 @@ class SyncIntegrationTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bookmark item Fenix -> Desktop
|
|
||||||
@Test
|
|
||||||
fun checkBookmarkFromDeviceTest() {
|
|
||||||
val defaultWebPage = "example.com".toUri()!!
|
|
||||||
navigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(defaultWebPage) {
|
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.bookmarkPage {
|
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.openSettings {
|
|
||||||
}.openTurnOnSyncMenu {
|
|
||||||
useEmailInsteadButton()
|
|
||||||
typeEmail()
|
|
||||||
tapOnContinueButton()
|
|
||||||
typePassword()
|
|
||||||
sleep(TestAssetHelper.waitingTimeShort)
|
|
||||||
tapOnSignIn()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// History item Fenix -> Desktop
|
|
||||||
@Test
|
|
||||||
fun checkHistoryFromDeviceTest() {
|
|
||||||
val defaultWebPage = "example.com".toUri()!!
|
|
||||||
navigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(defaultWebPage) {
|
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.openSettings {
|
|
||||||
}.openTurnOnSyncMenu {
|
|
||||||
useEmailInsteadButton()
|
|
||||||
typeEmail()
|
|
||||||
tapOnContinueButton()
|
|
||||||
typePassword()
|
|
||||||
sleep(TestAssetHelper.waitingTimeShort)
|
|
||||||
tapOnSignIn()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Useful functions for the tests
|
// Useful functions for the tests
|
||||||
fun typeEmail() {
|
fun typeEmail() {
|
||||||
val emailInput = mDevice.findObject(
|
val emailInput = mDevice.findObject(
|
||||||
|
|
|
@ -1,91 +0,0 @@
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
package org.mozilla.fenix.ui
|
|
||||||
|
|
||||||
import androidx.compose.ui.test.junit4.AndroidComposeTestRule
|
|
||||||
import okhttp3.mockwebserver.MockWebServer
|
|
||||||
import org.junit.After
|
|
||||||
import org.junit.Before
|
|
||||||
import org.junit.Ignore
|
|
||||||
import org.junit.Rule
|
|
||||||
import org.junit.Test
|
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
|
||||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper
|
|
||||||
import org.mozilla.fenix.ui.robots.browserScreen
|
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
|
||||||
import org.mozilla.fenix.ui.robots.searchScreen
|
|
||||||
|
|
||||||
class AddToHomeScreenTest {
|
|
||||||
private lateinit var mockWebServer: MockWebServer
|
|
||||||
|
|
||||||
@get:Rule
|
|
||||||
val composeTestRule =
|
|
||||||
AndroidComposeTestRule(HomeActivityTestRule.withDefaultSettingsOverrides()) { it.activity }
|
|
||||||
|
|
||||||
@Before
|
|
||||||
fun setUp() {
|
|
||||||
mockWebServer = MockWebServer().apply {
|
|
||||||
dispatcher = AndroidAssetDispatcher()
|
|
||||||
start()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@After
|
|
||||||
fun tearDown() {
|
|
||||||
mockWebServer.shutdown()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Verifies the Add to home screen option in a tab's 3 dot menu
|
|
||||||
@SmokeTest
|
|
||||||
@Test
|
|
||||||
fun mainMenuAddToHomeScreenTest() {
|
|
||||||
val website = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
|
||||||
val shortcutTitle = TestHelper.generateRandomString(5)
|
|
||||||
|
|
||||||
homeScreen {
|
|
||||||
}.openNavigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(website.url) {
|
|
||||||
}.openThreeDotMenu {
|
|
||||||
expandMenu()
|
|
||||||
}.openAddToHomeScreen {
|
|
||||||
clickCancelShortcutButton()
|
|
||||||
}
|
|
||||||
|
|
||||||
browserScreen {
|
|
||||||
}.openThreeDotMenu {
|
|
||||||
expandMenu()
|
|
||||||
}.openAddToHomeScreen {
|
|
||||||
verifyShortcutTextFieldTitle("Test_Page_1")
|
|
||||||
addShortcutName(shortcutTitle)
|
|
||||||
clickAddShortcutButton()
|
|
||||||
clickAddAutomaticallyButton()
|
|
||||||
}.openHomeScreenShortcut(shortcutTitle) {
|
|
||||||
verifyUrl(website.url.toString())
|
|
||||||
verifyTabCounter("1")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/414970
|
|
||||||
@Ignore("Failure, more details at: https://bugzilla.mozilla.org/show_bug.cgi?id=1830005")
|
|
||||||
@SmokeTest
|
|
||||||
@Test
|
|
||||||
fun addPrivateBrowsingShortcutFromHomeScreenCFRTest() {
|
|
||||||
homeScreen {
|
|
||||||
}.triggerPrivateBrowsingShortcutPrompt {
|
|
||||||
verifyNoThanksPrivateBrowsingShortcutButton(composeTestRule)
|
|
||||||
verifyAddPrivateBrowsingShortcutButton(composeTestRule)
|
|
||||||
clickAddPrivateBrowsingShortcutButton(composeTestRule)
|
|
||||||
clickAddAutomaticallyButton()
|
|
||||||
}.openHomeScreenShortcut("Private ${TestHelper.appName}") {}
|
|
||||||
searchScreen {
|
|
||||||
verifySearchView()
|
|
||||||
}.dismissSearchBar {
|
|
||||||
verifyCommonMythsLink()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -18,6 +18,7 @@ import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdContainingText
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
||||||
import org.mozilla.fenix.helpers.TestHelper.packageName
|
import org.mozilla.fenix.helpers.TestHelper.packageName
|
||||||
|
import org.mozilla.fenix.ui.robots.autofillScreen
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
import org.mozilla.fenix.ui.robots.navigationToolbar
|
import org.mozilla.fenix.ui.robots.navigationToolbar
|
||||||
|
@ -25,6 +26,36 @@ import org.mozilla.fenix.ui.robots.navigationToolbar
|
||||||
class AddressAutofillTest {
|
class AddressAutofillTest {
|
||||||
private lateinit var mockWebServer: MockWebServer
|
private lateinit var mockWebServer: MockWebServer
|
||||||
|
|
||||||
|
object FirstAddressAutofillDetails {
|
||||||
|
var navigateToAutofillSettings = true
|
||||||
|
var isAddressAutofillEnabled = true
|
||||||
|
var userHasSavedAddress = false
|
||||||
|
var firstName = "Mozilla"
|
||||||
|
var middleName = "Fenix"
|
||||||
|
var lastName = "Firefox"
|
||||||
|
var streetAddress = "Harrison Street"
|
||||||
|
var city = "San Francisco"
|
||||||
|
var state = "Alaska"
|
||||||
|
var zipCode = "94105"
|
||||||
|
var country = "United States"
|
||||||
|
var phoneNumber = "555-5555"
|
||||||
|
var emailAddress = "foo@bar.com"
|
||||||
|
}
|
||||||
|
|
||||||
|
object SecondAddressAutofillDetails {
|
||||||
|
var navigateToAutofillSettings = false
|
||||||
|
var firstName = "Android"
|
||||||
|
var middleName = "Test"
|
||||||
|
var lastName = "Name"
|
||||||
|
var streetAddress = "Fort Street"
|
||||||
|
var city = "San Jose"
|
||||||
|
var state = "Arizona"
|
||||||
|
var zipCode = "95141"
|
||||||
|
var country = "United States"
|
||||||
|
var phoneNumber = "777-7777"
|
||||||
|
var emailAddress = "fuu@bar.org"
|
||||||
|
}
|
||||||
|
|
||||||
@get:Rule
|
@get:Rule
|
||||||
val activityIntentTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides()
|
val activityIntentTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides()
|
||||||
|
|
||||||
|
@ -48,22 +79,21 @@ class AddressAutofillTest {
|
||||||
val addressFormPage =
|
val addressFormPage =
|
||||||
TestAssetHelper.getAddressFormAsset(mockWebServer)
|
TestAssetHelper.getAddressFormAsset(mockWebServer)
|
||||||
|
|
||||||
homeScreen {
|
autofillScreen {
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.openSettings {
|
|
||||||
}.openAutofillSubMenu {
|
|
||||||
clickAddAddressButton()
|
|
||||||
fillAndSaveAddress(
|
fillAndSaveAddress(
|
||||||
"Mozilla",
|
navigateToAutofillSettings = FirstAddressAutofillDetails.navigateToAutofillSettings,
|
||||||
"Fenix",
|
isAddressAutofillEnabled = FirstAddressAutofillDetails.isAddressAutofillEnabled,
|
||||||
"Firefox",
|
userHasSavedAddress = FirstAddressAutofillDetails.userHasSavedAddress,
|
||||||
"Harrison Street",
|
firstName = FirstAddressAutofillDetails.firstName,
|
||||||
"San Francisco",
|
middleName = FirstAddressAutofillDetails.middleName,
|
||||||
"Alaska",
|
lastName = FirstAddressAutofillDetails.lastName,
|
||||||
"94105",
|
streetAddress = FirstAddressAutofillDetails.streetAddress,
|
||||||
"United States",
|
city = FirstAddressAutofillDetails.city,
|
||||||
"555-5555",
|
state = FirstAddressAutofillDetails.state,
|
||||||
"foo@bar.com",
|
zipCode = FirstAddressAutofillDetails.zipCode,
|
||||||
|
country = FirstAddressAutofillDetails.country,
|
||||||
|
phoneNumber = FirstAddressAutofillDetails.phoneNumber,
|
||||||
|
emailAddress = FirstAddressAutofillDetails.emailAddress,
|
||||||
)
|
)
|
||||||
}.goBack {
|
}.goBack {
|
||||||
}.goBack {
|
}.goBack {
|
||||||
|
@ -86,22 +116,21 @@ class AddressAutofillTest {
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun deleteSavedAddressTest() {
|
fun deleteSavedAddressTest() {
|
||||||
homeScreen {
|
autofillScreen {
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.openSettings {
|
|
||||||
}.openAutofillSubMenu {
|
|
||||||
clickAddAddressButton()
|
|
||||||
fillAndSaveAddress(
|
fillAndSaveAddress(
|
||||||
"Mozilla",
|
navigateToAutofillSettings = FirstAddressAutofillDetails.navigateToAutofillSettings,
|
||||||
"Fenix",
|
isAddressAutofillEnabled = FirstAddressAutofillDetails.isAddressAutofillEnabled,
|
||||||
"Firefox",
|
userHasSavedAddress = FirstAddressAutofillDetails.userHasSavedAddress,
|
||||||
"Harrison Street",
|
firstName = FirstAddressAutofillDetails.firstName,
|
||||||
"San Francisco",
|
middleName = FirstAddressAutofillDetails.middleName,
|
||||||
"Alaska",
|
lastName = FirstAddressAutofillDetails.lastName,
|
||||||
"94105",
|
streetAddress = FirstAddressAutofillDetails.streetAddress,
|
||||||
"United States",
|
city = FirstAddressAutofillDetails.city,
|
||||||
"555-5555",
|
state = FirstAddressAutofillDetails.state,
|
||||||
"foo@bar.com",
|
zipCode = FirstAddressAutofillDetails.zipCode,
|
||||||
|
country = FirstAddressAutofillDetails.country,
|
||||||
|
phoneNumber = FirstAddressAutofillDetails.phoneNumber,
|
||||||
|
emailAddress = FirstAddressAutofillDetails.emailAddress,
|
||||||
)
|
)
|
||||||
clickManageAddressesButton()
|
clickManageAddressesButton()
|
||||||
clickSavedAddress("Mozilla")
|
clickSavedAddress("Mozilla")
|
||||||
|
@ -130,22 +159,21 @@ class AddressAutofillTest {
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1836841
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1836841
|
||||||
@Test
|
@Test
|
||||||
fun verifyEditAddressViewTest() {
|
fun verifyEditAddressViewTest() {
|
||||||
homeScreen {
|
autofillScreen {
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.openSettings {
|
|
||||||
}.openAutofillSubMenu {
|
|
||||||
clickAddAddressButton()
|
|
||||||
fillAndSaveAddress(
|
fillAndSaveAddress(
|
||||||
"Mozilla",
|
navigateToAutofillSettings = FirstAddressAutofillDetails.navigateToAutofillSettings,
|
||||||
"Fenix",
|
isAddressAutofillEnabled = FirstAddressAutofillDetails.isAddressAutofillEnabled,
|
||||||
"Firefox",
|
userHasSavedAddress = FirstAddressAutofillDetails.userHasSavedAddress,
|
||||||
"Harrison Street",
|
firstName = FirstAddressAutofillDetails.firstName,
|
||||||
"San Francisco",
|
middleName = FirstAddressAutofillDetails.middleName,
|
||||||
"Alaska",
|
lastName = FirstAddressAutofillDetails.lastName,
|
||||||
"94105",
|
streetAddress = FirstAddressAutofillDetails.streetAddress,
|
||||||
"United States",
|
city = FirstAddressAutofillDetails.city,
|
||||||
"555-5555",
|
state = FirstAddressAutofillDetails.state,
|
||||||
"foo@bar.com",
|
zipCode = FirstAddressAutofillDetails.zipCode,
|
||||||
|
country = FirstAddressAutofillDetails.country,
|
||||||
|
phoneNumber = FirstAddressAutofillDetails.phoneNumber,
|
||||||
|
emailAddress = FirstAddressAutofillDetails.emailAddress,
|
||||||
)
|
)
|
||||||
clickManageAddressesButton()
|
clickManageAddressesButton()
|
||||||
clickSavedAddress("Mozilla")
|
clickSavedAddress("Mozilla")
|
||||||
|
@ -159,23 +187,21 @@ class AddressAutofillTest {
|
||||||
val addressFormPage =
|
val addressFormPage =
|
||||||
TestAssetHelper.getAddressFormAsset(mockWebServer)
|
TestAssetHelper.getAddressFormAsset(mockWebServer)
|
||||||
|
|
||||||
homeScreen {
|
autofillScreen {
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.openSettings {
|
|
||||||
}.openAutofillSubMenu {
|
|
||||||
verifyAddressAutofillSection(true, false)
|
|
||||||
clickAddAddressButton()
|
|
||||||
fillAndSaveAddress(
|
fillAndSaveAddress(
|
||||||
"Mozilla",
|
navigateToAutofillSettings = FirstAddressAutofillDetails.navigateToAutofillSettings,
|
||||||
"Fenix",
|
isAddressAutofillEnabled = FirstAddressAutofillDetails.isAddressAutofillEnabled,
|
||||||
"Firefox",
|
userHasSavedAddress = FirstAddressAutofillDetails.userHasSavedAddress,
|
||||||
"Harrison Street",
|
firstName = FirstAddressAutofillDetails.firstName,
|
||||||
"San Francisco",
|
middleName = FirstAddressAutofillDetails.middleName,
|
||||||
"Alaska",
|
lastName = FirstAddressAutofillDetails.lastName,
|
||||||
"94105",
|
streetAddress = FirstAddressAutofillDetails.streetAddress,
|
||||||
"United States",
|
city = FirstAddressAutofillDetails.city,
|
||||||
"555-5555",
|
state = FirstAddressAutofillDetails.state,
|
||||||
"foo@bar.com",
|
zipCode = FirstAddressAutofillDetails.zipCode,
|
||||||
|
country = FirstAddressAutofillDetails.country,
|
||||||
|
phoneNumber = FirstAddressAutofillDetails.phoneNumber,
|
||||||
|
emailAddress = FirstAddressAutofillDetails.emailAddress,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,23 +233,21 @@ class AddressAutofillTest {
|
||||||
val addressFormPage =
|
val addressFormPage =
|
||||||
TestAssetHelper.getAddressFormAsset(mockWebServer)
|
TestAssetHelper.getAddressFormAsset(mockWebServer)
|
||||||
|
|
||||||
homeScreen {
|
autofillScreen {
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.openSettings {
|
|
||||||
}.openAutofillSubMenu {
|
|
||||||
verifyAddressAutofillSection(true, false)
|
|
||||||
clickAddAddressButton()
|
|
||||||
fillAndSaveAddress(
|
fillAndSaveAddress(
|
||||||
"Mozilla",
|
navigateToAutofillSettings = FirstAddressAutofillDetails.navigateToAutofillSettings,
|
||||||
"Fenix",
|
isAddressAutofillEnabled = FirstAddressAutofillDetails.isAddressAutofillEnabled,
|
||||||
"Firefox",
|
userHasSavedAddress = FirstAddressAutofillDetails.userHasSavedAddress,
|
||||||
"Harrison Street",
|
firstName = FirstAddressAutofillDetails.firstName,
|
||||||
"San Francisco",
|
middleName = FirstAddressAutofillDetails.middleName,
|
||||||
"Alaska",
|
lastName = FirstAddressAutofillDetails.lastName,
|
||||||
"94105",
|
streetAddress = FirstAddressAutofillDetails.streetAddress,
|
||||||
"United States",
|
city = FirstAddressAutofillDetails.city,
|
||||||
"555-5555",
|
state = FirstAddressAutofillDetails.state,
|
||||||
"foo@bar.com",
|
zipCode = FirstAddressAutofillDetails.zipCode,
|
||||||
|
country = FirstAddressAutofillDetails.country,
|
||||||
|
phoneNumber = FirstAddressAutofillDetails.phoneNumber,
|
||||||
|
emailAddress = FirstAddressAutofillDetails.emailAddress,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,37 +271,36 @@ class AddressAutofillTest {
|
||||||
val addressFormPage =
|
val addressFormPage =
|
||||||
TestAssetHelper.getAddressFormAsset(mockWebServer)
|
TestAssetHelper.getAddressFormAsset(mockWebServer)
|
||||||
|
|
||||||
homeScreen {
|
autofillScreen {
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.openSettings {
|
|
||||||
}.openAutofillSubMenu {
|
|
||||||
verifyAddressAutofillSection(true, false)
|
|
||||||
clickAddAddressButton()
|
|
||||||
fillAndSaveAddress(
|
fillAndSaveAddress(
|
||||||
"Mozilla",
|
navigateToAutofillSettings = FirstAddressAutofillDetails.navigateToAutofillSettings,
|
||||||
"Fenix",
|
isAddressAutofillEnabled = FirstAddressAutofillDetails.isAddressAutofillEnabled,
|
||||||
"Firefox",
|
userHasSavedAddress = FirstAddressAutofillDetails.userHasSavedAddress,
|
||||||
"Harrison Street",
|
firstName = FirstAddressAutofillDetails.firstName,
|
||||||
"San Francisco",
|
middleName = FirstAddressAutofillDetails.middleName,
|
||||||
"Alaska",
|
lastName = FirstAddressAutofillDetails.lastName,
|
||||||
"94105",
|
streetAddress = FirstAddressAutofillDetails.streetAddress,
|
||||||
"United States",
|
city = FirstAddressAutofillDetails.city,
|
||||||
"555-5555",
|
state = FirstAddressAutofillDetails.state,
|
||||||
"foo@bar.com",
|
zipCode = FirstAddressAutofillDetails.zipCode,
|
||||||
|
country = FirstAddressAutofillDetails.country,
|
||||||
|
phoneNumber = FirstAddressAutofillDetails.phoneNumber,
|
||||||
|
emailAddress = FirstAddressAutofillDetails.emailAddress,
|
||||||
)
|
)
|
||||||
clickManageAddressesButton()
|
clickManageAddressesButton()
|
||||||
clickAddAddressButton()
|
clickAddAddressButton()
|
||||||
fillAndSaveAddress(
|
fillAndSaveAddress(
|
||||||
"Android",
|
navigateToAutofillSettings = SecondAddressAutofillDetails.navigateToAutofillSettings,
|
||||||
"Test",
|
firstName = SecondAddressAutofillDetails.firstName,
|
||||||
"Name",
|
middleName = SecondAddressAutofillDetails.middleName,
|
||||||
"Fort Street",
|
lastName = SecondAddressAutofillDetails.lastName,
|
||||||
"San Jose",
|
streetAddress = SecondAddressAutofillDetails.streetAddress,
|
||||||
"Arizona",
|
city = SecondAddressAutofillDetails.city,
|
||||||
"95141",
|
state = SecondAddressAutofillDetails.state,
|
||||||
"United States",
|
zipCode = SecondAddressAutofillDetails.zipCode,
|
||||||
"777-7777",
|
country = SecondAddressAutofillDetails.country,
|
||||||
"fuu@bar.org",
|
phoneNumber = SecondAddressAutofillDetails.phoneNumber,
|
||||||
|
emailAddress = SecondAddressAutofillDetails.emailAddress,
|
||||||
)
|
)
|
||||||
verifyManageAddressesToolbarTitle()
|
verifyManageAddressesToolbarTitle()
|
||||||
}
|
}
|
||||||
|
@ -311,37 +334,36 @@ class AddressAutofillTest {
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1836850
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1836850
|
||||||
@Test
|
@Test
|
||||||
fun verifySavedAddressCanBeEditedTest() {
|
fun verifySavedAddressCanBeEditedTest() {
|
||||||
homeScreen {
|
autofillScreen {
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.openSettings {
|
|
||||||
}.openAutofillSubMenu {
|
|
||||||
verifyAddressAutofillSection(true, false)
|
|
||||||
clickAddAddressButton()
|
|
||||||
fillAndSaveAddress(
|
fillAndSaveAddress(
|
||||||
"Mozilla",
|
navigateToAutofillSettings = FirstAddressAutofillDetails.navigateToAutofillSettings,
|
||||||
"Fenix",
|
isAddressAutofillEnabled = FirstAddressAutofillDetails.isAddressAutofillEnabled,
|
||||||
"Firefox",
|
userHasSavedAddress = FirstAddressAutofillDetails.userHasSavedAddress,
|
||||||
"Harrison Street",
|
firstName = FirstAddressAutofillDetails.firstName,
|
||||||
"San Francisco",
|
middleName = FirstAddressAutofillDetails.middleName,
|
||||||
"Alaska",
|
lastName = FirstAddressAutofillDetails.lastName,
|
||||||
"94105",
|
streetAddress = FirstAddressAutofillDetails.streetAddress,
|
||||||
"United States",
|
city = FirstAddressAutofillDetails.city,
|
||||||
"555-5555",
|
state = FirstAddressAutofillDetails.state,
|
||||||
"foo@bar.com",
|
zipCode = FirstAddressAutofillDetails.zipCode,
|
||||||
|
country = FirstAddressAutofillDetails.country,
|
||||||
|
phoneNumber = FirstAddressAutofillDetails.phoneNumber,
|
||||||
|
emailAddress = FirstAddressAutofillDetails.emailAddress,
|
||||||
)
|
)
|
||||||
clickManageAddressesButton()
|
clickManageAddressesButton()
|
||||||
clickSavedAddress("Mozilla")
|
clickSavedAddress("Mozilla")
|
||||||
fillAndSaveAddress(
|
fillAndSaveAddress(
|
||||||
"Android",
|
navigateToAutofillSettings = SecondAddressAutofillDetails.navigateToAutofillSettings,
|
||||||
"Test",
|
firstName = SecondAddressAutofillDetails.firstName,
|
||||||
"Name",
|
middleName = SecondAddressAutofillDetails.middleName,
|
||||||
"Fort Street",
|
lastName = SecondAddressAutofillDetails.lastName,
|
||||||
"San Jose",
|
streetAddress = SecondAddressAutofillDetails.streetAddress,
|
||||||
"Arizona",
|
city = SecondAddressAutofillDetails.city,
|
||||||
"95141",
|
state = SecondAddressAutofillDetails.state,
|
||||||
"United States",
|
zipCode = SecondAddressAutofillDetails.zipCode,
|
||||||
"777-7777",
|
country = SecondAddressAutofillDetails.country,
|
||||||
"fuu@bar.org",
|
phoneNumber = SecondAddressAutofillDetails.phoneNumber,
|
||||||
|
emailAddress = SecondAddressAutofillDetails.emailAddress,
|
||||||
)
|
)
|
||||||
verifyManageAddressesToolbarTitle()
|
verifyManageAddressesToolbarTitle()
|
||||||
}
|
}
|
||||||
|
@ -370,22 +392,21 @@ class AddressAutofillTest {
|
||||||
val addressFormPage =
|
val addressFormPage =
|
||||||
TestAssetHelper.getAddressFormAsset(mockWebServer)
|
TestAssetHelper.getAddressFormAsset(mockWebServer)
|
||||||
|
|
||||||
homeScreen {
|
autofillScreen {
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.openSettings {
|
|
||||||
}.openAutofillSubMenu {
|
|
||||||
clickAddAddressButton()
|
|
||||||
fillAndSaveAddress(
|
fillAndSaveAddress(
|
||||||
"Mozilla",
|
navigateToAutofillSettings = FirstAddressAutofillDetails.navigateToAutofillSettings,
|
||||||
"Fenix",
|
isAddressAutofillEnabled = FirstAddressAutofillDetails.isAddressAutofillEnabled,
|
||||||
"Firefox",
|
userHasSavedAddress = FirstAddressAutofillDetails.userHasSavedAddress,
|
||||||
"Harrison Street",
|
firstName = FirstAddressAutofillDetails.firstName,
|
||||||
"San Francisco",
|
middleName = FirstAddressAutofillDetails.middleName,
|
||||||
"Alaska",
|
lastName = FirstAddressAutofillDetails.lastName,
|
||||||
"94105",
|
streetAddress = FirstAddressAutofillDetails.streetAddress,
|
||||||
"United States",
|
city = FirstAddressAutofillDetails.city,
|
||||||
"555-5555",
|
state = FirstAddressAutofillDetails.state,
|
||||||
"foo@bar.com",
|
zipCode = FirstAddressAutofillDetails.zipCode,
|
||||||
|
country = FirstAddressAutofillDetails.country,
|
||||||
|
phoneNumber = FirstAddressAutofillDetails.phoneNumber,
|
||||||
|
emailAddress = FirstAddressAutofillDetails.emailAddress,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -410,23 +431,21 @@ class AddressAutofillTest {
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1836838
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1836838
|
||||||
@Test
|
@Test
|
||||||
fun verifyAutofillAddressSectionTest() {
|
fun verifyAutofillAddressSectionTest() {
|
||||||
homeScreen {
|
autofillScreen {
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.openSettings {
|
|
||||||
}.openAutofillSubMenu {
|
|
||||||
verifyAddressAutofillSection(true, false)
|
|
||||||
clickAddAddressButton()
|
|
||||||
fillAndSaveAddress(
|
fillAndSaveAddress(
|
||||||
"Mozilla",
|
navigateToAutofillSettings = FirstAddressAutofillDetails.navigateToAutofillSettings,
|
||||||
"Fenix",
|
isAddressAutofillEnabled = FirstAddressAutofillDetails.isAddressAutofillEnabled,
|
||||||
"Firefox",
|
userHasSavedAddress = FirstAddressAutofillDetails.userHasSavedAddress,
|
||||||
"Harrison Street",
|
firstName = FirstAddressAutofillDetails.firstName,
|
||||||
"San Francisco",
|
middleName = FirstAddressAutofillDetails.middleName,
|
||||||
"Alaska",
|
lastName = FirstAddressAutofillDetails.lastName,
|
||||||
"94105",
|
streetAddress = FirstAddressAutofillDetails.streetAddress,
|
||||||
"United States",
|
city = FirstAddressAutofillDetails.city,
|
||||||
"555-5555",
|
state = FirstAddressAutofillDetails.state,
|
||||||
"foo@bar.com",
|
zipCode = FirstAddressAutofillDetails.zipCode,
|
||||||
|
country = FirstAddressAutofillDetails.country,
|
||||||
|
phoneNumber = FirstAddressAutofillDetails.phoneNumber,
|
||||||
|
emailAddress = FirstAddressAutofillDetails.emailAddress,
|
||||||
)
|
)
|
||||||
verifyAddressAutofillSection(true, true)
|
verifyAddressAutofillSection(true, true)
|
||||||
clickManageAddressesButton()
|
clickManageAddressesButton()
|
||||||
|
|
|
@ -22,6 +22,7 @@ import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.ext.bookmarkStorage
|
import org.mozilla.fenix.ext.bookmarkStorage
|
||||||
import org.mozilla.fenix.ext.settings
|
import org.mozilla.fenix.ext.settings
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.registerAndCleanupIdlingResources
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.MockBrowserDataHelper.createBookmarkItem
|
import org.mozilla.fenix.helpers.MockBrowserDataHelper.createBookmarkItem
|
||||||
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
|
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
|
||||||
|
@ -30,7 +31,6 @@ import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.appContext
|
import org.mozilla.fenix.helpers.TestHelper.appContext
|
||||||
import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton
|
import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton
|
||||||
import org.mozilla.fenix.helpers.TestHelper.longTapSelectItem
|
import org.mozilla.fenix.helpers.TestHelper.longTapSelectItem
|
||||||
import org.mozilla.fenix.helpers.TestHelper.registerAndCleanupIdlingResources
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.restartApp
|
import org.mozilla.fenix.helpers.TestHelper.restartApp
|
||||||
import org.mozilla.fenix.ui.robots.bookmarksMenu
|
import org.mozilla.fenix.ui.robots.bookmarksMenu
|
||||||
import org.mozilla.fenix.ui.robots.browserScreen
|
import org.mozilla.fenix.ui.robots.browserScreen
|
||||||
|
|
|
@ -13,12 +13,12 @@ import org.junit.Test
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.setNetworkEnabled
|
||||||
|
import org.mozilla.fenix.helpers.DataGenerationHelper.getStringResource
|
||||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId
|
||||||
import org.mozilla.fenix.helpers.RetryTestRule
|
import org.mozilla.fenix.helpers.RetryTestRule
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
|
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
|
||||||
import org.mozilla.fenix.helpers.TestHelper.getStringResource
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.setNetworkEnabled
|
|
||||||
import org.mozilla.fenix.ui.robots.browserScreen
|
import org.mozilla.fenix.ui.robots.browserScreen
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
import org.mozilla.fenix.ui.robots.navigationToolbar
|
import org.mozilla.fenix.ui.robots.navigationToolbar
|
||||||
|
|
|
@ -20,6 +20,7 @@ import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.ext.bookmarkStorage
|
import org.mozilla.fenix.ext.bookmarkStorage
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.registerAndCleanupIdlingResources
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
|
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
|
||||||
import org.mozilla.fenix.helpers.RetryTestRule
|
import org.mozilla.fenix.helpers.RetryTestRule
|
||||||
|
@ -27,7 +28,6 @@ import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton
|
import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton
|
||||||
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
||||||
import org.mozilla.fenix.helpers.TestHelper.longTapSelectItem
|
import org.mozilla.fenix.helpers.TestHelper.longTapSelectItem
|
||||||
import org.mozilla.fenix.helpers.TestHelper.registerAndCleanupIdlingResources
|
|
||||||
import org.mozilla.fenix.ui.robots.bookmarksMenu
|
import org.mozilla.fenix.ui.robots.bookmarksMenu
|
||||||
import org.mozilla.fenix.ui.robots.browserScreen
|
import org.mozilla.fenix.ui.robots.browserScreen
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
|
@ -78,6 +78,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/522919
|
||||||
@Test
|
@Test
|
||||||
fun verifyEmptyBookmarksMenuTest() {
|
fun verifyEmptyBookmarksMenuTest() {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
|
@ -101,6 +102,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/522920
|
||||||
@Test
|
@Test
|
||||||
fun cancelCreateBookmarkFolderTest() {
|
fun cancelCreateBookmarkFolderTest() {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
|
@ -114,6 +116,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2299619
|
||||||
@Test
|
@Test
|
||||||
fun cancelingChangesInEditModeAreNotSavedTest() {
|
fun cancelingChangesInEditModeAreNotSavedTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -138,6 +141,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/325633
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun editBookmarksNameAndUrlTest() {
|
fun editBookmarksNameAndUrlTest() {
|
||||||
|
@ -165,6 +169,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/341696
|
||||||
@Test
|
@Test
|
||||||
fun copyBookmarkURLTest() {
|
fun copyBookmarkURLTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -191,8 +196,9 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/325634
|
||||||
@Test
|
@Test
|
||||||
fun threeDotMenuShareBookmarkTest() {
|
fun shareBookmarkTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
|
||||||
browserScreen {
|
browserScreen {
|
||||||
|
@ -211,6 +217,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/325636
|
||||||
@Test
|
@Test
|
||||||
fun openBookmarkInNewTabTest() {
|
fun openBookmarkInNewTabTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -229,6 +236,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1919261
|
||||||
@Test
|
@Test
|
||||||
fun verifyOpenAllInNewTabsOptionTest() {
|
fun verifyOpenAllInNewTabsOptionTest() {
|
||||||
val webPages = listOf(
|
val webPages = listOf(
|
||||||
|
@ -271,6 +279,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1919262
|
||||||
@Test
|
@Test
|
||||||
fun verifyOpenAllInPrivateTabsTest() {
|
fun verifyOpenAllInPrivateTabsTest() {
|
||||||
val webPages = listOf(
|
val webPages = listOf(
|
||||||
|
@ -306,6 +315,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/325637
|
||||||
@Test
|
@Test
|
||||||
fun openBookmarkInPrivateTabTest() {
|
fun openBookmarkInPrivateTabTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -324,6 +334,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/325635
|
||||||
@Test
|
@Test
|
||||||
fun deleteBookmarkTest() {
|
fun deleteBookmarkTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -351,6 +362,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2300275
|
||||||
@Test
|
@Test
|
||||||
fun bookmarksMultiSelectionToolbarItemsTest() {
|
fun bookmarksMultiSelectionToolbarItemsTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -376,6 +388,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2300276
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun openMultipleSelectedBookmarksInANewTabTest() {
|
fun openMultipleSelectedBookmarksInANewTabTest() {
|
||||||
|
@ -406,6 +419,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2300277
|
||||||
@Test
|
@Test
|
||||||
fun openMultipleSelectedBookmarksInPrivateTabTest() {
|
fun openMultipleSelectedBookmarksInPrivateTabTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -429,6 +443,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/325644
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun deleteMultipleSelectedBookmarksTest() {
|
fun deleteMultipleSelectedBookmarksTest() {
|
||||||
|
@ -476,8 +491,9 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2301355
|
||||||
@Test
|
@Test
|
||||||
fun multipleSelectionShareButtonTest() {
|
fun shareMultipleSelectedBookmarksTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
|
||||||
browserScreen {
|
browserScreen {
|
||||||
|
@ -500,6 +516,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/325639
|
||||||
@Test
|
@Test
|
||||||
fun createBookmarkFolderTest() {
|
fun createBookmarkFolderTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -524,6 +541,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/325645
|
||||||
@Test
|
@Test
|
||||||
fun navigateBookmarksFoldersTest() {
|
fun navigateBookmarksFoldersTest() {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
|
@ -547,8 +565,9 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/374855
|
||||||
@Test
|
@Test
|
||||||
fun cantSelectDesktopFoldersTest() {
|
fun cantSelectDefaultFoldersTest() {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
}.openBookmarks {
|
}.openBookmarks {
|
||||||
|
@ -561,6 +580,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2299703
|
||||||
@Test
|
@Test
|
||||||
fun deleteBookmarkInEditModeTest() {
|
fun deleteBookmarkInEditModeTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -583,6 +603,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1715710
|
||||||
@Test
|
@Test
|
||||||
fun verifySearchBookmarksViewTest() {
|
fun verifySearchBookmarksViewTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -654,6 +675,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1715711
|
||||||
@Test
|
@Test
|
||||||
fun verifyVoiceSearchInBookmarksTest() {
|
fun verifyVoiceSearchInBookmarksTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -707,6 +729,7 @@ class ComposeBookmarksTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/325642
|
||||||
// Verifies that deleting a Bookmarks folder also removes the item from inside it.
|
// Verifies that deleting a Bookmarks folder also removes the item from inside it.
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -65,6 +65,7 @@ class ComposeCollectionTest {
|
||||||
mockWebServer.shutdown()
|
mockWebServer.shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/353823
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun createFirstCollectionUsingHomeScreenButtonTest() {
|
fun createFirstCollectionUsingHomeScreenButtonTest() {
|
||||||
|
@ -97,6 +98,7 @@ class ComposeCollectionTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/343422
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun verifyExpandedCollectionItemsTest() {
|
fun verifyExpandedCollectionItemsTest() {
|
||||||
|
@ -147,6 +149,7 @@ class ComposeCollectionTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/343425
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun openAllTabsFromACollectionTest() {
|
fun openAllTabsFromACollectionTest() {
|
||||||
|
@ -181,6 +184,7 @@ class ComposeCollectionTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/343426
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun shareAllTabsFromACollectionTest() {
|
fun shareAllTabsFromACollectionTest() {
|
||||||
|
@ -208,6 +212,7 @@ class ComposeCollectionTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/343428
|
||||||
// Test running on beta/release builds in CI:
|
// Test running on beta/release builds in CI:
|
||||||
// caution when making changes to it, so they don't block the builds
|
// caution when making changes to it, so they don't block the builds
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
|
@ -248,6 +253,7 @@ class ComposeCollectionTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2319453
|
||||||
// open a webpage, and add currently opened tab to existing collection
|
// open a webpage, and add currently opened tab to existing collection
|
||||||
@Test
|
@Test
|
||||||
fun saveTabToExistingCollectionFromMainMenuTest() {
|
fun saveTabToExistingCollectionFromMainMenuTest() {
|
||||||
|
@ -276,8 +282,9 @@ class ComposeCollectionTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Testrail link: https://testrail.stage.mozaws.net/index.php?/cases/view/343423
|
||||||
@Test
|
@Test
|
||||||
fun verifyAddTabButtonOfCollectionMenu() {
|
fun saveTabToExistingCollectionUsingTheAddTabButtonTest() {
|
||||||
val firstWebPage = getGenericAsset(mockWebServer, 1)
|
val firstWebPage = getGenericAsset(mockWebServer, 1)
|
||||||
val secondWebPage = getGenericAsset(mockWebServer, 2)
|
val secondWebPage = getGenericAsset(mockWebServer, 2)
|
||||||
|
|
||||||
|
@ -303,6 +310,7 @@ class ComposeCollectionTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/343424
|
||||||
@Test
|
@Test
|
||||||
fun renameCollectionTest() {
|
fun renameCollectionTest() {
|
||||||
val webPage = getGenericAsset(mockWebServer, 1)
|
val webPage = getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -325,6 +333,7 @@ class ComposeCollectionTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/991248
|
||||||
@Test
|
@Test
|
||||||
fun createCollectionUsingSelectTabsButtonTest() {
|
fun createCollectionUsingSelectTabsButtonTest() {
|
||||||
val firstWebPage = getGenericAsset(mockWebServer, 1)
|
val firstWebPage = getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -347,6 +356,7 @@ class ComposeCollectionTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2319455
|
||||||
@Test
|
@Test
|
||||||
fun removeTabFromCollectionUsingTheCloseButtonTest() {
|
fun removeTabFromCollectionUsingTheCloseButtonTest() {
|
||||||
val webPage = getGenericAsset(mockWebServer, 1)
|
val webPage = getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -378,6 +388,7 @@ class ComposeCollectionTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/343427
|
||||||
@Test
|
@Test
|
||||||
fun removeTabFromCollectionUsingSwipeLeftActionTest() {
|
fun removeTabFromCollectionUsingSwipeLeftActionTest() {
|
||||||
val testPage = getGenericAsset(mockWebServer, 1)
|
val testPage = getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -410,6 +421,7 @@ class ComposeCollectionTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/991278
|
||||||
@Test
|
@Test
|
||||||
fun removeTabFromCollectionUsingSwipeRightActionTest() {
|
fun removeTabFromCollectionUsingSwipeRightActionTest() {
|
||||||
val testPage = getGenericAsset(mockWebServer, 1)
|
val testPage = getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -442,6 +454,7 @@ class ComposeCollectionTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/991276
|
||||||
@Test
|
@Test
|
||||||
fun createCollectionByLongPressingOpenTabsTest() {
|
fun createCollectionByLongPressingOpenTabsTest() {
|
||||||
val firstWebPage = getGenericAsset(mockWebServer, 1)
|
val firstWebPage = getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -474,6 +487,7 @@ class ComposeCollectionTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/344897
|
||||||
@Test
|
@Test
|
||||||
fun navigateBackInCollectionFlowTest() {
|
fun navigateBackInCollectionFlowTest() {
|
||||||
val webPage = getGenericAsset(mockWebServer, 1)
|
val webPage = getGenericAsset(mockWebServer, 1)
|
||||||
|
|
|
@ -15,13 +15,13 @@ import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.mozilla.fenix.ext.settings
|
import org.mozilla.fenix.ext.settings
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.assertExternalAppOpens
|
||||||
import org.mozilla.fenix.helpers.Constants
|
import org.mozilla.fenix.helpers.Constants
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper.itemContainingText
|
import org.mozilla.fenix.helpers.MatcherHelper.itemContainingText
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper.itemWithText
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithText
|
||||||
import org.mozilla.fenix.helpers.RetryTestRule
|
import org.mozilla.fenix.helpers.RetryTestRule
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.assertExternalAppOpens
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton
|
import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton
|
||||||
import org.mozilla.fenix.ui.robots.clickContextMenuItem
|
import org.mozilla.fenix.ui.robots.clickContextMenuItem
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
|
@ -75,6 +75,7 @@ class ComposeContextMenusTest {
|
||||||
mockWebServer.shutdown()
|
mockWebServer.shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243837
|
||||||
@Test
|
@Test
|
||||||
fun verifyOpenLinkNewTabContextMenuOptionTest() {
|
fun verifyOpenLinkNewTabContextMenuOptionTest() {
|
||||||
val pageLinks =
|
val pageLinks =
|
||||||
|
@ -98,6 +99,7 @@ class ComposeContextMenusTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/244655
|
||||||
@Test
|
@Test
|
||||||
fun verifyOpenLinkInNewPrivateTabContextMenuOptionTest() {
|
fun verifyOpenLinkInNewPrivateTabContextMenuOptionTest() {
|
||||||
val pageLinks =
|
val pageLinks =
|
||||||
|
@ -120,6 +122,7 @@ class ComposeContextMenusTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243832
|
||||||
@Test
|
@Test
|
||||||
fun verifyCopyLinkContextMenuOptionTest() {
|
fun verifyCopyLinkContextMenuOptionTest() {
|
||||||
val pageLinks =
|
val pageLinks =
|
||||||
|
@ -140,6 +143,7 @@ class ComposeContextMenusTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243838
|
||||||
@Test
|
@Test
|
||||||
fun verifyShareLinkContextMenuOptionTest() {
|
fun verifyShareLinkContextMenuOptionTest() {
|
||||||
val pageLinks =
|
val pageLinks =
|
||||||
|
@ -159,6 +163,7 @@ class ComposeContextMenusTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243833
|
||||||
@Test
|
@Test
|
||||||
fun verifyOpenImageNewTabContextMenuOptionTest() {
|
fun verifyOpenImageNewTabContextMenuOptionTest() {
|
||||||
val pageLinks =
|
val pageLinks =
|
||||||
|
@ -178,6 +183,7 @@ class ComposeContextMenusTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243834
|
||||||
@Test
|
@Test
|
||||||
fun verifyCopyImageLocationContextMenuOptionTest() {
|
fun verifyCopyImageLocationContextMenuOptionTest() {
|
||||||
val pageLinks =
|
val pageLinks =
|
||||||
|
@ -198,6 +204,7 @@ class ComposeContextMenusTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243835
|
||||||
@Test
|
@Test
|
||||||
fun verifySaveImageContextMenuOptionTest() {
|
fun verifySaveImageContextMenuOptionTest() {
|
||||||
val pageLinks =
|
val pageLinks =
|
||||||
|
@ -221,6 +228,7 @@ class ComposeContextMenusTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/352050
|
||||||
@Test
|
@Test
|
||||||
fun verifyContextMenuLinkVariationsTest() {
|
fun verifyContextMenuLinkVariationsTest() {
|
||||||
val pageLinks =
|
val pageLinks =
|
||||||
|
@ -244,6 +252,7 @@ class ComposeContextMenusTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2333840
|
||||||
@Test
|
@Test
|
||||||
fun verifyPDFContextMenuLinkVariationsTest() {
|
fun verifyPDFContextMenuLinkVariationsTest() {
|
||||||
val genericURL =
|
val genericURL =
|
||||||
|
@ -264,6 +273,7 @@ class ComposeContextMenusTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/832094
|
||||||
@Test
|
@Test
|
||||||
fun verifyOpenLinkInAppContextMenuOptionTest() {
|
fun verifyOpenLinkInAppContextMenuOptionTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getExternalLinksAsset(mockWebServer)
|
val defaultWebPage = TestAssetHelper.getExternalLinksAsset(mockWebServer)
|
||||||
|
|
|
@ -22,12 +22,12 @@ import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.ext.settings
|
import org.mozilla.fenix.ext.settings
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.registerAndCleanupIdlingResources
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
|
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
||||||
import org.mozilla.fenix.helpers.TestHelper.longTapSelectItem
|
import org.mozilla.fenix.helpers.TestHelper.longTapSelectItem
|
||||||
import org.mozilla.fenix.helpers.TestHelper.registerAndCleanupIdlingResources
|
|
||||||
import org.mozilla.fenix.ui.robots.browserScreen
|
import org.mozilla.fenix.ui.robots.browserScreen
|
||||||
import org.mozilla.fenix.ui.robots.historyMenu
|
import org.mozilla.fenix.ui.robots.historyMenu
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
|
@ -74,6 +74,7 @@ class ComposeHistoryTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243285
|
||||||
@Test
|
@Test
|
||||||
fun verifyEmptyHistoryMenuTest() {
|
fun verifyEmptyHistoryMenuTest() {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
|
@ -85,6 +86,7 @@ class ComposeHistoryTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2302742
|
||||||
// Test running on beta/release builds in CI:
|
// Test running on beta/release builds in CI:
|
||||||
// caution when making changes to it, so they don't block the builds
|
// caution when making changes to it, so they don't block the builds
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
|
@ -110,6 +112,7 @@ class ComposeHistoryTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243288
|
||||||
@Test
|
@Test
|
||||||
fun deleteHistoryItemTest() {
|
fun deleteHistoryItemTest() {
|
||||||
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -130,6 +133,7 @@ class ComposeHistoryTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1848881
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun deleteAllHistoryTest() {
|
fun deleteAllHistoryTest() {
|
||||||
|
@ -154,6 +158,7 @@ class ComposeHistoryTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/339690
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun historyMultiSelectionToolbarItemsTest() {
|
fun historyMultiSelectionToolbarItemsTest() {
|
||||||
|
@ -182,6 +187,7 @@ class ComposeHistoryTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/339696
|
||||||
@Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1807268")
|
@Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1807268")
|
||||||
@Test
|
@Test
|
||||||
fun openMultipleSelectedHistoryItemsInANewTabTest() {
|
fun openMultipleSelectedHistoryItemsInANewTabTest() {
|
||||||
|
@ -212,6 +218,7 @@ class ComposeHistoryTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/346098
|
||||||
@Test
|
@Test
|
||||||
fun openMultipleSelectedHistoryItemsInPrivateTabTest() {
|
fun openMultipleSelectedHistoryItemsInPrivateTabTest() {
|
||||||
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -237,6 +244,7 @@ class ComposeHistoryTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/346099
|
||||||
@Test
|
@Test
|
||||||
fun deleteMultipleSelectedHistoryItemsTest() {
|
fun deleteMultipleSelectedHistoryItemsTest() {
|
||||||
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -271,6 +279,7 @@ class ComposeHistoryTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/339701
|
||||||
@Test
|
@Test
|
||||||
fun shareMultipleSelectedHistoryItemsTest() {
|
fun shareMultipleSelectedHistoryItemsTest() {
|
||||||
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -297,6 +306,7 @@ class ComposeHistoryTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1715627
|
||||||
@Test
|
@Test
|
||||||
fun verifySearchHistoryViewTest() {
|
fun verifySearchHistoryViewTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -339,6 +349,7 @@ class ComposeHistoryTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1715631
|
||||||
@Test
|
@Test
|
||||||
fun verifyVoiceSearchInHistoryTest() {
|
fun verifyVoiceSearchInHistoryTest() {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
|
@ -351,6 +362,7 @@ class ComposeHistoryTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1715632
|
||||||
@Test
|
@Test
|
||||||
fun verifySearchForHistoryItemsTest() {
|
fun verifySearchForHistoryItemsTest() {
|
||||||
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -376,6 +388,7 @@ class ComposeHistoryTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1715634
|
||||||
@Test
|
@Test
|
||||||
fun verifyDeletedHistoryItemsCanNotBeSearchedTest() {
|
fun verifyDeletedHistoryItemsCanNotBeSearchedTest() {
|
||||||
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -418,6 +431,7 @@ class ComposeHistoryTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/903590
|
||||||
// Test running on beta/release builds in CI:
|
// Test running on beta/release builds in CI:
|
||||||
// caution when making changes to it, so they don't block the builds
|
// caution when making changes to it, so they don't block the builds
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
|
|
|
@ -146,22 +146,6 @@ class ComposeHomeScreenTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1569867
|
|
||||||
@Test
|
|
||||||
fun verifyJumpBackInContextualHintTest() {
|
|
||||||
activityTestRule.activityRule.applySettingsExceptions {
|
|
||||||
it.isJumpBackInCFREnabled = true
|
|
||||||
}
|
|
||||||
|
|
||||||
val genericPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
|
||||||
|
|
||||||
navigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(genericPage.url) {
|
|
||||||
}.goToHomescreen {
|
|
||||||
verifyJumpBackInMessage(activityTestRule)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1569839
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1569839
|
||||||
@Test
|
@Test
|
||||||
fun verifyCustomizeHomepageButtonTest() {
|
fun verifyCustomizeHomepageButtonTest() {
|
||||||
|
|
|
@ -139,7 +139,7 @@ class ComposeMediaNotificationTest {
|
||||||
mDevice.pressBack()
|
mDevice.pressBack()
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/903595
|
// TestRail: https://testrail.stage.mozaws.net/index.php?/cases/view/903595
|
||||||
@Test
|
@Test
|
||||||
fun mediaSystemNotificationInPrivateModeTest() {
|
fun mediaSystemNotificationInPrivateModeTest() {
|
||||||
val audioTestPage = TestAssetHelper.getAudioPageAsset(mockWebServer)
|
val audioTestPage = TestAssetHelper.getAudioPageAsset(mockWebServer)
|
||||||
|
|
|
@ -14,9 +14,9 @@ import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.runWithSystemLocaleChanged
|
||||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.runWithSystemLocaleChanged
|
|
||||||
import org.mozilla.fenix.ui.robots.navigationToolbar
|
import org.mozilla.fenix.ui.robots.navigationToolbar
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@ class ComposeNavigationToolbarTest {
|
||||||
mockWebServer.shutdown()
|
mockWebServer.shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/987326
|
||||||
// Swipes the nav bar left/right to switch between tabs
|
// Swipes the nav bar left/right to switch between tabs
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
|
@ -75,6 +76,7 @@ class ComposeNavigationToolbarTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/987327
|
||||||
// Because it requires changing system prefs, this test will run only on Debug builds
|
// Because it requires changing system prefs, this test will run only on Debug builds
|
||||||
@Test
|
@Test
|
||||||
fun swipeToSwitchTabInRTLTest() {
|
fun swipeToSwitchTabInRTLTest() {
|
||||||
|
|
|
@ -17,6 +17,10 @@ import org.junit.Ignore
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.assertNativeAppOpens
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.denyPermission
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.grantSystemPermission
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.verifyKeyboardVisibility
|
||||||
import org.mozilla.fenix.helpers.Constants
|
import org.mozilla.fenix.helpers.Constants
|
||||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper
|
import org.mozilla.fenix.helpers.MatcherHelper
|
||||||
|
@ -27,7 +31,6 @@ import org.mozilla.fenix.helpers.SearchDispatcher
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper
|
import org.mozilla.fenix.helpers.TestHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
||||||
import org.mozilla.fenix.helpers.TestHelper.verifyKeyboardVisibility
|
|
||||||
import org.mozilla.fenix.ui.robots.clickContextMenuItem
|
import org.mozilla.fenix.ui.robots.clickContextMenuItem
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
|
@ -61,7 +64,6 @@ class ComposeSearchTest {
|
||||||
isRecentTabsFeatureEnabled = false,
|
isRecentTabsFeatureEnabled = false,
|
||||||
isTCPCFREnabled = false,
|
isTCPCFREnabled = false,
|
||||||
isWallpaperOnboardingEnabled = false,
|
isWallpaperOnboardingEnabled = false,
|
||||||
isCookieBannerReductionDialogEnabled = false,
|
|
||||||
tabsTrayRewriteEnabled = true,
|
tabsTrayRewriteEnabled = true,
|
||||||
),
|
),
|
||||||
) { it.activity }
|
) { it.activity }
|
||||||
|
@ -79,13 +81,14 @@ class ComposeSearchTest {
|
||||||
searchMockServer.shutdown()
|
searchMockServer.shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2154189
|
||||||
@Test
|
@Test
|
||||||
fun verifySearchBarItemsTest() {
|
fun verifySearchBarItemsTest() {
|
||||||
navigationToolbar {
|
navigationToolbar {
|
||||||
verifyDefaultSearchEngine("Google")
|
verifyDefaultSearchEngine("Google")
|
||||||
verifySearchBarPlaceholder("Search or enter address")
|
verifySearchBarPlaceholder("Search or enter address")
|
||||||
}.clickUrlbar {
|
}.clickUrlbar {
|
||||||
TestHelper.verifyKeyboardVisibility(isExpectedToBeVisible = true)
|
verifyKeyboardVisibility(isExpectedToBeVisible = true)
|
||||||
verifyScanButtonVisibility(visible = true)
|
verifyScanButtonVisibility(visible = true)
|
||||||
verifyVoiceSearchButtonVisibility(enabled = true)
|
verifyVoiceSearchButtonVisibility(enabled = true)
|
||||||
verifySearchBarPlaceholder("Search or enter address")
|
verifySearchBarPlaceholder("Search or enter address")
|
||||||
|
@ -95,6 +98,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2154190
|
||||||
@Test
|
@Test
|
||||||
fun verifySearchSelectorMenuItemsTest() {
|
fun verifySearchSelectorMenuItemsTest() {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
|
@ -109,6 +113,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2154194
|
||||||
@Test
|
@Test
|
||||||
fun verifySearchPlaceholderForGeneralDefaultSearchEnginesTest() {
|
fun verifySearchPlaceholderForGeneralDefaultSearchEnginesTest() {
|
||||||
generalEnginesList.forEach {
|
generalEnginesList.forEach {
|
||||||
|
@ -126,6 +131,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2154195
|
||||||
@Test
|
@Test
|
||||||
fun verifySearchPlaceholderForNotDefaultGeneralSearchEnginesTest() {
|
fun verifySearchPlaceholderForNotDefaultGeneralSearchEnginesTest() {
|
||||||
val generalEnginesList = listOf("DuckDuckGo", "Bing")
|
val generalEnginesList = listOf("DuckDuckGo", "Bing")
|
||||||
|
@ -140,6 +146,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2154196
|
||||||
@Test
|
@Test
|
||||||
fun verifySearchPlaceholderForTopicSpecificSearchEnginesTest() {
|
fun verifySearchPlaceholderForTopicSpecificSearchEnginesTest() {
|
||||||
val topicEnginesList = listOf("Amazon.com", "Wikipedia", "eBay")
|
val topicEnginesList = listOf("Amazon.com", "Wikipedia", "eBay")
|
||||||
|
@ -154,6 +161,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1059459
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun verifyQRScanningCameraAccessDialogTest() {
|
fun verifyQRScanningCameraAccessDialogTest() {
|
||||||
|
@ -163,7 +171,7 @@ class ComposeSearchTest {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
}.openSearch {
|
}.openSearch {
|
||||||
clickScanButton()
|
clickScanButton()
|
||||||
TestHelper.denyPermission()
|
denyPermission()
|
||||||
clickScanButton()
|
clickScanButton()
|
||||||
clickDismissPermissionRequiredDialog()
|
clickDismissPermissionRequiredDialog()
|
||||||
}
|
}
|
||||||
|
@ -171,10 +179,11 @@ class ComposeSearchTest {
|
||||||
}.openSearch {
|
}.openSearch {
|
||||||
clickScanButton()
|
clickScanButton()
|
||||||
clickGoToPermissionsSettings()
|
clickGoToPermissionsSettings()
|
||||||
TestHelper.assertNativeAppOpens(Constants.PackageName.ANDROID_SETTINGS)
|
assertNativeAppOpens(Constants.PackageName.ANDROID_SETTINGS)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/235397
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun scanQRCodeToOpenAWebpageTest() {
|
fun scanQRCodeToOpenAWebpageTest() {
|
||||||
|
@ -184,11 +193,12 @@ class ComposeSearchTest {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
}.openSearch {
|
}.openSearch {
|
||||||
clickScanButton()
|
clickScanButton()
|
||||||
TestHelper.grantSystemPermission()
|
grantSystemPermission()
|
||||||
verifyScannerOpen()
|
verifyScannerOpen()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2154191
|
||||||
@Test
|
@Test
|
||||||
fun verifyScanButtonAvailableOnlyForGeneralSearchEnginesTest() {
|
fun verifyScanButtonAvailableOnlyForGeneralSearchEnginesTest() {
|
||||||
generalEnginesList.forEach {
|
generalEnginesList.forEach {
|
||||||
|
@ -210,6 +220,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/235395
|
||||||
// Verifies a temporary change of search engine from the Search shortcut menu
|
// Verifies a temporary change of search engine from the Search shortcut menu
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
|
@ -229,6 +240,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/233589
|
||||||
@Test
|
@Test
|
||||||
fun defaultSearchEnginesCanBeSetFromSearchSelectorMenuTest() {
|
fun defaultSearchEnginesCanBeSetFromSearchSelectorMenuTest() {
|
||||||
searchScreen {
|
searchScreen {
|
||||||
|
@ -246,6 +258,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/522918
|
||||||
@Test
|
@Test
|
||||||
fun verifyClearSearchButtonTest() {
|
fun verifyClearSearchButtonTest() {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
|
@ -256,6 +269,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1623441
|
||||||
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
|
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
|
@ -284,6 +298,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1592229
|
||||||
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
|
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
|
||||||
@Test
|
@Test
|
||||||
fun verifyAPageIsAddedToASearchGroupOnlyOnceTest() {
|
fun verifyAPageIsAddedToASearchGroupOnlyOnceTest() {
|
||||||
|
@ -329,6 +344,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1591782
|
||||||
@Ignore("Failing due to known bug, see https://github.com/mozilla-mobile/fenix/issues/23818")
|
@Ignore("Failing due to known bug, see https://github.com/mozilla-mobile/fenix/issues/23818")
|
||||||
@Test
|
@Test
|
||||||
fun searchGroupIsGeneratedWhenNavigatingInTheSameTabTest() {
|
fun searchGroupIsGeneratedWhenNavigatingInTheSameTabTest() {
|
||||||
|
@ -352,6 +368,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1591781
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun searchGroupIsNotGeneratedForLinksOpenedInPrivateTabsTest() {
|
fun searchGroupIsNotGeneratedForLinksOpenedInPrivateTabsTest() {
|
||||||
|
@ -383,6 +400,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1592269
|
||||||
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
|
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
|
@ -425,6 +443,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1592242
|
||||||
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
|
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
|
||||||
@Test
|
@Test
|
||||||
fun deleteSearchGroupFromHomeScreenTest() {
|
fun deleteSearchGroupFromHomeScreenTest() {
|
||||||
|
@ -465,6 +484,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1592235
|
||||||
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
|
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
|
||||||
@Test
|
@Test
|
||||||
fun openAPageFromHomeScreenSearchGroupTest() {
|
fun openAPageFromHomeScreenSearchGroupTest() {
|
||||||
|
@ -513,6 +533,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1592238
|
||||||
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
|
@Ignore("Test run timing out: https://github.com/mozilla-mobile/fenix/issues/27704")
|
||||||
@Test
|
@Test
|
||||||
fun shareAPageFromHomeScreenSearchGroupTest() {
|
fun shareAPageFromHomeScreenSearchGroupTest() {
|
||||||
|
@ -551,6 +572,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1232633
|
||||||
// Default search code for Google-US
|
// Default search code for Google-US
|
||||||
@Test
|
@Test
|
||||||
fun defaultSearchCodeGoogleUS() {
|
fun defaultSearchCodeGoogleUS() {
|
||||||
|
@ -571,6 +593,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1232637
|
||||||
// Default search code for Bing-US
|
// Default search code for Bing-US
|
||||||
@Test
|
@Test
|
||||||
fun defaultSearchCodeBingUS() {
|
fun defaultSearchCodeBingUS() {
|
||||||
|
@ -600,6 +623,7 @@ class ComposeSearchTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1232638
|
||||||
// Default search code for DuckDuckGo-US
|
// Default search code for DuckDuckGo-US
|
||||||
@Test
|
@Test
|
||||||
fun defaultSearchCodeDuckDuckGoUS() {
|
fun defaultSearchCodeDuckDuckGoUS() {
|
||||||
|
|
|
@ -17,17 +17,18 @@ import org.junit.Test
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.clearDownloadsFolder
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.setNetworkEnabled
|
||||||
|
import org.mozilla.fenix.helpers.DataGenerationHelper.getStringResource
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper
|
import org.mozilla.fenix.helpers.MatcherHelper
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.getStorageTestAsset
|
import org.mozilla.fenix.helpers.TestAssetHelper.getStorageTestAsset
|
||||||
import org.mozilla.fenix.helpers.TestHelper
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.deleteDownloadedFileOnStorage
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
||||||
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
||||||
import org.mozilla.fenix.helpers.TestHelper.restartApp
|
import org.mozilla.fenix.helpers.TestHelper.restartApp
|
||||||
import org.mozilla.fenix.helpers.TestHelper.setNetworkEnabled
|
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
|
import org.mozilla.fenix.ui.robots.downloadRobot
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
import org.mozilla.fenix.ui.robots.navigationToolbar
|
import org.mozilla.fenix.ui.robots.navigationToolbar
|
||||||
|
|
||||||
|
@ -65,8 +66,12 @@ class ComposeSettingsDeleteBrowsingDataOnQuitTest {
|
||||||
@After
|
@After
|
||||||
fun tearDown() {
|
fun tearDown() {
|
||||||
mockWebServer.shutdown()
|
mockWebServer.shutdown()
|
||||||
|
|
||||||
|
// Check and clear the downloads folder
|
||||||
|
clearDownloadsFolder()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/416048
|
||||||
@Test
|
@Test
|
||||||
fun deleteBrowsingDataOnQuitSettingTest() {
|
fun deleteBrowsingDataOnQuitSettingTest() {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
|
@ -95,6 +100,7 @@ class ComposeSettingsDeleteBrowsingDataOnQuitTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/416049
|
||||||
@Test
|
@Test
|
||||||
fun deleteOpenTabsOnQuitTest() {
|
fun deleteOpenTabsOnQuitTest() {
|
||||||
val testPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val testPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -119,6 +125,7 @@ class ComposeSettingsDeleteBrowsingDataOnQuitTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/416050
|
||||||
@Test
|
@Test
|
||||||
fun deleteBrowsingHistoryOnQuitTest() {
|
fun deleteBrowsingHistoryOnQuitTest() {
|
||||||
val genericPage =
|
val genericPage =
|
||||||
|
@ -182,6 +189,7 @@ class ComposeSettingsDeleteBrowsingDataOnQuitTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1243096
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun deleteDownloadsOnQuitTest() {
|
fun deleteDownloadsOnQuitTest() {
|
||||||
|
@ -194,13 +202,10 @@ class ComposeSettingsDeleteBrowsingDataOnQuitTest {
|
||||||
clickDeleteBrowsingOnQuitButtonSwitch()
|
clickDeleteBrowsingOnQuitButtonSwitch()
|
||||||
exitMenu()
|
exitMenu()
|
||||||
}
|
}
|
||||||
navigationToolbar {
|
downloadRobot {
|
||||||
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
openPageAndDownloadFile(url = downloadTestPage.toUri(), downloadFile = "smallZip.zip")
|
||||||
}.clickDownloadLink("smallZip.zip") {
|
|
||||||
verifyDownloadPrompt("smallZip.zip")
|
|
||||||
}.clickDownload {
|
|
||||||
verifyDownloadCompleteNotificationPopup()
|
verifyDownloadCompleteNotificationPopup()
|
||||||
}.closeCompletedDownloadPrompt {
|
}.closeDownloadPrompt {
|
||||||
}.goToHomescreen {
|
}.goToHomescreen {
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
clickQuit()
|
clickQuit()
|
||||||
|
@ -212,9 +217,9 @@ class ComposeSettingsDeleteBrowsingDataOnQuitTest {
|
||||||
}.openDownloadsManager {
|
}.openDownloadsManager {
|
||||||
verifyEmptyDownloadsList()
|
verifyEmptyDownloadsList()
|
||||||
}
|
}
|
||||||
deleteDownloadedFileOnStorage("smallZip.zip")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/416053
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun deleteSitePermissionsOnQuitTest() {
|
fun deleteSitePermissionsOnQuitTest() {
|
||||||
|
@ -250,9 +255,10 @@ class ComposeSettingsDeleteBrowsingDataOnQuitTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/416052
|
||||||
@Test
|
@Test
|
||||||
fun deleteCachedFilesOnQuitTest() {
|
fun deleteCachedFilesOnQuitTest() {
|
||||||
val pocketTopArticles = TestHelper.getStringResource(R.string.pocket_pinned_top_articles)
|
val pocketTopArticles = getStringResource(R.string.pocket_pinned_top_articles)
|
||||||
|
|
||||||
homeScreen {
|
homeScreen {
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
|
|
|
@ -13,15 +13,15 @@ import org.junit.Test
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.setNetworkEnabled
|
||||||
|
import org.mozilla.fenix.helpers.DataGenerationHelper.getStringResource
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.getStorageTestAsset
|
import org.mozilla.fenix.helpers.TestAssetHelper.getStorageTestAsset
|
||||||
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
||||||
import org.mozilla.fenix.helpers.TestHelper.getStringResource
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
||||||
import org.mozilla.fenix.helpers.TestHelper.restartApp
|
import org.mozilla.fenix.helpers.TestHelper.restartApp
|
||||||
import org.mozilla.fenix.helpers.TestHelper.setNetworkEnabled
|
|
||||||
import org.mozilla.fenix.ui.robots.browserScreen
|
import org.mozilla.fenix.ui.robots.browserScreen
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
|
@ -58,6 +58,7 @@ class ComposeSettingsDeleteBrowsingDataTest {
|
||||||
mockWebServer.shutdown()
|
mockWebServer.shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/937561
|
||||||
@Test
|
@Test
|
||||||
fun deleteBrowsingDataOptionStatesTest() {
|
fun deleteBrowsingDataOptionStatesTest() {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
|
@ -116,6 +117,7 @@ class ComposeSettingsDeleteBrowsingDataTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/517811
|
||||||
@Test
|
@Test
|
||||||
fun deleteOpenTabsBrowsingDataWithNoOpenTabsTest() {
|
fun deleteOpenTabsBrowsingDataWithNoOpenTabsTest() {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
|
@ -133,6 +135,7 @@ class ComposeSettingsDeleteBrowsingDataTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/353531
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun deleteOpenTabsBrowsingDataTest() {
|
fun deleteOpenTabsBrowsingDataTest() {
|
||||||
|
@ -165,6 +168,7 @@ class ComposeSettingsDeleteBrowsingDataTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/378864
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun deleteBrowsingHistoryTest() {
|
fun deleteBrowsingHistoryTest() {
|
||||||
|
@ -195,6 +199,7 @@ class ComposeSettingsDeleteBrowsingDataTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/416041
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun deleteCookiesAndSiteDataTest() {
|
fun deleteCookiesAndSiteDataTest() {
|
||||||
|
@ -233,6 +238,7 @@ class ComposeSettingsDeleteBrowsingDataTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/416042
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun deleteCachedFilesTest() {
|
fun deleteCachedFilesTest() {
|
||||||
|
|
|
@ -25,7 +25,6 @@ import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton
|
import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton
|
||||||
import org.mozilla.fenix.helpers.TestHelper.closeApp
|
import org.mozilla.fenix.helpers.TestHelper.closeApp
|
||||||
import org.mozilla.fenix.helpers.TestHelper.restartApp
|
import org.mozilla.fenix.helpers.TestHelper.restartApp
|
||||||
import org.mozilla.fenix.helpers.TestHelper.verifyKeyboardVisibility
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.verifySnackBarText
|
import org.mozilla.fenix.helpers.TestHelper.verifySnackBarText
|
||||||
import org.mozilla.fenix.ui.robots.browserScreen
|
import org.mozilla.fenix.ui.robots.browserScreen
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
|
@ -86,7 +85,7 @@ class ComposeTabbedBrowsingTest {
|
||||||
mockWebServer.shutdown()
|
mockWebServer.shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail: https://testrail.stage.mozaws.net/index.php?/cases/view/903599
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/903599
|
||||||
@Test
|
@Test
|
||||||
fun closeAllTabsTest() {
|
fun closeAllTabsTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -118,9 +117,9 @@ class ComposeTabbedBrowsingTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail: https://testrail.stage.mozaws.net/index.php?/cases/view/903604
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2349580
|
||||||
@Test
|
@Test
|
||||||
fun closingTabsMethodsTest() {
|
fun closingTabsTest() {
|
||||||
val genericURL = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val genericURL = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
|
||||||
navigationToolbar {
|
navigationToolbar {
|
||||||
|
@ -133,36 +132,43 @@ class ComposeTabbedBrowsingTest {
|
||||||
}
|
}
|
||||||
browserScreen {
|
browserScreen {
|
||||||
verifyTabCounter("1")
|
verifyTabCounter("1")
|
||||||
}.openComposeTabDrawer(composeTestRule) {
|
|
||||||
closeTab()
|
|
||||||
}
|
}
|
||||||
homeScreen {
|
}
|
||||||
verifyTabCounter("0")
|
|
||||||
}.openNavigationToolbar {
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/903604
|
||||||
|
@Test
|
||||||
|
fun swipeToCloseTabsTest() {
|
||||||
|
val genericURL = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
|
||||||
|
navigationToolbar {
|
||||||
}.enterURLAndEnterToBrowser(genericURL.url) {
|
}.enterURLAndEnterToBrowser(genericURL.url) {
|
||||||
|
waitForPageToLoad()
|
||||||
}.openComposeTabDrawer(composeTestRule) {
|
}.openComposeTabDrawer(composeTestRule) {
|
||||||
verifyExistingOpenTabs("Test_Page_1")
|
verifyExistingOpenTabs("Test_Page_1")
|
||||||
swipeTabRight("Test_Page_1")
|
swipeTabRight("Test_Page_1")
|
||||||
|
verifySnackBarText("Tab closed")
|
||||||
}
|
}
|
||||||
homeScreen {
|
homeScreen {
|
||||||
verifyTabCounter("0")
|
verifyTabCounter("0")
|
||||||
}.openNavigationToolbar {
|
}.openNavigationToolbar {
|
||||||
}.enterURLAndEnterToBrowser(genericURL.url) {
|
}.enterURLAndEnterToBrowser(genericURL.url) {
|
||||||
|
waitForPageToLoad()
|
||||||
}.openComposeTabDrawer(composeTestRule) {
|
}.openComposeTabDrawer(composeTestRule) {
|
||||||
verifyExistingOpenTabs("Test_Page_1")
|
verifyExistingOpenTabs("Test_Page_1")
|
||||||
swipeTabLeft("Test_Page_1")
|
swipeTabLeft("Test_Page_1")
|
||||||
|
verifySnackBarText("Tab closed")
|
||||||
}
|
}
|
||||||
homeScreen {
|
homeScreen {
|
||||||
verifyTabCounter("0")
|
verifyTabCounter("0")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail: https://testrail.stage.mozaws.net/index.php?/cases/view/903591
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/903591
|
||||||
@Test
|
@Test
|
||||||
fun closingPrivateTabsMethodsTest() {
|
fun closingPrivateTabsTest() {
|
||||||
val genericURL = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val genericURL = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
|
||||||
homeScreen { }.togglePrivateBrowsingMode()
|
homeScreen { }.togglePrivateBrowsingMode(switchPBModeOn = true)
|
||||||
navigationToolbar {
|
navigationToolbar {
|
||||||
}.enterURLAndEnterToBrowser(genericURL.url) {
|
}.enterURLAndEnterToBrowser(genericURL.url) {
|
||||||
}.openComposeTabDrawer(composeTestRule) {
|
}.openComposeTabDrawer(composeTestRule) {
|
||||||
|
@ -173,33 +179,10 @@ class ComposeTabbedBrowsingTest {
|
||||||
}
|
}
|
||||||
browserScreen {
|
browserScreen {
|
||||||
verifyTabCounter("1")
|
verifyTabCounter("1")
|
||||||
}.openComposeTabDrawer(composeTestRule) {
|
|
||||||
closeTab()
|
|
||||||
}
|
|
||||||
homeScreen {
|
|
||||||
verifyTabCounter("0")
|
|
||||||
}.openNavigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(genericURL.url) {
|
|
||||||
}.openComposeTabDrawer(composeTestRule) {
|
|
||||||
verifyExistingOpenTabs("Test_Page_1")
|
|
||||||
swipeTabRight("Test_Page_1")
|
|
||||||
verifySnackBarText("Private tab closed")
|
|
||||||
}
|
|
||||||
homeScreen {
|
|
||||||
verifyTabCounter("0")
|
|
||||||
}.openNavigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(genericURL.url) {
|
|
||||||
}.openComposeTabDrawer(composeTestRule) {
|
|
||||||
verifyExistingOpenTabs("Test_Page_1")
|
|
||||||
swipeTabLeft("Test_Page_1")
|
|
||||||
verifySnackBarText("Private tab closed")
|
|
||||||
}
|
|
||||||
homeScreen {
|
|
||||||
verifyTabCounter("0")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail: https://testrail.stage.mozaws.net/index.php?/cases/view/903606
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/903606
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun tabMediaControlButtonTest() {
|
fun tabMediaControlButtonTest() {
|
||||||
|
@ -240,6 +223,7 @@ class ComposeTabbedBrowsingTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/903602
|
||||||
@Test
|
@Test
|
||||||
fun verifyTabTrayNotShowingStateHalfExpanded() {
|
fun verifyTabTrayNotShowingStateHalfExpanded() {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
|
@ -263,7 +247,7 @@ class ComposeTabbedBrowsingTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail: https://testrail.stage.mozaws.net/index.php?/cases/view/903600
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/903600
|
||||||
@Test
|
@Test
|
||||||
fun verifyEmptyTabTray() {
|
fun verifyEmptyTabTray() {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
|
@ -280,7 +264,7 @@ class ComposeTabbedBrowsingTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail: https://testrail.stage.mozaws.net/index.php?/cases/view/903585
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/903585
|
||||||
@Test
|
@Test
|
||||||
fun verifyEmptyPrivateTabsTrayTest() {
|
fun verifyEmptyPrivateTabsTrayTest() {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
|
@ -298,7 +282,7 @@ class ComposeTabbedBrowsingTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail: https://testrail.stage.mozaws.net/index.php?/cases/view/903601
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/903601
|
||||||
@Test
|
@Test
|
||||||
fun verifyTabsTrayWithOpenTabTest() {
|
fun verifyTabsTrayWithOpenTabTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -322,7 +306,7 @@ class ComposeTabbedBrowsingTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail: https://testrail.stage.mozaws.net/index.php?/cases/view/903587
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/903587
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun verifyPrivateTabsTrayWithOpenTabTest() {
|
fun verifyPrivateTabsTrayWithOpenTabTest() {
|
||||||
|
@ -347,78 +331,133 @@ class ComposeTabbedBrowsingTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail: https://testrail.stage.mozaws.net/index.php?/cases/view/927314
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/927314
|
||||||
@Test
|
@Test
|
||||||
fun tabsCounterShortcutMenuTest() {
|
fun tabsCounterShortcutMenuCloseTabTest() {
|
||||||
|
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
val secondWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 2)
|
||||||
|
|
||||||
|
navigationToolbar {
|
||||||
|
}.enterURLAndEnterToBrowser(firstWebPage.url) {
|
||||||
|
waitForPageToLoad()
|
||||||
|
}.goToHomescreen {
|
||||||
|
}.openNavigationToolbar {
|
||||||
|
}.enterURLAndEnterToBrowser(secondWebPage.url) {
|
||||||
|
waitForPageToLoad()
|
||||||
|
}
|
||||||
|
navigationToolbar {
|
||||||
|
}.openTabButtonShortcutsMenu {
|
||||||
|
verifyTabButtonShortcutMenuItems()
|
||||||
|
}.closeTabFromShortcutsMenu {
|
||||||
|
browserScreen {
|
||||||
|
verifyTabCounter("1")
|
||||||
|
verifyPageContent(firstWebPage.content)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2343663
|
||||||
|
@Test
|
||||||
|
fun tabsCounterShortcutMenuNewPrivateTabTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
|
||||||
navigationToolbar {
|
navigationToolbar {
|
||||||
}.enterURLAndEnterToBrowser(defaultWebPage.url) {}
|
}.enterURLAndEnterToBrowser(defaultWebPage.url) {}
|
||||||
navigationToolbar {
|
navigationToolbar {
|
||||||
}.openTabButtonShortcutsMenu {
|
|
||||||
verifyTabButtonShortcutMenuItems()
|
|
||||||
}.closeTabFromShortcutsMenu {
|
|
||||||
}.enterURLAndEnterToBrowser(defaultWebPage.url) {}
|
|
||||||
navigationToolbar {
|
|
||||||
}.openTabButtonShortcutsMenu {
|
}.openTabButtonShortcutsMenu {
|
||||||
}.openNewPrivateTabFromShortcutsMenu {
|
}.openNewPrivateTabFromShortcutsMenu {
|
||||||
verifyKeyboardVisibility()
|
|
||||||
verifySearchBarPlaceholder("Search or enter address")
|
verifySearchBarPlaceholder("Search or enter address")
|
||||||
// dismiss search dialog
|
|
||||||
}.dismissSearchBar {
|
}.dismissSearchBar {
|
||||||
verifyPrivateBrowsingHomeScreenItems()
|
verifyIfInPrivateOrNormalMode(privateBrowsingEnabled = true)
|
||||||
}
|
|
||||||
navigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(defaultWebPage.url) {}
|
|
||||||
navigationToolbar {
|
|
||||||
}.openTabButtonShortcutsMenu {
|
|
||||||
}.openNewTabFromShortcutsMenu {
|
|
||||||
verifyKeyboardVisibility()
|
|
||||||
verifySearchBarPlaceholder("Search or enter address")
|
|
||||||
// dismiss search dialog
|
|
||||||
}.dismissSearchBar {
|
|
||||||
verifyHomeWordmark()
|
|
||||||
verifyNavigationToolbar()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail: https://testrail.stage.mozaws.net/index.php?/cases/view/927314
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2343662
|
||||||
@Test
|
@Test
|
||||||
fun privateTabsCounterShortcutMenuTest() {
|
fun tabsCounterShortcutMenuNewTabTest() {
|
||||||
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
|
||||||
homeScreen {}.togglePrivateBrowsingMode()
|
|
||||||
navigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(defaultWebPage.url) {}
|
|
||||||
navigationToolbar {
|
|
||||||
}.openTabButtonShortcutsMenu {
|
|
||||||
verifyTabButtonShortcutMenuItems()
|
|
||||||
}.closeTabFromShortcutsMenu {
|
|
||||||
}.enterURLAndEnterToBrowser(defaultWebPage.url) {}
|
|
||||||
navigationToolbar {
|
|
||||||
}.openTabButtonShortcutsMenu {
|
|
||||||
}.openNewPrivateTabFromShortcutsMenu {
|
|
||||||
verifyKeyboardVisibility()
|
|
||||||
verifySearchBarPlaceholder("Search or enter address")
|
|
||||||
// dismiss search dialog
|
|
||||||
}.dismissSearchBar {
|
|
||||||
verifyCommonMythsLink()
|
|
||||||
}
|
|
||||||
navigationToolbar {
|
navigationToolbar {
|
||||||
}.enterURLAndEnterToBrowser(defaultWebPage.url) {}
|
}.enterURLAndEnterToBrowser(defaultWebPage.url) {}
|
||||||
navigationToolbar {
|
navigationToolbar {
|
||||||
}.openTabButtonShortcutsMenu {
|
}.openTabButtonShortcutsMenu {
|
||||||
}.openNewTabFromShortcutsMenu {
|
}.openNewTabFromShortcutsMenu {
|
||||||
verifyKeyboardVisibility()
|
|
||||||
verifySearchBarPlaceholder("Search or enter address")
|
verifySearchBarPlaceholder("Search or enter address")
|
||||||
// dismiss search dialog
|
|
||||||
}.dismissSearchBar {
|
}.dismissSearchBar {
|
||||||
// Verify normal browsing homescreen
|
verifyIfInPrivateOrNormalMode(privateBrowsingEnabled = false)
|
||||||
verifyExistingTopSitesList()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail: https://testrail.stage.mozaws.net/index.php?/cases/view/1046683
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/927315
|
||||||
|
@Test
|
||||||
|
fun privateTabsCounterShortcutMenuCloseTabTest() {
|
||||||
|
val firstWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
val secondWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 2)
|
||||||
|
|
||||||
|
homeScreen {}.togglePrivateBrowsingMode(switchPBModeOn = true)
|
||||||
|
navigationToolbar {
|
||||||
|
}.enterURLAndEnterToBrowser(firstWebPage.url) {
|
||||||
|
waitForPageToLoad()
|
||||||
|
}.goToHomescreen {
|
||||||
|
}.openNavigationToolbar {
|
||||||
|
}.enterURLAndEnterToBrowser(secondWebPage.url) {
|
||||||
|
waitForPageToLoad()
|
||||||
|
}
|
||||||
|
navigationToolbar {
|
||||||
|
}.openTabButtonShortcutsMenu {
|
||||||
|
verifyTabButtonShortcutMenuItems()
|
||||||
|
}.closeTabFromShortcutsMenu {
|
||||||
|
browserScreen {
|
||||||
|
verifyTabCounter("1")
|
||||||
|
verifyPageContent(firstWebPage.content)
|
||||||
|
}
|
||||||
|
}.openTabButtonShortcutsMenu {
|
||||||
|
}.closeTabFromShortcutsMenu {
|
||||||
|
homeScreen {
|
||||||
|
verifyIfInPrivateOrNormalMode(privateBrowsingEnabled = true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2344199
|
||||||
|
@Test
|
||||||
|
fun privateTabsCounterShortcutMenuNewPrivateTabTest() {
|
||||||
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
|
||||||
|
homeScreen {}.togglePrivateBrowsingMode(switchPBModeOn = true)
|
||||||
|
navigationToolbar {
|
||||||
|
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
|
||||||
|
waitForPageToLoad()
|
||||||
|
}
|
||||||
|
navigationToolbar {
|
||||||
|
}.openTabButtonShortcutsMenu {
|
||||||
|
}.openNewPrivateTabFromShortcutsMenu {
|
||||||
|
verifySearchBarPlaceholder("Search or enter address")
|
||||||
|
}.dismissSearchBar {
|
||||||
|
verifyIfInPrivateOrNormalMode(privateBrowsingEnabled = true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2344198
|
||||||
|
@Test
|
||||||
|
fun privateTabsCounterShortcutMenuNewTabTest() {
|
||||||
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
|
||||||
|
homeScreen {}.togglePrivateBrowsingMode(switchPBModeOn = true)
|
||||||
|
navigationToolbar {
|
||||||
|
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
|
||||||
|
verifyPageContent(defaultWebPage.content)
|
||||||
|
}
|
||||||
|
navigationToolbar {
|
||||||
|
}.openTabButtonShortcutsMenu {
|
||||||
|
}.openNewTabFromShortcutsMenu {
|
||||||
|
verifySearchToolbar(isDisplayed = true)
|
||||||
|
}.dismissSearchBar {
|
||||||
|
verifyIfInPrivateOrNormalMode(privateBrowsingEnabled = false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1046683
|
||||||
@Test
|
@Test
|
||||||
fun verifySyncedTabsWhenUserIsNotSignedInTest() {
|
fun verifySyncedTabsWhenUserIsNotSignedInTest() {
|
||||||
navigationToolbar {
|
navigationToolbar {
|
||||||
|
@ -432,7 +471,7 @@ class ComposeTabbedBrowsingTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail: https://testrail.stage.mozaws.net/index.php?/cases/view/903598
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/903598
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun shareTabsFromTabsTrayTest() {
|
fun shareTabsFromTabsTrayTest() {
|
||||||
|
|
|
@ -15,11 +15,11 @@ import org.junit.Test
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.DataGenerationHelper.generateRandomString
|
||||||
|
import org.mozilla.fenix.helpers.DataGenerationHelper.getStringResource
|
||||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
|
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
|
||||||
import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton
|
import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton
|
||||||
import org.mozilla.fenix.helpers.TestHelper.generateRandomString
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.getStringResource
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.waitUntilSnackbarGone
|
import org.mozilla.fenix.helpers.TestHelper.waitUntilSnackbarGone
|
||||||
import org.mozilla.fenix.ui.robots.browserScreen
|
import org.mozilla.fenix.ui.robots.browserScreen
|
||||||
import org.mozilla.fenix.ui.robots.homeScreenWithComposeTopSites
|
import org.mozilla.fenix.ui.robots.homeScreenWithComposeTopSites
|
||||||
|
@ -60,6 +60,7 @@ class ComposeTopSitesTest {
|
||||||
mockWebServer.shutdown()
|
mockWebServer.shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/532598
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun addAWebsiteAsATopSiteTest() {
|
fun addAWebsiteAsATopSiteTest() {
|
||||||
|
@ -78,6 +79,7 @@ class ComposeTopSitesTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/532599
|
||||||
@Test
|
@Test
|
||||||
fun openTopSiteInANewTabTest() {
|
fun openTopSiteInANewTabTest() {
|
||||||
val defaultWebPage = getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -105,6 +107,7 @@ class ComposeTopSitesTest {
|
||||||
mDevice.pressBack()
|
mDevice.pressBack()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/532600
|
||||||
@Test
|
@Test
|
||||||
fun openTopSiteInANewPrivateTabTest() {
|
fun openTopSiteInANewPrivateTabTest() {
|
||||||
val defaultWebPage = getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -126,6 +129,7 @@ class ComposeTopSitesTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1110321
|
||||||
@Test
|
@Test
|
||||||
fun renameATopSiteTest() {
|
fun renameATopSiteTest() {
|
||||||
val defaultWebPage = getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -150,6 +154,7 @@ class ComposeTopSitesTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/532601
|
||||||
@Test
|
@Test
|
||||||
fun removeTopSiteUsingMenuButtonTest() {
|
fun removeTopSiteUsingMenuButtonTest() {
|
||||||
val defaultWebPage = getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -176,6 +181,7 @@ class ComposeTopSitesTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2323641
|
||||||
@Test
|
@Test
|
||||||
fun removeTopSiteFromMainMenuTest() {
|
fun removeTopSiteFromMainMenuTest() {
|
||||||
val defaultWebPage = getGenericAsset(mockWebServer, 1)
|
val defaultWebPage = getGenericAsset(mockWebServer, 1)
|
||||||
|
@ -199,6 +205,7 @@ class ComposeTopSitesTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/561582
|
||||||
// Expected for en-us defaults
|
// Expected for en-us defaults
|
||||||
@Test
|
@Test
|
||||||
fun verifyENLocalesDefaultTopSitesListTest() {
|
fun verifyENLocalesDefaultTopSitesListTest() {
|
||||||
|
@ -211,6 +218,7 @@ class ComposeTopSitesTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1050642
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun addAndRemoveMostViewedTopSiteTest() {
|
fun addAndRemoveMostViewedTopSiteTest() {
|
||||||
|
|
|
@ -14,13 +14,13 @@ import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.mozilla.fenix.ext.settings
|
import org.mozilla.fenix.ext.settings
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.assertExternalAppOpens
|
||||||
import org.mozilla.fenix.helpers.Constants.PackageName.YOUTUBE_APP
|
import org.mozilla.fenix.helpers.Constants.PackageName.YOUTUBE_APP
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper.itemContainingText
|
import org.mozilla.fenix.helpers.MatcherHelper.itemContainingText
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper.itemWithText
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithText
|
||||||
import org.mozilla.fenix.helpers.RetryTestRule
|
import org.mozilla.fenix.helpers.RetryTestRule
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.assertExternalAppOpens
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton
|
import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton
|
||||||
import org.mozilla.fenix.ui.robots.clickContextMenuItem
|
import org.mozilla.fenix.ui.robots.clickContextMenuItem
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
|
|
|
@ -1,72 +0,0 @@
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
package org.mozilla.fenix.ui
|
|
||||||
|
|
||||||
import androidx.core.net.toUri
|
|
||||||
import org.junit.Ignore
|
|
||||||
import org.junit.Rule
|
|
||||||
import org.junit.Test
|
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.restartApp
|
|
||||||
import org.mozilla.fenix.ui.robots.browserScreen
|
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
|
||||||
|
|
||||||
class CookieBannerReductionTest {
|
|
||||||
@get:Rule
|
|
||||||
val activityTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides(skipOnboarding = true)
|
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1980504
|
|
||||||
// Bug causing flakiness https://bugzilla.mozilla.org/show_bug.cgi?id=1807440
|
|
||||||
@Ignore("Disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1852803")
|
|
||||||
@SmokeTest
|
|
||||||
@Test
|
|
||||||
fun verifyCookieBannerReductionFunctionalityTest() {
|
|
||||||
val webSite = "startsiden.no"
|
|
||||||
|
|
||||||
homeScreen {
|
|
||||||
}.openNavigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(webSite.toUri()) {
|
|
||||||
waitForPageToLoad()
|
|
||||||
verifyCookieBannerExists(exists = true)
|
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.openSettings {
|
|
||||||
verifySettingsOptionSummary("Cookie banner reduction", "Off")
|
|
||||||
}.openCookieBannerReductionSubMenu {
|
|
||||||
verifyCookieBannerView(isCookieBannerReductionChecked = false)
|
|
||||||
clickCookieBannerReductionToggle()
|
|
||||||
verifyCheckedCookieBannerReductionToggle(isCookieBannerReductionChecked = true)
|
|
||||||
}.goBack {
|
|
||||||
verifySettingsOptionSummary("Cookie banner reduction", "On")
|
|
||||||
}
|
|
||||||
|
|
||||||
exitMenu()
|
|
||||||
|
|
||||||
browserScreen {
|
|
||||||
verifyCookieBannerExists(exists = false)
|
|
||||||
}
|
|
||||||
|
|
||||||
restartApp(activityTestRule)
|
|
||||||
|
|
||||||
browserScreen {
|
|
||||||
verifyCookieBannerExists(exists = false)
|
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.openSettings {
|
|
||||||
}.openCookieBannerReductionSubMenu {
|
|
||||||
clickCookieBannerReductionToggle()
|
|
||||||
verifyCheckedCookieBannerReductionToggle(false)
|
|
||||||
}
|
|
||||||
|
|
||||||
exitMenu()
|
|
||||||
|
|
||||||
browserScreen {
|
|
||||||
waitForPageToLoad()
|
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.refreshPage {
|
|
||||||
verifyCookieBannerExists(exists = false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -16,10 +16,10 @@ import org.junit.Test
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.DataGenerationHelper.getStringResource
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.getStringResource
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.packageName
|
import org.mozilla.fenix.helpers.TestHelper.packageName
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
|
|
|
@ -12,14 +12,14 @@ import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.bringAppToForeground
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.putAppToBackground
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdContainingText
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdContainingText
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.bringAppToForeground
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
||||||
import org.mozilla.fenix.helpers.TestHelper.packageName
|
import org.mozilla.fenix.helpers.TestHelper.packageName
|
||||||
import org.mozilla.fenix.helpers.TestHelper.putAppToBackground
|
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
import org.mozilla.fenix.ui.robots.navigationToolbar
|
import org.mozilla.fenix.ui.robots.navigationToolbar
|
||||||
|
@ -369,6 +369,7 @@ class CreditCardAutofillTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1512794
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1512794
|
||||||
|
@Ignore("Failing, see https://bugzilla.mozilla.org/show_bug.cgi?id=1853625")
|
||||||
@Test
|
@Test
|
||||||
fun verifyMultipleCreditCardsCanBeAddedTest() {
|
fun verifyMultipleCreditCardsCanBeAddedTest() {
|
||||||
val creditCardFormPage = TestAssetHelper.getCreditCardFormAsset(mockWebServer)
|
val creditCardFormPage = TestAssetHelper.getCreditCardFormAsset(mockWebServer)
|
||||||
|
|
|
@ -19,14 +19,14 @@ import org.junit.Test
|
||||||
import org.mozilla.fenix.IntentReceiverActivity
|
import org.mozilla.fenix.IntentReceiverActivity
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.openAppFromExternalLink
|
||||||
|
import org.mozilla.fenix.helpers.DataGenerationHelper.createCustomTabIntent
|
||||||
import org.mozilla.fenix.helpers.FeatureSettingsHelperDelegate
|
import org.mozilla.fenix.helpers.FeatureSettingsHelperDelegate
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdAndText
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdAndText
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper.itemWithText
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithText
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.createCustomTabIntent
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
||||||
import org.mozilla.fenix.helpers.TestHelper.openAppFromExternalLink
|
|
||||||
import org.mozilla.fenix.ui.robots.browserScreen
|
import org.mozilla.fenix.ui.robots.browserScreen
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
import org.mozilla.fenix.ui.robots.customTabScreen
|
import org.mozilla.fenix.ui.robots.customTabScreen
|
||||||
|
|
|
@ -5,13 +5,15 @@
|
||||||
package org.mozilla.fenix.ui
|
package org.mozilla.fenix.ui
|
||||||
|
|
||||||
import androidx.core.net.toUri
|
import androidx.core.net.toUri
|
||||||
|
import org.junit.After
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
import org.junit.runners.Parameterized
|
import org.junit.runners.Parameterized
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.clearDownloadsFolder
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.ui.robots.navigationToolbar
|
import org.mozilla.fenix.ui.robots.downloadRobot
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for verifying downloading a list of different file types:
|
* Test for verifying downloading a list of different file types:
|
||||||
|
@ -28,6 +30,12 @@ class DownloadFileTypesTest(fileName: String) {
|
||||||
@get:Rule
|
@get:Rule
|
||||||
val activityTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides()
|
val activityTestRule = HomeActivityIntentTestRule.withDefaultSettingsOverrides()
|
||||||
|
|
||||||
|
@After
|
||||||
|
fun tearDown() {
|
||||||
|
// Check and clear the downloads folder
|
||||||
|
clearDownloadsFolder()
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
// Creating test data. The test will take each file name as a parameter and run it individually.
|
// Creating test data. The test will take each file name as a parameter and run it individually.
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
|
@ -45,17 +53,14 @@ class DownloadFileTypesTest(fileName: String) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/251028&group_by=cases:section_id&group_id=31659&group_order=asc
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/251028
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun allFilesAppearInDownloadsMenuTest() {
|
fun allFilesAppearInDownloadsMenuTest() {
|
||||||
navigationToolbar {
|
downloadRobot {
|
||||||
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
openPageAndDownloadFile(url = downloadTestPage.toUri(), downloadFile = downloadFile)
|
||||||
}.clickDownloadLink(downloadFile) {
|
|
||||||
verifyDownloadPrompt(downloadFile)
|
|
||||||
}.clickDownload {
|
|
||||||
verifyDownloadCompleteNotificationPopup()
|
verifyDownloadCompleteNotificationPopup()
|
||||||
}.closeCompletedDownloadPrompt {
|
}.closeDownloadPrompt {
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
}.openDownloadsManager {
|
}.openDownloadsManager {
|
||||||
waitForDownloadsListToExist()
|
waitForDownloadsListToExist()
|
||||||
|
|
|
@ -13,17 +13,18 @@ import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.assertExternalAppOpens
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.clearDownloadsFolder
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.deleteDownloadedFileOnStorage
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.setNetworkEnabled
|
||||||
import org.mozilla.fenix.helpers.Constants.PackageName.GOOGLE_APPS_PHOTOS
|
import org.mozilla.fenix.helpers.Constants.PackageName.GOOGLE_APPS_PHOTOS
|
||||||
import org.mozilla.fenix.helpers.Constants.PackageName.GOOGLE_DOCS
|
import org.mozilla.fenix.helpers.Constants.PackageName.GOOGLE_DOCS
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper.itemWithText
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithText
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.assertExternalAppOpens
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton
|
import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton
|
||||||
import org.mozilla.fenix.helpers.TestHelper.deleteDownloadedFileOnStorage
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
||||||
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
||||||
import org.mozilla.fenix.helpers.TestHelper.setNetworkEnabled
|
|
||||||
import org.mozilla.fenix.ui.robots.browserScreen
|
import org.mozilla.fenix.ui.robots.browserScreen
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
import org.mozilla.fenix.ui.robots.downloadRobot
|
import org.mozilla.fenix.ui.robots.downloadRobot
|
||||||
|
@ -72,63 +73,45 @@ class DownloadTest {
|
||||||
mockWebServer.shutdown()
|
mockWebServer.shutdown()
|
||||||
|
|
||||||
setNetworkEnabled(enabled = true)
|
setNetworkEnabled(enabled = true)
|
||||||
|
|
||||||
|
// Check and clear the downloads folder
|
||||||
|
clearDownloadsFolder()
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243844
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243844
|
||||||
@Test
|
@Test
|
||||||
fun verifyTheDownloadPromptsTest() {
|
fun verifyTheDownloadPromptsTest() {
|
||||||
downloadFile = "web_icon.png"
|
downloadRobot {
|
||||||
|
openPageAndDownloadFile(url = downloadTestPage.toUri(), downloadFile = "web_icon.png")
|
||||||
navigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
|
||||||
waitForPageToLoad()
|
|
||||||
}.clickDownloadLink(downloadFile) {
|
|
||||||
verifyDownloadPrompt(downloadFile)
|
|
||||||
}.clickDownload {
|
|
||||||
verifyDownloadCompleteNotificationPopup()
|
verifyDownloadCompleteNotificationPopup()
|
||||||
}.clickOpen("image/png") {}
|
}.clickOpen("image/png") {}
|
||||||
downloadRobot {
|
downloadRobot {
|
||||||
verifyPhotosAppOpens()
|
verifyPhotosAppOpens()
|
||||||
}
|
}
|
||||||
mDevice.pressBack()
|
|
||||||
deleteDownloadedFileOnStorage(downloadFile)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2299405
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2299405
|
||||||
@Test
|
@Test
|
||||||
fun verifyTheDownloadFailedNotificationsTest() {
|
fun verifyTheDownloadFailedNotificationsTest() {
|
||||||
downloadFile = "1GB.zip"
|
downloadRobot {
|
||||||
|
openPageAndDownloadFile(url = downloadTestPage.toUri(), downloadFile = "1GB.zip")
|
||||||
navigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
|
||||||
waitForPageToLoad()
|
|
||||||
}.clickDownloadLink(downloadFile) {
|
|
||||||
verifyDownloadPrompt(downloadFile)
|
|
||||||
}.clickDownload {
|
|
||||||
setNetworkEnabled(enabled = false)
|
setNetworkEnabled(enabled = false)
|
||||||
verifyDownloadFailedPrompt(downloadFile)
|
verifyDownloadFailedPrompt("1GB.zip")
|
||||||
setNetworkEnabled(enabled = true)
|
setNetworkEnabled(enabled = true)
|
||||||
clickTryAgainButton()
|
clickTryAgainButton()
|
||||||
}
|
}
|
||||||
mDevice.openNotification()
|
mDevice.openNotification()
|
||||||
notificationShade {
|
notificationShade {
|
||||||
verifySystemNotificationDoesNotExist("Download failed")
|
verifySystemNotificationDoesNotExist("Download failed")
|
||||||
verifySystemNotificationExists(downloadFile)
|
verifySystemNotificationExists("1GB.zip")
|
||||||
}.closeNotificationTray {}
|
}.closeNotificationTray {}
|
||||||
deleteDownloadedFileOnStorage(downloadFile)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2298616
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2298616
|
||||||
@Test
|
@Test
|
||||||
fun verifyDownloadCompleteNotificationTest() {
|
fun verifyDownloadCompleteNotificationTest() {
|
||||||
downloadFile = "web_icon.png"
|
downloadRobot {
|
||||||
|
openPageAndDownloadFile(url = downloadTestPage.toUri(), downloadFile = "web_icon.png")
|
||||||
navigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
|
||||||
waitForPageToLoad()
|
|
||||||
}.clickDownloadLink(downloadFile) {
|
|
||||||
verifyDownloadPrompt(downloadFile)
|
|
||||||
}.clickDownload {
|
|
||||||
verifyDownloadCompleteNotificationPopup()
|
verifyDownloadCompleteNotificationPopup()
|
||||||
}
|
}
|
||||||
mDevice.openNotification()
|
mDevice.openNotification()
|
||||||
|
@ -146,7 +129,6 @@ class DownloadTest {
|
||||||
)
|
)
|
||||||
verifySystemNotificationDoesNotExist("Firefox Fenix")
|
verifySystemNotificationDoesNotExist("Firefox Fenix")
|
||||||
}.closeNotificationTray {}
|
}.closeNotificationTray {}
|
||||||
deleteDownloadedFileOnStorage(downloadFile)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/451563
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/451563
|
||||||
|
@ -154,19 +136,9 @@ class DownloadTest {
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun pauseResumeCancelDownloadTest() {
|
fun pauseResumeCancelDownloadTest() {
|
||||||
// Clear the "Firefox Fenix default browser notification"
|
downloadRobot {
|
||||||
notificationShade {
|
openPageAndDownloadFile(url = downloadTestPage.toUri(), downloadFile = "1GB.zip")
|
||||||
cancelAllShownNotifications()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadFile = "1GB.zip"
|
|
||||||
|
|
||||||
navigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
|
||||||
waitForPageToLoad()
|
|
||||||
}.clickDownloadLink(downloadFile) {
|
|
||||||
verifyDownloadPrompt(downloadFile)
|
|
||||||
}.clickDownload {}
|
|
||||||
mDevice.openNotification()
|
mDevice.openNotification()
|
||||||
notificationShade {
|
notificationShade {
|
||||||
verifySystemNotificationExists("Firefox Fenix")
|
verifySystemNotificationExists("Firefox Fenix")
|
||||||
|
@ -175,7 +147,7 @@ class DownloadTest {
|
||||||
verifySystemNotificationExists("Download paused")
|
verifySystemNotificationExists("Download paused")
|
||||||
clickDownloadNotificationControlButton("RESUME")
|
clickDownloadNotificationControlButton("RESUME")
|
||||||
clickDownloadNotificationControlButton("CANCEL")
|
clickDownloadNotificationControlButton("CANCEL")
|
||||||
verifySystemNotificationDoesNotExist(downloadFile)
|
verifySystemNotificationDoesNotExist("1GB.zip")
|
||||||
mDevice.pressBack()
|
mDevice.pressBack()
|
||||||
}
|
}
|
||||||
browserScreen {
|
browserScreen {
|
||||||
|
@ -183,79 +155,41 @@ class DownloadTest {
|
||||||
}.openDownloadsManager {
|
}.openDownloadsManager {
|
||||||
verifyEmptyDownloadsList()
|
verifyEmptyDownloadsList()
|
||||||
}
|
}
|
||||||
deleteDownloadedFileOnStorage(downloadFile)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2301474
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2301474
|
||||||
@Test
|
@Test
|
||||||
fun openDownloadedFileFromDownloadsMenuTest() {
|
fun openDownloadedFileFromDownloadsMenuTest() {
|
||||||
downloadFile = "web_icon.png"
|
downloadRobot {
|
||||||
|
openPageAndDownloadFile(url = downloadTestPage.toUri(), downloadFile = "web_icon.png")
|
||||||
navigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
|
||||||
waitForPageToLoad()
|
|
||||||
}.clickDownloadLink(downloadFile) {
|
|
||||||
verifyDownloadPrompt(downloadFile)
|
|
||||||
}.clickDownload {
|
|
||||||
verifyDownloadCompleteNotificationPopup()
|
verifyDownloadCompleteNotificationPopup()
|
||||||
}
|
}
|
||||||
browserScreen {
|
browserScreen {
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
}.openDownloadsManager {
|
}.openDownloadsManager {
|
||||||
verifyDownloadedFileName(downloadFile)
|
verifyDownloadedFileName("web_icon.png")
|
||||||
openDownloadedFile(downloadFile)
|
openDownloadedFile("web_icon.png")
|
||||||
verifyPhotosAppOpens()
|
verifyPhotosAppOpens()
|
||||||
mDevice.pressBack()
|
mDevice.pressBack()
|
||||||
}
|
}
|
||||||
deleteDownloadedFileOnStorage(downloadFile)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Save PDF file from the share overlay
|
|
||||||
@SmokeTest
|
|
||||||
@Test
|
|
||||||
fun saveAndOpenPdfTest() {
|
|
||||||
val genericURL =
|
|
||||||
TestAssetHelper.getGenericAsset(mockWebServer, 3)
|
|
||||||
downloadFile = "pdfForm.pdf"
|
|
||||||
|
|
||||||
navigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(genericURL.url) {
|
|
||||||
clickPageObject(itemWithText("PDF form file"))
|
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.clickShareButton {
|
|
||||||
}.clickSaveAsPDF {
|
|
||||||
verifyDownloadPrompt(downloadFile)
|
|
||||||
}.clickDownload {
|
|
||||||
}.clickOpen("application/pdf") {
|
|
||||||
assertExternalAppOpens(GOOGLE_DOCS)
|
|
||||||
}
|
|
||||||
deleteDownloadedFileOnStorage(downloadFile)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1114970
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1114970
|
||||||
@Test
|
@Test
|
||||||
fun deleteDownloadedFileTest() {
|
fun deleteDownloadedFileTest() {
|
||||||
downloadFile = "smallZip.zip"
|
downloadRobot {
|
||||||
|
openPageAndDownloadFile(url = downloadTestPage.toUri(), downloadFile = "smallZip.zip")
|
||||||
navigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
|
||||||
waitForPageToLoad()
|
|
||||||
}.clickDownloadLink(downloadFile) {
|
|
||||||
verifyDownloadPrompt(downloadFile)
|
|
||||||
}.clickDownload {
|
|
||||||
verifyDownloadedFileName(downloadFile)
|
|
||||||
}
|
}
|
||||||
browserScreen {
|
browserScreen {
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
}.openDownloadsManager {
|
}.openDownloadsManager {
|
||||||
verifyDownloadedFileName(downloadFile)
|
verifyDownloadedFileName("smallZip.zip")
|
||||||
deleteDownloadedItem(downloadFile)
|
deleteDownloadedItem("smallZip.zip")
|
||||||
clickSnackbarButton("UNDO")
|
clickSnackbarButton("UNDO")
|
||||||
verifyDownloadedFileName(downloadFile)
|
verifyDownloadedFileName("smallZip.zip")
|
||||||
deleteDownloadedItem(downloadFile)
|
deleteDownloadedItem("smallZip.zip")
|
||||||
verifyEmptyDownloadsList()
|
verifyEmptyDownloadsList()
|
||||||
}
|
}
|
||||||
deleteDownloadedFileOnStorage(downloadFile)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2302662
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2302662
|
||||||
|
@ -264,14 +198,10 @@ class DownloadTest {
|
||||||
val firstDownloadedFile = "smallZip.zip"
|
val firstDownloadedFile = "smallZip.zip"
|
||||||
val secondDownloadedFile = "textfile.txt"
|
val secondDownloadedFile = "textfile.txt"
|
||||||
|
|
||||||
navigationToolbar {
|
downloadRobot {
|
||||||
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
openPageAndDownloadFile(url = downloadTestPage.toUri(), downloadFile = firstDownloadedFile)
|
||||||
waitForPageToLoad()
|
|
||||||
}.clickDownloadLink(firstDownloadedFile) {
|
|
||||||
verifyDownloadPrompt(firstDownloadedFile)
|
|
||||||
}.clickDownload {
|
|
||||||
verifyDownloadedFileName(firstDownloadedFile)
|
verifyDownloadedFileName(firstDownloadedFile)
|
||||||
}.closeCompletedDownloadPrompt {
|
}.closeDownloadPrompt {
|
||||||
}.clickDownloadLink(secondDownloadedFile) {
|
}.clickDownloadLink(secondDownloadedFile) {
|
||||||
verifyDownloadPrompt(secondDownloadedFile)
|
verifyDownloadPrompt(secondDownloadedFile)
|
||||||
}.clickDownload {
|
}.clickDownload {
|
||||||
|
@ -295,29 +225,21 @@ class DownloadTest {
|
||||||
clickMultiSelectRemoveButton()
|
clickMultiSelectRemoveButton()
|
||||||
verifyEmptyDownloadsList()
|
verifyEmptyDownloadsList()
|
||||||
}
|
}
|
||||||
deleteDownloadedFileOnStorage(firstDownloadedFile)
|
|
||||||
deleteDownloadedFileOnStorage(secondDownloadedFile)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2301537
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2301537
|
||||||
@Test
|
@Test
|
||||||
fun fileDeletedFromStorageIsDeletedEverywhereTest() {
|
fun fileDeletedFromStorageIsDeletedEverywhereTest() {
|
||||||
val downloadFile = "smallZip.zip"
|
downloadRobot {
|
||||||
|
openPageAndDownloadFile(url = downloadTestPage.toUri(), downloadFile = "smallZip.zip")
|
||||||
navigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
|
||||||
waitForPageToLoad()
|
|
||||||
}.clickDownloadLink(downloadFile) {
|
|
||||||
verifyDownloadPrompt(downloadFile)
|
|
||||||
}.clickDownload {
|
|
||||||
verifyDownloadCompleteNotificationPopup()
|
verifyDownloadCompleteNotificationPopup()
|
||||||
}
|
}
|
||||||
browserScreen {
|
browserScreen {
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
}.openDownloadsManager {
|
}.openDownloadsManager {
|
||||||
waitForDownloadsListToExist()
|
waitForDownloadsListToExist()
|
||||||
verifyDownloadedFileName(downloadFile)
|
verifyDownloadedFileName("smallZip.zip")
|
||||||
deleteDownloadedFileOnStorage(downloadFile)
|
deleteDownloadedFileOnStorage("smallZip.zip")
|
||||||
}.exitDownloadsManagerToBrowser {
|
}.exitDownloadsManagerToBrowser {
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
}.openDownloadsManager {
|
}.openDownloadsManager {
|
||||||
|
@ -325,39 +247,24 @@ class DownloadTest {
|
||||||
exitMenu()
|
exitMenu()
|
||||||
}
|
}
|
||||||
|
|
||||||
navigationToolbar {
|
downloadRobot {
|
||||||
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
openPageAndDownloadFile(url = downloadTestPage.toUri(), downloadFile = "smallZip.zip")
|
||||||
waitForPageToLoad()
|
|
||||||
}.clickDownloadLink(downloadFile) {
|
|
||||||
verifyDownloadPrompt(downloadFile)
|
|
||||||
}.clickDownload {
|
|
||||||
verifyDownloadCompleteNotificationPopup()
|
verifyDownloadCompleteNotificationPopup()
|
||||||
}
|
}
|
||||||
browserScreen {
|
browserScreen {
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
}.openDownloadsManager {
|
}.openDownloadsManager {
|
||||||
waitForDownloadsListToExist()
|
waitForDownloadsListToExist()
|
||||||
verifyDownloadedFileName(downloadFile)
|
verifyDownloadedFileName("smallZip.zip")
|
||||||
}
|
}
|
||||||
deleteDownloadedFileOnStorage(downloadFile)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/457112
|
||||||
@Ignore("Failing: https://bugzilla.mozilla.org/show_bug.cgi?id=1840994")
|
@Ignore("Failing: https://bugzilla.mozilla.org/show_bug.cgi?id=1840994")
|
||||||
@Test
|
@Test
|
||||||
fun systemNotificationCantBeDismissedWhileInProgressTest() {
|
fun systemNotificationCantBeDismissedWhileInProgressTest() {
|
||||||
// Clear the "Firefox Fenix default browser notification"
|
downloadRobot {
|
||||||
notificationShade {
|
openPageAndDownloadFile(url = downloadTestPage.toUri(), downloadFile = "1GB.zip")
|
||||||
cancelAllShownNotifications()
|
|
||||||
}
|
|
||||||
|
|
||||||
downloadFile = "1GB.zip"
|
|
||||||
|
|
||||||
navigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
|
||||||
waitForPageToLoad()
|
|
||||||
}.clickDownloadLink(downloadFile) {
|
|
||||||
verifyDownloadPrompt(downloadFile)
|
|
||||||
}.clickDownload {
|
|
||||||
}
|
}
|
||||||
browserScreen {
|
browserScreen {
|
||||||
}.openNotificationShade {
|
}.openNotificationShade {
|
||||||
|
@ -368,31 +275,21 @@ class DownloadTest {
|
||||||
swipeDownloadNotification(direction = "Right", shouldDismissNotification = false)
|
swipeDownloadNotification(direction = "Right", shouldDismissNotification = false)
|
||||||
clickDownloadNotificationControlButton("CANCEL")
|
clickDownloadNotificationControlButton("CANCEL")
|
||||||
}
|
}
|
||||||
deleteDownloadedFileOnStorage(downloadFile)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2299297
|
||||||
@Test
|
@Test
|
||||||
fun notificationCanBeDismissedIfDownloadIsInterruptedTest() {
|
fun notificationCanBeDismissedIfDownloadIsInterruptedTest() {
|
||||||
// Clear the "Firefox Fenix default browser notification"
|
downloadRobot {
|
||||||
notificationShade {
|
openPageAndDownloadFile(url = downloadTestPage.toUri(), downloadFile = "1GB.zip")
|
||||||
cancelAllShownNotifications()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadFile = "1GB.zip"
|
|
||||||
|
|
||||||
navigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
|
||||||
waitForPageToLoad()
|
|
||||||
}.clickDownloadLink(downloadFile) {
|
|
||||||
verifyDownloadPrompt(downloadFile)
|
|
||||||
}.clickDownload {}
|
|
||||||
|
|
||||||
setNetworkEnabled(enabled = false)
|
setNetworkEnabled(enabled = false)
|
||||||
|
|
||||||
browserScreen {
|
browserScreen {
|
||||||
}.openNotificationShade {
|
}.openNotificationShade {
|
||||||
verifySystemNotificationExists("Download failed")
|
|
||||||
expandNotificationMessage()
|
expandNotificationMessage()
|
||||||
|
verifySystemNotificationExists("Download failed")
|
||||||
swipeDownloadNotification("Left", true)
|
swipeDownloadNotification("Left", true)
|
||||||
verifySystemNotificationDoesNotExist("Firefox Fenix")
|
verifySystemNotificationDoesNotExist("Firefox Fenix")
|
||||||
}.closeNotificationTray {}
|
}.closeNotificationTray {}
|
||||||
|
@ -401,26 +298,16 @@ class DownloadTest {
|
||||||
}.closeDownloadPrompt {
|
}.closeDownloadPrompt {
|
||||||
verifyDownloadPromptIsDismissed()
|
verifyDownloadPromptIsDismissed()
|
||||||
}
|
}
|
||||||
deleteDownloadedFileOnStorage(downloadFile)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1632384
|
||||||
@Test
|
@Test
|
||||||
fun warningWhenClosingPrivateTabsWhileDownloadingTest() {
|
fun warningWhenClosingPrivateTabsWhileDownloadingTest() {
|
||||||
downloadFile = "1GB.zip"
|
|
||||||
|
|
||||||
// Clear the "Firefox Fenix default browser notification"
|
|
||||||
notificationShade {
|
|
||||||
cancelAllShownNotifications()
|
|
||||||
}
|
|
||||||
|
|
||||||
homeScreen {
|
homeScreen {
|
||||||
}.togglePrivateBrowsingMode()
|
}.togglePrivateBrowsingMode()
|
||||||
navigationToolbar {
|
downloadRobot {
|
||||||
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
openPageAndDownloadFile(url = downloadTestPage.toUri(), downloadFile = "1GB.zip")
|
||||||
waitForPageToLoad()
|
}
|
||||||
}.clickDownloadLink(downloadFile) {
|
|
||||||
verifyDownloadPrompt(downloadFile)
|
|
||||||
}.clickDownload {}
|
|
||||||
browserScreen {
|
browserScreen {
|
||||||
}.openTabDrawer {
|
}.openTabDrawer {
|
||||||
closeTab()
|
closeTab()
|
||||||
|
@ -431,28 +318,16 @@ class DownloadTest {
|
||||||
}.openNotificationShade {
|
}.openNotificationShade {
|
||||||
verifySystemNotificationExists("Firefox Fenix")
|
verifySystemNotificationExists("Firefox Fenix")
|
||||||
}
|
}
|
||||||
deleteDownloadedFileOnStorage(downloadFile)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2302663
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2302663
|
||||||
@Test
|
@Test
|
||||||
fun cancelActivePrivateBrowsingDownloadsTest() {
|
fun cancelActivePrivateBrowsingDownloadsTest() {
|
||||||
downloadFile = "1GB.zip"
|
|
||||||
|
|
||||||
// Clear the "Firefox Fenix default browser notification"
|
|
||||||
notificationShade {
|
|
||||||
cancelAllShownNotifications()
|
|
||||||
}
|
|
||||||
|
|
||||||
homeScreen {
|
homeScreen {
|
||||||
}.togglePrivateBrowsingMode()
|
}.togglePrivateBrowsingMode()
|
||||||
|
downloadRobot {
|
||||||
navigationToolbar {
|
openPageAndDownloadFile(url = downloadTestPage.toUri(), downloadFile = "1GB.zip")
|
||||||
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
}
|
||||||
waitForPageToLoad()
|
|
||||||
}.clickDownloadLink(downloadFile) {
|
|
||||||
verifyDownloadPrompt(downloadFile)
|
|
||||||
}.clickDownload {}
|
|
||||||
browserScreen {
|
browserScreen {
|
||||||
}.openTabDrawer {
|
}.openTabDrawer {
|
||||||
closeTab()
|
closeTab()
|
||||||
|
@ -463,12 +338,13 @@ class DownloadTest {
|
||||||
}.openNotificationShade {
|
}.openNotificationShade {
|
||||||
verifySystemNotificationDoesNotExist("Firefox Fenix")
|
verifySystemNotificationDoesNotExist("Firefox Fenix")
|
||||||
}
|
}
|
||||||
deleteDownloadedFileOnStorage(downloadFile)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2048448
|
||||||
// Save edited PDF file from the share overlay
|
// Save edited PDF file from the share overlay
|
||||||
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun saveEditedPdfTest() {
|
fun saveAsPdfFunctionalityTest() {
|
||||||
val genericURL =
|
val genericURL =
|
||||||
TestAssetHelper.getGenericAsset(mockWebServer, 3)
|
TestAssetHelper.getGenericAsset(mockWebServer, 3)
|
||||||
downloadFile = "pdfForm.pdf"
|
downloadFile = "pdfForm.pdf"
|
||||||
|
@ -486,6 +362,29 @@ class DownloadTest {
|
||||||
}.clickOpen("application/pdf") {
|
}.clickOpen("application/pdf") {
|
||||||
assertExternalAppOpens(GOOGLE_DOCS)
|
assertExternalAppOpens(GOOGLE_DOCS)
|
||||||
}
|
}
|
||||||
deleteDownloadedFileOnStorage(downloadFile)
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/244125
|
||||||
|
@Test
|
||||||
|
fun restartDownloadFromAppNotificationAfterConnectionIsInterruptedTest() {
|
||||||
|
downloadFile = "1GB.zip"
|
||||||
|
|
||||||
|
navigationToolbar {
|
||||||
|
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
||||||
|
waitForPageToLoad()
|
||||||
|
}.clickDownloadLink(downloadFile) {
|
||||||
|
verifyDownloadPrompt(downloadFile)
|
||||||
|
setNetworkEnabled(false)
|
||||||
|
}.clickDownload {
|
||||||
|
verifyDownloadFailedPrompt(downloadFile)
|
||||||
|
setNetworkEnabled(true)
|
||||||
|
clickTryAgainButton()
|
||||||
|
}
|
||||||
|
browserScreen {
|
||||||
|
}.openNotificationShade {
|
||||||
|
verifySystemNotificationExists("Firefox Fenix")
|
||||||
|
expandNotificationMessage()
|
||||||
|
clickDownloadNotificationControlButton("CANCEL")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -351,8 +351,6 @@ class EnhancedTrackingProtectionTest {
|
||||||
enhancedTrackingProtection {
|
enhancedTrackingProtection {
|
||||||
}.openEnhancedTrackingProtectionSheet {
|
}.openEnhancedTrackingProtectionSheet {
|
||||||
}.openDetails {
|
}.openDetails {
|
||||||
verifyCrossSiteCookiesBlocked(true)
|
|
||||||
navigateBackToDetails()
|
|
||||||
verifyCryptominersBlocked(true)
|
verifyCryptominersBlocked(true)
|
||||||
navigateBackToDetails()
|
navigateBackToDetails()
|
||||||
verifyFingerprintersBlocked(true)
|
verifyFingerprintersBlocked(true)
|
||||||
|
|
|
@ -22,13 +22,13 @@ import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.ext.settings
|
import org.mozilla.fenix.ext.settings
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.registerAndCleanupIdlingResources
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.MockBrowserDataHelper
|
import org.mozilla.fenix.helpers.MockBrowserDataHelper
|
||||||
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
|
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
||||||
import org.mozilla.fenix.helpers.TestHelper.longTapSelectItem
|
import org.mozilla.fenix.helpers.TestHelper.longTapSelectItem
|
||||||
import org.mozilla.fenix.helpers.TestHelper.registerAndCleanupIdlingResources
|
|
||||||
import org.mozilla.fenix.ui.robots.browserScreen
|
import org.mozilla.fenix.ui.robots.browserScreen
|
||||||
import org.mozilla.fenix.ui.robots.historyMenu
|
import org.mozilla.fenix.ui.robots.historyMenu
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
|
@ -466,4 +466,18 @@ class HistoryTest {
|
||||||
verifyEmptyHistoryView()
|
verifyEmptyHistoryView()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243287
|
||||||
|
@Test
|
||||||
|
fun openHistoryItemTest() {
|
||||||
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
|
||||||
|
navigationToolbar {
|
||||||
|
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
|
||||||
|
}.openThreeDotMenu {
|
||||||
|
}.openHistory {
|
||||||
|
}.openWebsite(defaultWebPage.url) {
|
||||||
|
verifyUrl(defaultWebPage.url.toString())
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import androidx.test.uiautomator.UiDevice
|
||||||
import okhttp3.mockwebserver.MockWebServer
|
import okhttp3.mockwebserver.MockWebServer
|
||||||
import org.junit.After
|
import org.junit.After
|
||||||
import org.junit.Before
|
import org.junit.Before
|
||||||
|
import org.junit.Ignore
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
|
@ -17,8 +18,10 @@ import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
||||||
import org.mozilla.fenix.helpers.RetryTestRule
|
import org.mozilla.fenix.helpers.RetryTestRule
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
|
import org.mozilla.fenix.helpers.TestHelper
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
import org.mozilla.fenix.ui.robots.navigationToolbar
|
import org.mozilla.fenix.ui.robots.navigationToolbar
|
||||||
|
import org.mozilla.fenix.ui.robots.searchScreen
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for verifying the presence of home screen and first-run homescreen elements
|
* Tests for verifying the presence of home screen and first-run homescreen elements
|
||||||
|
@ -166,4 +169,39 @@ class HomeScreenTest {
|
||||||
verifyCustomizeHomepageButton(true)
|
verifyCustomizeHomepageButton(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/414970
|
||||||
|
@Ignore("Failure, more details at: https://bugzilla.mozilla.org/show_bug.cgi?id=1830005")
|
||||||
|
@SmokeTest
|
||||||
|
@Test
|
||||||
|
fun addPrivateBrowsingShortcutFromHomeScreenCFRTest() {
|
||||||
|
homeScreen {
|
||||||
|
}.triggerPrivateBrowsingShortcutPrompt {
|
||||||
|
verifyNoThanksPrivateBrowsingShortcutButton(activityTestRule)
|
||||||
|
verifyAddPrivateBrowsingShortcutButton(activityTestRule)
|
||||||
|
clickAddPrivateBrowsingShortcutButton(activityTestRule)
|
||||||
|
clickAddAutomaticallyButton()
|
||||||
|
}.openHomeScreenShortcut("Private ${TestHelper.appName}") {}
|
||||||
|
searchScreen {
|
||||||
|
verifySearchView()
|
||||||
|
}.dismissSearchBar {
|
||||||
|
verifyCommonMythsLink()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/1569867
|
||||||
|
@Test
|
||||||
|
fun verifyJumpBackInContextualHintTest() {
|
||||||
|
activityTestRule.activityRule.applySettingsExceptions {
|
||||||
|
it.isJumpBackInCFREnabled = true
|
||||||
|
}
|
||||||
|
|
||||||
|
val genericPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
|
||||||
|
navigationToolbar {
|
||||||
|
}.enterURLAndEnterToBrowser(genericPage.url) {
|
||||||
|
}.goToHomescreen {
|
||||||
|
verifyJumpBackInMessage(activityTestRule)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,12 +16,15 @@ import org.junit.Test
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.ext.components
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.assertNativeAppOpens
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.assertYoutubeAppOpens
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.runWithCondition
|
||||||
|
import org.mozilla.fenix.helpers.Constants.PackageName.PRINT_SPOOLER
|
||||||
|
import org.mozilla.fenix.helpers.DataGenerationHelper.generateRandomString
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper
|
import org.mozilla.fenix.helpers.MatcherHelper
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper
|
import org.mozilla.fenix.helpers.TestHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.assertYoutubeAppOpens
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.runWithCondition
|
|
||||||
import org.mozilla.fenix.ui.robots.browserScreen
|
import org.mozilla.fenix.ui.robots.browserScreen
|
||||||
import org.mozilla.fenix.ui.robots.clickContextMenuItem
|
import org.mozilla.fenix.ui.robots.clickContextMenuItem
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
|
@ -260,7 +263,7 @@ class MainMenuTest {
|
||||||
@Test
|
@Test
|
||||||
fun addPageShortcutToHomeScreenTest() {
|
fun addPageShortcutToHomeScreenTest() {
|
||||||
val website = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
val website = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
val shortcutTitle = TestHelper.generateRandomString(5)
|
val shortcutTitle = generateRandomString(5)
|
||||||
|
|
||||||
homeScreen {
|
homeScreen {
|
||||||
}.openNavigationToolbar {
|
}.openNavigationToolbar {
|
||||||
|
@ -351,4 +354,33 @@ class MainMenuTest {
|
||||||
verifyPageContent("REFRESHED")
|
verifyPageContent("REFRESHED")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2282411
|
||||||
|
@Test
|
||||||
|
fun printWebPageFromMainMenuTest() {
|
||||||
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
|
||||||
|
navigationToolbar {
|
||||||
|
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
|
||||||
|
mDevice.waitForIdle()
|
||||||
|
}.openThreeDotMenu {
|
||||||
|
}.clickPrintButton {
|
||||||
|
assertNativeAppOpens(PRINT_SPOOLER)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2282408
|
||||||
|
@Test
|
||||||
|
fun printWebPageFromShareMenuTest() {
|
||||||
|
val defaultWebPage = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
|
||||||
|
navigationToolbar {
|
||||||
|
}.enterURLAndEnterToBrowser(defaultWebPage.url) {
|
||||||
|
mDevice.waitForIdle()
|
||||||
|
}.openThreeDotMenu {
|
||||||
|
}.clickShareButton {
|
||||||
|
}.clickPrintButton {
|
||||||
|
assertNativeAppOpens(PRINT_SPOOLER)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,119 @@
|
||||||
|
package org.mozilla.fenix.ui
|
||||||
|
|
||||||
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
|
import androidx.compose.material.Text
|
||||||
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.platform.testTag
|
||||||
|
import androidx.compose.ui.test.junit4.ComposeTestRule
|
||||||
|
import androidx.compose.ui.test.junit4.createComposeRule
|
||||||
|
import androidx.compose.ui.test.onNodeWithTag
|
||||||
|
import androidx.compose.ui.test.performScrollToIndex
|
||||||
|
import androidx.compose.ui.unit.dp
|
||||||
|
import org.junit.Assert.assertFalse
|
||||||
|
import org.junit.Assert.assertTrue
|
||||||
|
import org.junit.Rule
|
||||||
|
import org.junit.Test
|
||||||
|
import org.mozilla.fenix.compose.ext.onShown
|
||||||
|
|
||||||
|
private const val ON_SHOWN_ROOT_TAG = "onShownRoot"
|
||||||
|
private const val ON_SHOWN_SETTLE_TIME_MS = 1000
|
||||||
|
private const val ON_SHOWN_INDEX = 15
|
||||||
|
private const val ON_SHOWN_NODE_COUNT = 30
|
||||||
|
|
||||||
|
class ModifierTest {
|
||||||
|
|
||||||
|
@get:Rule
|
||||||
|
val composeTestRule = createComposeRule()
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun verifyModifierOnShownWhenScrolledToWithNoSettleTime() {
|
||||||
|
var onShown = false
|
||||||
|
composeTestRule.setContent {
|
||||||
|
ModifierOnShownContent(
|
||||||
|
settleTime = 0,
|
||||||
|
onVisible = {
|
||||||
|
onShown = true
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
composeTestRule.scrollToOnShownIndex()
|
||||||
|
|
||||||
|
assertTrue(onShown)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun verifyModifierOnShownAfterSettled() {
|
||||||
|
var onShown = false
|
||||||
|
composeTestRule.setContent {
|
||||||
|
ModifierOnShownContent(
|
||||||
|
onVisible = {
|
||||||
|
onShown = true
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
composeTestRule.scrollToOnShownIndex()
|
||||||
|
|
||||||
|
assertFalse(onShown)
|
||||||
|
|
||||||
|
composeTestRule.waitUntil(ON_SHOWN_SETTLE_TIME_MS + 500L) { onShown }
|
||||||
|
|
||||||
|
assertTrue(onShown)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun verifyModifierOnShownWhenNotVisible() {
|
||||||
|
val indexToValidate = ON_SHOWN_NODE_COUNT - 1
|
||||||
|
var onShown = false
|
||||||
|
composeTestRule.setContent {
|
||||||
|
ModifierOnShownContent(
|
||||||
|
indexToValidate = indexToValidate,
|
||||||
|
settleTime = 0,
|
||||||
|
onVisible = {
|
||||||
|
onShown = true
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
assertFalse(onShown)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun ComposeTestRule.scrollToOnShownIndex(index: Int = ON_SHOWN_INDEX) {
|
||||||
|
this.onNodeWithTag(ON_SHOWN_ROOT_TAG)
|
||||||
|
.performScrollToIndex(index)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun ModifierOnShownContent(
|
||||||
|
indexToValidate: Int = ON_SHOWN_INDEX,
|
||||||
|
settleTime: Int = ON_SHOWN_SETTLE_TIME_MS,
|
||||||
|
onVisible: () -> Unit,
|
||||||
|
) {
|
||||||
|
LazyColumn(
|
||||||
|
modifier = Modifier.testTag(ON_SHOWN_ROOT_TAG),
|
||||||
|
) {
|
||||||
|
items(ON_SHOWN_NODE_COUNT) { index ->
|
||||||
|
val modifier = if (index == indexToValidate) {
|
||||||
|
Modifier.onShown(
|
||||||
|
threshold = 1.0f,
|
||||||
|
settleTime = settleTime,
|
||||||
|
onVisible = onVisible,
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
Modifier
|
||||||
|
}
|
||||||
|
|
||||||
|
Text(
|
||||||
|
text = "Test item $index",
|
||||||
|
modifier = modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.height(50.dp),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -14,9 +14,9 @@ import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.runWithSystemLocaleChanged
|
||||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.runWithSystemLocaleChanged
|
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
import org.mozilla.fenix.ui.robots.navigationToolbar
|
import org.mozilla.fenix.ui.robots.navigationToolbar
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|
|
@ -10,9 +10,9 @@ import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.setNetworkEnabled
|
||||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
||||||
import org.mozilla.fenix.helpers.TestHelper.packageName
|
import org.mozilla.fenix.helpers.TestHelper.packageName
|
||||||
import org.mozilla.fenix.helpers.TestHelper.setNetworkEnabled
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.verifyUrl
|
import org.mozilla.fenix.helpers.TestHelper.verifyUrl
|
||||||
import org.mozilla.fenix.ui.robots.browserScreen
|
import org.mozilla.fenix.ui.robots.browserScreen
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
|
|
|
@ -0,0 +1,70 @@
|
||||||
|
package org.mozilla.fenix.ui
|
||||||
|
|
||||||
|
import androidx.compose.ui.test.junit4.AndroidComposeTestRule
|
||||||
|
import org.junit.Rule
|
||||||
|
import org.junit.Test
|
||||||
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.runWithLauncherIntent
|
||||||
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
|
|
||||||
|
class OnboardingTest {
|
||||||
|
|
||||||
|
@get:Rule
|
||||||
|
val activityTestRule =
|
||||||
|
AndroidComposeTestRule(
|
||||||
|
HomeActivityIntentTestRule.withDefaultSettingsOverrides(launchActivity = false),
|
||||||
|
) { it.activity }
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2122321
|
||||||
|
@Test
|
||||||
|
fun verifyFirstOnboardingCardItemsTest() {
|
||||||
|
runWithLauncherIntent(activityTestRule) {
|
||||||
|
homeScreen {
|
||||||
|
verifyFirstOnboardingCard(activityTestRule)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2122334
|
||||||
|
@SmokeTest
|
||||||
|
@Test
|
||||||
|
fun verifyFirstOnboardingCardItemsFunctionalityTest() {
|
||||||
|
runWithLauncherIntent(activityTestRule) {
|
||||||
|
homeScreen {
|
||||||
|
clickNotNowOnboardingButton(activityTestRule)
|
||||||
|
verifySecondOnboardingCard(activityTestRule)
|
||||||
|
swipeSecondOnboardingCardToRight()
|
||||||
|
}.clickSetAsDefaultBrowserOnboardingButton(activityTestRule) {
|
||||||
|
verifyAndroidDefaultAppsMenuAppears()
|
||||||
|
}.goBackToOnboardingScreen {
|
||||||
|
verifySecondOnboardingCard(activityTestRule)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2122343
|
||||||
|
@Test
|
||||||
|
fun verifySecondOnboardingCardItemsTest() {
|
||||||
|
runWithLauncherIntent(activityTestRule) {
|
||||||
|
homeScreen {
|
||||||
|
clickNotNowOnboardingButton(activityTestRule)
|
||||||
|
verifySecondOnboardingCard(activityTestRule)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2122344
|
||||||
|
@SmokeTest
|
||||||
|
@Test
|
||||||
|
fun verifySecondOnboardingCardSignInFunctionalityTest() {
|
||||||
|
runWithLauncherIntent(activityTestRule) {
|
||||||
|
homeScreen {
|
||||||
|
clickNotNowOnboardingButton(activityTestRule)
|
||||||
|
verifySecondOnboardingCard(activityTestRule)
|
||||||
|
}.clickSignInOnboardingButton(activityTestRule) {
|
||||||
|
verifyTurnOnSyncMenu()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -14,6 +14,8 @@ import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.assertExternalAppOpens
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.clearDownloadsFolder
|
||||||
import org.mozilla.fenix.helpers.Constants.PackageName.GOOGLE_DOCS
|
import org.mozilla.fenix.helpers.Constants.PackageName.GOOGLE_DOCS
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper
|
import org.mozilla.fenix.helpers.MatcherHelper
|
||||||
|
@ -21,8 +23,6 @@ import org.mozilla.fenix.helpers.MatcherHelper.itemContainingText
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdAndText
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdAndText
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper.itemWithText
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithText
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
|
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
|
||||||
import org.mozilla.fenix.helpers.TestHelper.assertExternalAppOpens
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.deleteDownloadedFileOnStorage
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
import org.mozilla.fenix.ui.robots.navigationToolbar
|
import org.mozilla.fenix.ui.robots.navigationToolbar
|
||||||
|
@ -50,6 +50,9 @@ class PDFViewerTest {
|
||||||
@After
|
@After
|
||||||
fun tearDown() {
|
fun tearDown() {
|
||||||
mockWebServer.shutdown()
|
mockWebServer.shutdown()
|
||||||
|
|
||||||
|
// Check and clear the downloads folder
|
||||||
|
clearDownloadsFolder()
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2048140
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2048140
|
||||||
|
@ -96,7 +99,6 @@ class PDFViewerTest {
|
||||||
}.clickOpen("application/pdf") {
|
}.clickOpen("application/pdf") {
|
||||||
assertExternalAppOpens(GOOGLE_DOCS)
|
assertExternalAppOpens(GOOGLE_DOCS)
|
||||||
}
|
}
|
||||||
deleteDownloadedFileOnStorage(downloadFile)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2283305
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2283305
|
||||||
|
|
|
@ -15,10 +15,10 @@ import org.junit.Test
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.registerAndCleanupIdlingResources
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.RetryTestRule
|
import org.mozilla.fenix.helpers.RetryTestRule
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.registerAndCleanupIdlingResources
|
|
||||||
import org.mozilla.fenix.helpers.ViewVisibilityIdlingResource
|
import org.mozilla.fenix.helpers.ViewVisibilityIdlingResource
|
||||||
import org.mozilla.fenix.ui.robots.browserScreen
|
import org.mozilla.fenix.ui.robots.browserScreen
|
||||||
import org.mozilla.fenix.ui.robots.navigationToolbar
|
import org.mozilla.fenix.ui.robots.navigationToolbar
|
||||||
|
|
|
@ -15,12 +15,12 @@ import org.junit.Test
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.registerAndCleanupIdlingResources
|
||||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
||||||
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
|
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
|
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
|
||||||
import org.mozilla.fenix.helpers.TestHelper.longTapSelectItem
|
import org.mozilla.fenix.helpers.TestHelper.longTapSelectItem
|
||||||
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
||||||
import org.mozilla.fenix.helpers.TestHelper.registerAndCleanupIdlingResources
|
|
||||||
import org.mozilla.fenix.ui.robots.browserScreen
|
import org.mozilla.fenix.ui.robots.browserScreen
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
import org.mozilla.fenix.ui.robots.navigationToolbar
|
import org.mozilla.fenix.ui.robots.navigationToolbar
|
||||||
|
|
|
@ -21,6 +21,12 @@ import org.junit.Test
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.ext.components
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.ext.settings
|
import org.mozilla.fenix.ext.settings
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.assertNativeAppOpens
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.denyPermission
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.grantSystemPermission
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.runWithCondition
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.runWithSystemLocaleChanged
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.verifyKeyboardVisibility
|
||||||
import org.mozilla.fenix.helpers.Constants.PackageName.ANDROID_SETTINGS
|
import org.mozilla.fenix.helpers.Constants.PackageName.ANDROID_SETTINGS
|
||||||
import org.mozilla.fenix.helpers.Constants.searchEngineCodes
|
import org.mozilla.fenix.helpers.Constants.searchEngineCodes
|
||||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
||||||
|
@ -32,17 +38,11 @@ import org.mozilla.fenix.helpers.MockBrowserDataHelper.createTabItem
|
||||||
import org.mozilla.fenix.helpers.MockBrowserDataHelper.setCustomSearchEngine
|
import org.mozilla.fenix.helpers.MockBrowserDataHelper.setCustomSearchEngine
|
||||||
import org.mozilla.fenix.helpers.SearchDispatcher
|
import org.mozilla.fenix.helpers.SearchDispatcher
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
|
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
|
||||||
import org.mozilla.fenix.helpers.TestHelper
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.appContext
|
import org.mozilla.fenix.helpers.TestHelper.appContext
|
||||||
import org.mozilla.fenix.helpers.TestHelper.assertNativeAppOpens
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton
|
import org.mozilla.fenix.helpers.TestHelper.clickSnackbarButton
|
||||||
import org.mozilla.fenix.helpers.TestHelper.denyPermission
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
||||||
import org.mozilla.fenix.helpers.TestHelper.grantSystemPermission
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.longTapSelectItem
|
import org.mozilla.fenix.helpers.TestHelper.longTapSelectItem
|
||||||
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
||||||
import org.mozilla.fenix.helpers.TestHelper.runWithCondition
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.verifyKeyboardVisibility
|
|
||||||
import org.mozilla.fenix.ui.robots.clickContextMenuItem
|
import org.mozilla.fenix.ui.robots.clickContextMenuItem
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
|
@ -77,7 +77,6 @@ class SearchTest {
|
||||||
isRecentTabsFeatureEnabled = false,
|
isRecentTabsFeatureEnabled = false,
|
||||||
isTCPCFREnabled = false,
|
isTCPCFREnabled = false,
|
||||||
isWallpaperOnboardingEnabled = false,
|
isWallpaperOnboardingEnabled = false,
|
||||||
isCookieBannerReductionDialogEnabled = false,
|
|
||||||
tabsTrayRewriteEnabled = false,
|
tabsTrayRewriteEnabled = false,
|
||||||
),
|
),
|
||||||
) { it.activity }
|
) { it.activity }
|
||||||
|
@ -792,7 +791,7 @@ class SearchTest {
|
||||||
fun verifySearchEnginesFunctionalityUsingRTLLocaleTest() {
|
fun verifySearchEnginesFunctionalityUsingRTLLocaleTest() {
|
||||||
val arabicLocale = Locale("ar", "AR")
|
val arabicLocale = Locale("ar", "AR")
|
||||||
|
|
||||||
TestHelper.runWithSystemLocaleChanged(arabicLocale, activityTestRule.activityRule) {
|
runWithSystemLocaleChanged(arabicLocale, activityTestRule.activityRule) {
|
||||||
homeScreen {
|
homeScreen {
|
||||||
}.openSearch {
|
}.openSearch {
|
||||||
verifyTranslatedFocusedNavigationToolbar("ابحث أو أدخِل عنوانا")
|
verifyTranslatedFocusedNavigationToolbar("ابحث أو أدخِل عنوانا")
|
||||||
|
|
|
@ -13,16 +13,15 @@ import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.ext.settings
|
import org.mozilla.fenix.ext.settings
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.registerAndCleanupIdlingResources
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
|
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.getEnhancedTrackingProtectionAsset
|
import org.mozilla.fenix.helpers.TestAssetHelper.getEnhancedTrackingProtectionAsset
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
|
import org.mozilla.fenix.helpers.TestHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.registerAndCleanupIdlingResources
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.verifySnackBarText
|
import org.mozilla.fenix.helpers.TestHelper.verifySnackBarText
|
||||||
import org.mozilla.fenix.helpers.TestHelper.waitUntilSnackbarGone
|
import org.mozilla.fenix.helpers.TestHelper.waitUntilSnackbarGone
|
||||||
import org.mozilla.fenix.ui.robots.addonsMenu
|
import org.mozilla.fenix.ui.robots.addonsMenu
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
import org.mozilla.fenix.ui.robots.navigationToolbar
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for verifying the functionality of installing or removing addons
|
* Tests for verifying the functionality of installing or removing addons
|
||||||
|
@ -101,8 +100,7 @@ class SettingsAddonsTest {
|
||||||
val addonName = "uBlock Origin"
|
val addonName = "uBlock Origin"
|
||||||
|
|
||||||
addonsMenu {
|
addonsMenu {
|
||||||
installAddon(addonName)
|
installAddon(addonName, activityTestRule)
|
||||||
verifyAddonInstallCompleted(addonName, activityTestRule)
|
|
||||||
closeAddonInstallCompletePrompt()
|
closeAddonInstallCompletePrompt()
|
||||||
}.openDetailedMenuForAddon(addonName) {
|
}.openDetailedMenuForAddon(addonName) {
|
||||||
}.removeAddon(activityTestRule) {
|
}.removeAddon(activityTestRule) {
|
||||||
|
@ -115,25 +113,34 @@ class SettingsAddonsTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Harden to dynamically install addons from position
|
||||||
|
// in list of detected addons on screen instead of hard-coded values.
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/561600
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/561600
|
||||||
// Installs uBlock add-on and checks that the app doesn't crash while loading pages with trackers
|
// Installs 2 add-on and checks that the app doesn't crash while navigating the app
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun noCrashWithAddonInstalledTest() {
|
fun noCrashWithAddonInstalledTest() {
|
||||||
// setting ETP to Strict mode to test it works with add-ons
|
// setting ETP to Strict mode to test it works with add-ons
|
||||||
activityTestRule.activity.settings().setStrictETP()
|
activityTestRule.activity.settings().setStrictETP()
|
||||||
|
|
||||||
val addonName = "uBlock Origin"
|
val uBlockAddon = "uBlock Origin"
|
||||||
|
val darkReaderAddon = "Dark Reader"
|
||||||
val trackingProtectionPage = getEnhancedTrackingProtectionAsset(mockWebServer)
|
val trackingProtectionPage = getEnhancedTrackingProtectionAsset(mockWebServer)
|
||||||
|
|
||||||
addonsMenu {
|
addonsMenu {
|
||||||
installAddon(addonName)
|
installAddon(uBlockAddon, activityTestRule)
|
||||||
verifyAddonInstallCompleted(addonName, activityTestRule)
|
closeAddonInstallCompletePrompt()
|
||||||
|
installAddon(darkReaderAddon, activityTestRule)
|
||||||
closeAddonInstallCompletePrompt()
|
closeAddonInstallCompletePrompt()
|
||||||
}.goBack {
|
}.goBack {
|
||||||
}.openNavigationToolbar {
|
}.openNavigationToolbar {
|
||||||
}.enterURLAndEnterToBrowser(trackingProtectionPage.url) {
|
}.enterURLAndEnterToBrowser(trackingProtectionPage.url) {
|
||||||
verifyUrl(trackingProtectionPage.url.toString())
|
verifyUrl(trackingProtectionPage.url.toString())
|
||||||
|
}.goToHomescreen {
|
||||||
|
}.openTopSiteTabWithTitle("Top Articles") {
|
||||||
|
}.openThreeDotMenu {
|
||||||
|
}.openSettings {
|
||||||
|
verifySettingsView()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,22 +148,38 @@ class SettingsAddonsTest {
|
||||||
@SmokeTest
|
@SmokeTest
|
||||||
@Test
|
@Test
|
||||||
fun verifyUBlockWorksInPrivateModeTest() {
|
fun verifyUBlockWorksInPrivateModeTest() {
|
||||||
|
TestHelper.appContext.settings().shouldShowCookieBannersCFR = false
|
||||||
val addonName = "uBlock Origin"
|
val addonName = "uBlock Origin"
|
||||||
val genericPage = getGenericAsset(mockWebServer, 1)
|
|
||||||
|
|
||||||
addonsMenu {
|
addonsMenu {
|
||||||
installAddon(addonName)
|
installAddon(addonName, activityTestRule)
|
||||||
verifyAddonInstallCompleted(addonName, activityTestRule)
|
|
||||||
selectAllowInPrivateBrowsing()
|
selectAllowInPrivateBrowsing()
|
||||||
closeAddonInstallCompletePrompt()
|
closeAddonInstallCompletePrompt()
|
||||||
}.goBack {
|
}.goBack {
|
||||||
}.togglePrivateBrowsingMode()
|
}.openContextMenuOnSponsoredShortcut("Top Articles") {
|
||||||
navigationToolbar {
|
}.openTopSiteInPrivateTab {
|
||||||
}.enterURLAndEnterToBrowser(genericPage.url) {
|
waitForPageToLoad()
|
||||||
verifyPageContent(genericPage.content)
|
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
openAddonsSubList()
|
openAddonsSubList()
|
||||||
verifyAddonAvailableInMainMenu(addonName)
|
verifyAddonAvailableInMainMenu(addonName)
|
||||||
|
verifyTrackersBlockedByUblock()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/875785
|
||||||
|
@Test
|
||||||
|
fun verifyUBlockWorksInNormalModeTest() {
|
||||||
|
val addonName = "uBlock Origin"
|
||||||
|
|
||||||
|
addonsMenu {
|
||||||
|
installAddon(addonName, activityTestRule)
|
||||||
|
closeAddonInstallCompletePrompt()
|
||||||
|
}.goBack {
|
||||||
|
}.openTopSiteTabWithTitle("Top Articles") {
|
||||||
|
waitForPageToLoad()
|
||||||
|
}.openThreeDotMenu {
|
||||||
|
openAddonsSubList()
|
||||||
|
verifyTrackersBlockedByUblock()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,12 +13,14 @@ import org.junit.Before
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
|
import org.mozilla.fenix.ext.settings
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.assertYoutubeAppOpens
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper.itemContainingText
|
import org.mozilla.fenix.helpers.MatcherHelper.itemContainingText
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdAndText
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResIdAndText
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.assertYoutubeAppOpens
|
import org.mozilla.fenix.helpers.TestHelper
|
||||||
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
|
@ -201,6 +203,7 @@ class SettingsAdvancedTest {
|
||||||
// Assumes Youtube is installed and enabled
|
// Assumes Youtube is installed and enabled
|
||||||
@Test
|
@Test
|
||||||
fun privateBrowsingAskBeforeOpeningLinkInAppCancelTest() {
|
fun privateBrowsingAskBeforeOpeningLinkInAppCancelTest() {
|
||||||
|
TestHelper.appContext.settings().shouldShowCookieBannersCFR = false
|
||||||
val externalLinksPage = TestAssetHelper.getExternalLinksAsset(mockWebServer)
|
val externalLinksPage = TestAssetHelper.getExternalLinksAsset(mockWebServer)
|
||||||
|
|
||||||
homeScreen {
|
homeScreen {
|
||||||
|
|
|
@ -16,17 +16,18 @@ import org.junit.Test
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.setNetworkEnabled
|
||||||
|
import org.mozilla.fenix.helpers.DataGenerationHelper.getStringResource
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper
|
import org.mozilla.fenix.helpers.MatcherHelper
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.getStorageTestAsset
|
import org.mozilla.fenix.helpers.TestAssetHelper.getStorageTestAsset
|
||||||
import org.mozilla.fenix.helpers.TestHelper
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.deleteDownloadedFileOnStorage
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
||||||
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
||||||
import org.mozilla.fenix.helpers.TestHelper.restartApp
|
import org.mozilla.fenix.helpers.TestHelper.restartApp
|
||||||
import org.mozilla.fenix.helpers.TestHelper.setNetworkEnabled
|
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
|
import org.mozilla.fenix.ui.robots.downloadRobot
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
import org.mozilla.fenix.ui.robots.navigationToolbar
|
import org.mozilla.fenix.ui.robots.navigationToolbar
|
||||||
|
|
||||||
|
@ -58,6 +59,9 @@ class SettingsDeleteBrowsingDataOnQuitTest {
|
||||||
@After
|
@After
|
||||||
fun tearDown() {
|
fun tearDown() {
|
||||||
mockWebServer.shutdown()
|
mockWebServer.shutdown()
|
||||||
|
|
||||||
|
// Check and clear the downloads folder
|
||||||
|
AppAndSystemHelper.clearDownloadsFolder()
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/416048
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/416048
|
||||||
|
@ -191,13 +195,10 @@ class SettingsDeleteBrowsingDataOnQuitTest {
|
||||||
clickDeleteBrowsingOnQuitButtonSwitch()
|
clickDeleteBrowsingOnQuitButtonSwitch()
|
||||||
exitMenu()
|
exitMenu()
|
||||||
}
|
}
|
||||||
navigationToolbar {
|
downloadRobot {
|
||||||
}.enterURLAndEnterToBrowser(downloadTestPage.toUri()) {
|
openPageAndDownloadFile(url = downloadTestPage.toUri(), downloadFile = "smallZip.zip")
|
||||||
}.clickDownloadLink("smallZip.zip") {
|
|
||||||
verifyDownloadPrompt("smallZip.zip")
|
|
||||||
}.clickDownload {
|
|
||||||
verifyDownloadCompleteNotificationPopup()
|
verifyDownloadCompleteNotificationPopup()
|
||||||
}.closeCompletedDownloadPrompt {
|
}.closeDownloadPrompt {
|
||||||
}.goToHomescreen {
|
}.goToHomescreen {
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
clickQuit()
|
clickQuit()
|
||||||
|
@ -209,7 +210,6 @@ class SettingsDeleteBrowsingDataOnQuitTest {
|
||||||
}.openDownloadsManager {
|
}.openDownloadsManager {
|
||||||
verifyEmptyDownloadsList()
|
verifyEmptyDownloadsList()
|
||||||
}
|
}
|
||||||
deleteDownloadedFileOnStorage("smallZip.zip")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/416053
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/416053
|
||||||
|
@ -251,7 +251,7 @@ class SettingsDeleteBrowsingDataOnQuitTest {
|
||||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/416052
|
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/416052
|
||||||
@Test
|
@Test
|
||||||
fun deleteCachedFilesOnQuitTest() {
|
fun deleteCachedFilesOnQuitTest() {
|
||||||
val pocketTopArticles = TestHelper.getStringResource(R.string.pocket_pinned_top_articles)
|
val pocketTopArticles = getStringResource(R.string.pocket_pinned_top_articles)
|
||||||
|
|
||||||
homeScreen {
|
homeScreen {
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
|
|
|
@ -13,15 +13,15 @@ import org.junit.Test
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.setNetworkEnabled
|
||||||
|
import org.mozilla.fenix.helpers.DataGenerationHelper.getStringResource
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId
|
import org.mozilla.fenix.helpers.MatcherHelper.itemWithResId
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.getStorageTestAsset
|
import org.mozilla.fenix.helpers.TestAssetHelper.getStorageTestAsset
|
||||||
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
import org.mozilla.fenix.helpers.TestHelper.exitMenu
|
||||||
import org.mozilla.fenix.helpers.TestHelper.getStringResource
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
||||||
import org.mozilla.fenix.helpers.TestHelper.restartApp
|
import org.mozilla.fenix.helpers.TestHelper.restartApp
|
||||||
import org.mozilla.fenix.helpers.TestHelper.setNetworkEnabled
|
|
||||||
import org.mozilla.fenix.ui.robots.browserScreen
|
import org.mozilla.fenix.ui.robots.browserScreen
|
||||||
import org.mozilla.fenix.ui.robots.clickPageObject
|
import org.mozilla.fenix.ui.robots.clickPageObject
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
|
|
|
@ -1,100 +0,0 @@
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
package org.mozilla.fenix.ui
|
|
||||||
|
|
||||||
import androidx.test.platform.app.InstrumentationRegistry
|
|
||||||
import androidx.test.uiautomator.UiDevice
|
|
||||||
import okhttp3.mockwebserver.MockWebServer
|
|
||||||
import org.junit.After
|
|
||||||
import org.junit.Before
|
|
||||||
import org.junit.Ignore
|
|
||||||
import org.junit.Rule
|
|
||||||
import org.junit.Test
|
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
|
||||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tests for verifying the main three dot menu options
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
class SettingsDeveloperToolsTest {
|
|
||||||
private lateinit var mDevice: UiDevice
|
|
||||||
private lateinit var mockWebServer: MockWebServer
|
|
||||||
|
|
||||||
@get:Rule
|
|
||||||
val activityTestRule = HomeActivityTestRule()
|
|
||||||
|
|
||||||
@Before
|
|
||||||
fun setUp() {
|
|
||||||
mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
|
|
||||||
mockWebServer = MockWebServer().apply {
|
|
||||||
dispatcher = AndroidAssetDispatcher()
|
|
||||||
start()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@After
|
|
||||||
fun tearDown() {
|
|
||||||
mockWebServer.shutdown()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Walks through settings developer tools menu and sub-menus to ensure all items are present
|
|
||||||
@Test
|
|
||||||
fun settingsDeveloperToolsItemsTest() {
|
|
||||||
homeScreen {
|
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.openSettings {
|
|
||||||
verifyRemoteDebuggingButton()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DEVELOPER TOOLS
|
|
||||||
@Ignore("This is a stub test, ignore for now")
|
|
||||||
@Test
|
|
||||||
fun turnOnRemoteDebuggingViaUsb() {
|
|
||||||
// Open terminal
|
|
||||||
// Verify USB debugging is off
|
|
||||||
// Open 3dot (main) menu
|
|
||||||
// Select settings
|
|
||||||
// Toggle Remote debugging via USB to 'on'
|
|
||||||
// Open terminal
|
|
||||||
// Verify USB debugging is on
|
|
||||||
}
|
|
||||||
|
|
||||||
// ABOUT
|
|
||||||
@Ignore("This is a stub test, ignore for now")
|
|
||||||
@Test
|
|
||||||
fun verifyHelpRedirect() {
|
|
||||||
// Open 3dot (main) menu
|
|
||||||
// Select settings
|
|
||||||
// Click on "Help"
|
|
||||||
// Verify redirect to: https://support.mozilla.org/
|
|
||||||
}
|
|
||||||
|
|
||||||
@Ignore("This is a stub test, ignore for now")
|
|
||||||
@Test
|
|
||||||
fun verifyRateOnGooglePlayRedirect() {
|
|
||||||
// Open 3dot (main) menu
|
|
||||||
// Select settings
|
|
||||||
// Click on "Rate on Google Play"
|
|
||||||
// Verify Android "Open with Google Play Store" sub menu
|
|
||||||
}
|
|
||||||
|
|
||||||
@Ignore("This is a stub test, ignore for now")
|
|
||||||
@Test
|
|
||||||
fun verifyAboutFirefoxPreview() {
|
|
||||||
// Open 3dot (main) menu
|
|
||||||
// Select settings
|
|
||||||
// Click on "Verify About Firefox Preview"
|
|
||||||
// Verify about page contains....
|
|
||||||
// Build #
|
|
||||||
// Version #
|
|
||||||
// "Firefox Preview is produced by Mozilla"
|
|
||||||
// Day, Date, timestamp
|
|
||||||
// "Open source libraries we use"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -14,14 +14,14 @@ import org.mozilla.fenix.FenixApplication
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.registerAndCleanupIdlingResources
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.runWithSystemLocaleChanged
|
||||||
|
import org.mozilla.fenix.helpers.DataGenerationHelper.getStringResource
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
|
import org.mozilla.fenix.helpers.RecyclerViewIdlingResource
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.getLoremIpsumAsset
|
import org.mozilla.fenix.helpers.TestAssetHelper.getLoremIpsumAsset
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeLong
|
import org.mozilla.fenix.helpers.TestAssetHelper.waitingTimeLong
|
||||||
import org.mozilla.fenix.helpers.TestHelper.getStringResource
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
||||||
import org.mozilla.fenix.helpers.TestHelper.registerAndCleanupIdlingResources
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.runWithSystemLocaleChanged
|
|
||||||
import org.mozilla.fenix.ui.robots.checkTextSizeOnWebsite
|
import org.mozilla.fenix.ui.robots.checkTextSizeOnWebsite
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
import org.mozilla.fenix.ui.util.FRENCH_LANGUAGE_HEADER
|
import org.mozilla.fenix.ui.util.FRENCH_LANGUAGE_HEADER
|
||||||
|
|
|
@ -12,11 +12,11 @@ import org.junit.Rule
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.mozilla.fenix.customannotations.SmokeTest
|
import org.mozilla.fenix.customannotations.SmokeTest
|
||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
|
import org.mozilla.fenix.helpers.AppAndSystemHelper.openAppFromExternalLink
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.RetryTestRule
|
import org.mozilla.fenix.helpers.RetryTestRule
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
|
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
|
||||||
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
import org.mozilla.fenix.helpers.TestHelper.mDevice
|
||||||
import org.mozilla.fenix.helpers.TestHelper.openAppFromExternalLink
|
|
||||||
import org.mozilla.fenix.helpers.TestHelper.restartApp
|
import org.mozilla.fenix.helpers.TestHelper.restartApp
|
||||||
import org.mozilla.fenix.ui.robots.browserScreen
|
import org.mozilla.fenix.ui.robots.browserScreen
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
|
@ -103,12 +103,12 @@ class SettingsHomepageTest {
|
||||||
navigationToolbar {
|
navigationToolbar {
|
||||||
}.enterURLAndEnterToBrowser(genericURL.url) {
|
}.enterURLAndEnterToBrowser(genericURL.url) {
|
||||||
}.goToHomescreen {
|
}.goToHomescreen {
|
||||||
verifyRecentlyVisitedSectionIsDisplayed()
|
verifyRecentlyVisitedSectionIsDisplayed(true)
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
}.openCustomizeHome {
|
}.openCustomizeHome {
|
||||||
clickRecentlyVisited()
|
clickRecentlyVisited()
|
||||||
}.goBackToHomeScreen {
|
}.goBackToHomeScreen {
|
||||||
verifyRecentlyVisitedSectionIsNotDisplayed()
|
verifyRecentlyVisitedSectionIsDisplayed(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,12 +141,12 @@ class SettingsHomepageTest {
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
}.bookmarkPage {
|
}.bookmarkPage {
|
||||||
}.goToHomescreen {
|
}.goToHomescreen {
|
||||||
verifyRecentBookmarksSectionIsDisplayed()
|
verifyRecentBookmarksSectionIsDisplayed(exists = true)
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
}.openCustomizeHome {
|
}.openCustomizeHome {
|
||||||
clickRecentBookmarksButton()
|
clickRecentBookmarksButton()
|
||||||
}.goBackToHomeScreen {
|
}.goBackToHomeScreen {
|
||||||
verifyRecentBookmarksSectionIsNotDisplayed()
|
verifyRecentBookmarksSectionIsDisplayed(exists = false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue