Skip to content

Commit

Permalink
Merge branch 'trunk' into build/restructure-annotations-processors-mo…
Browse files Browse the repository at this point in the history
…dule
  • Loading branch information
ParaskP7 authored Jun 24, 2022
2 parents 72dbcdf + 2d4a1e1 commit a25f1dd
Show file tree
Hide file tree
Showing 496 changed files with 2,343 additions and 5,578 deletions.
2 changes: 2 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
20.2
-----
* [*] Added heic/heif image format support [https://github.com/wordpress-mobile/WordPress-Android/pull/16773]
* [***] Jetpack App: Allow WP.com users to sign in to their browsers by scanning a QR Code in the Jetpack Android App. [https://github.com/wordpress-mobile/WordPress-Android/issues/16481]
* [*] Fix reader tags cannot be followed in some languages bug [https://github.com/wordpress-mobile/WordPress-Android/pull/16789]

20.1
-----
Expand Down
4 changes: 2 additions & 2 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ dependencies {
}
androidTestImplementation 'org.apache.httpcomponents:httpclient-android:4.3.5.1'

androidTestImplementation project(path:':WordPressMocks')
androidTestImplementation project(path:':libs:mocks')

androidTestImplementation "androidx.test:runner:$androidxTestCoreVersion"
androidTestImplementation "androidx.test:rules:$androidxTestCoreVersion"
Expand Down Expand Up @@ -473,7 +473,7 @@ dependencies {
implementation (project(path:':libs:analytics')) {
exclude group: 'org.wordpress', module: 'utils'
}
implementation (project(path:':libs:editor:WordPressEditor')) {
implementation (project(path:':libs:editor')) {
exclude group: 'org.wordpress', module: 'utils'
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## UI tests Overview

WordPress for Android has UI acceptance tests for critical user flows through the app, such as login,
WordPress for Android has UI acceptance tests for critical user flows through the app, such as login,
signup, and publishing. The tests use mocked network requests with [WireMock](http://wiremock.org/).

## Running the tests
## Running the tests

**Note that due to the mock server setup, tests cannot be run on physical devices right now.**

Expand All @@ -22,22 +22,22 @@ Great! When adding a new UI test, consider:
* What screens/pages are being tested (defined in `pages/`).
* What user flows are being used (defined in `flows/`).
* Any specific UI components being interacted with?(defined in `components/`).
* What network requests are made during the test (defined in `libs/mocks/WordPressMocks`)).
* What network requests are made during the test (defined in `libs/mocks`)).

It's preferred to focus UI tests on entire user flows, and group tests with related flows or goals in the same test file.

When you add a new test, you may need to add new screens, methods, and flows. When writing these I encourage you to check
When you add a new test, you may need to add new screens, methods, and flows. When writing these I encourage you to check
`support/WPSupportUtils.java` for additional code to reuse to automate the task. Our tests are also used to generate screenshots
and a lot of useful helper functions are made available through that auxillary file. Wherever possible, avoid the use
of a string to select a UI element on the screen; the use of other identifiers such as id or content description is preferable
of a string to select a UI element on the screen; the use of other identifiers such as id or content description is preferable
and should be used where possible, even if that means adding it to a UI element that might be missing the appropriate field.
This ensures tests can be run regardless of the device language.

## Adding or updating network mocks

When you add a test (or when the app changes), the request definitions for WireMock need to be updated. You can read WireMock’s documentation [here](http://wiremock.org/docs/).

If you are unsure what network requests need to be mocked for a test, an easy way to find out is to run the app through [Charles Proxy](https://www.charlesproxy.com/) and observe the required requests.

`WordPressMocks` is included as a library in `WordPress-Android` and are located in `libs/mocks/WordPressMocks/`; you can update
`mocks` is included as a module in `WordPress-Android` and are located in `libs/mocks/`; you can update
your local mock files and make changes here.
Loading

0 comments on commit a25f1dd

Please sign in to comment.