Skip to content

Commit

Permalink
Merge branch 'master' into no-compose-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa authored Sep 26, 2023
2 parents 74ccbfc + c34ef73 commit 316731f
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 20 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,9 @@ jobs:
outputs:
versions: ${{ steps.generate-matrix.outputs.versions }}
steps:
- name: Generate Node.js versions matrix
- name: Select 3 most recent LTS versions of Node.js
id: generate-matrix
run: |
sudo apt-get install -y lynx
lynx -dump https://endoflife.date/nodejs | grep -E -o '[0-9]+[( a-zA-Z]+LTS\)' | grep -E -o '([0-9]+)' > eol.list
cat eol.list
lts1=$(cat eol.list | head -1)
lts2=$(cat eol.list | head -2 | tail -1)
lts3=$(cat eol.list | head -3 | tail -1)
VERSIONS="[$lts1, $lts2, $lts3]"
echo "versions=${VERSIONS}" >> "$GITHUB_OUTPUT"
run: echo "versions=$(curl -s https://endoflife.date/api/nodejs.json | jq -c '[[.[] | select(.lts != false)][:3] | .[].cycle | tonumber]')" >> "$GITHUB_OUTPUT"

node_test:
needs:
Expand All @@ -37,8 +29,6 @@ jobs:
with:
distribution: 'temurin'
java-version: '11'
- run: npm i -g npm
name: Update NPM
- run: npm install --no-package-lock
name: Install dev dependencies
- run: npm run lint
Expand Down
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,59 @@
## [2.25.8](https://github.com/appium/appium-espresso-driver/compare/v2.25.7...v2.25.8) (2023-09-24)


### Bug Fixes

* release package ([#915](https://github.com/appium/appium-espresso-driver/issues/915)) ([bb6563b](https://github.com/appium/appium-espresso-driver/commit/bb6563bc45b740e8b6e1db3ee4ce3e0bf4398cab))

## [2.25.7](https://github.com/appium/appium-espresso-driver/compare/v2.25.6...v2.25.7) (2023-09-14)


### Miscellaneous Chores

* **deps-dev:** bump sinon from 15.2.0 to 16.0.0 ([#912](https://github.com/appium/appium-espresso-driver/issues/912)) ([e046a85](https://github.com/appium/appium-espresso-driver/commit/e046a8567533735ce7d69397e5ab35bf60a74df2))

## [2.25.6](https://github.com/appium/appium-espresso-driver/compare/v2.25.5...v2.25.6) (2023-09-03)


### Miscellaneous Chores

* modify README.md to release once ([9998e7c](https://github.com/appium/appium-espresso-driver/commit/9998e7cc9db460050442aa1ee375f93782653d48))

## [2.25.5](https://github.com/appium/appium-espresso-driver/compare/v2.25.4...v2.25.5) (2023-08-28)


### Miscellaneous Chores

* **deps-dev:** bump conventional-changelog-conventionalcommits ([#906](https://github.com/appium/appium-espresso-driver/issues/906)) ([9258a33](https://github.com/appium/appium-espresso-driver/commit/9258a33084be02d4b63ce743ff57d81d731b44bb))

## [2.25.4](https://github.com/appium/appium-espresso-driver/compare/v2.25.3...v2.25.4) (2023-08-25)


### Miscellaneous Chores

* **deps-dev:** bump semantic-release from 20.1.3 to 21.1.0 ([#904](https://github.com/appium/appium-espresso-driver/issues/904)) ([a8d0354](https://github.com/appium/appium-espresso-driver/commit/a8d03541380b6e30e927b29409e8c9ca829cada5))

## [2.25.3](https://github.com/appium/appium-espresso-driver/compare/v2.25.2...v2.25.3) (2023-08-21)


### Bug Fixes

* do not reply error message in updateSettings to follow other drivers ([#902](https://github.com/appium/appium-espresso-driver/issues/902)) ([19f02cc](https://github.com/appium/appium-espresso-driver/commit/19f02cccb30252c8bced24c3da572454caccbab5))

## [2.25.2](https://github.com/appium/appium-espresso-driver/compare/v2.25.1...v2.25.2) (2023-08-17)


### Bug Fixes

* calls this.settings in settings handling ([#901](https://github.com/appium/appium-espresso-driver/issues/901)) ([7858760](https://github.com/appium/appium-espresso-driver/commit/7858760365734c9edf0f981808cd85b3f7e80436))

## [2.25.1](https://github.com/appium/appium-espresso-driver/compare/v2.25.0...v2.25.1) (2023-08-14)


### Miscellaneous Chores

* **deps-dev:** bump lint-staged from 13.3.0 to 14.0.0 ([#899](https://github.com/appium/appium-espresso-driver/issues/899)) ([ca0048f](https://github.com/appium/appium-espresso-driver/commit/ca0048f841f8e8469ceaa69b4cfe01cc890348e8))

## [2.25.0](https://github.com/appium/appium-espresso-driver/compare/v2.24.0...v2.25.0) (2023-08-07)


Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ The Espresso package consists of two main parts:
> Since version 2.0.0 Espresso driver has dropped the support of Appium 1, and is only compatible to Appium 2. Use the `appium driver install espresso`
> command to add it to your Appium 2 dist.

## Comparison with UiAutomator2

The key difference between [UiAutomator2 Driver](https://github.com/appium/appium-uiautomator2-driver) and Espresso Driver is that UiAutomator2 is a black-box testing framework, and Espresso is a "grey-box" testing framework. The Espresso Driver itself is black-box (no internals of the code are exposed to the tester), but the Espresso framework itself has access to the internals of Android applications. This distinction has a few notable benefits. It can find elements that aren't rendered on the screen, it can identify elements by the Android View Tag, and it makes use of [IdlingResource](https://developer.android.com/reference/android/support/test/espresso/IdlingResource) which blocks the framework from running commands until the UI thread is free. There is a limited support of out-of-app areas automation via the [mobile: uiautomator](#mobile-uiautomator) command.
Expand Down
22 changes: 20 additions & 2 deletions lib/commands/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,12 +321,30 @@ commands.mobileClickAction = async function mobileClickAction (opts = {}) {
});
};

/**
* @typedef {Object} SettingsOptions
* @property {!string|number|boolean} Object Settings parameters that is available in
* https://github.com/appium/appium-espresso-driver#settings-api or enabled plugins.
*/

/**
* Apply the given settings to the espresso driver and the espresso server.
* Errors by the espresso server will be printed as log, but it does not return an error message.
* @param {SettingsOptions} settings
*/
commands.updateSettings = async function updateSettings (settings) {
return await this.espresso.jwproxy.command(`/appium/settings`, 'POST', { settings });
await this.settings.update(settings);
try {
await this.espresso.jwproxy.command(`/appium/settings`, 'POST', { settings });
} catch (err) {
this.log.warn(`The espresso driver responded an error. Original error: ${err.message}`);
};
};

commands.getSettings = async function getSettings () {
return await this.espresso.jwproxy.command(`/appium/settings`, 'GET');
const driverSettings = this.settings.getSettings();
const serverSettings = await this.espresso.jwproxy.command(`/appium/settings`, 'GET');
return {...driverSettings, ...serverSettings};
};

// Stop proxying to any Chromedriver and redirect to Espresso
Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"automated testing",
"android"
],
"version": "2.25.0",
"version": "2.25.8",
"author": "Appium Contributors",
"license": "Apache-2.0",
"repository": {
Expand Down Expand Up @@ -63,7 +63,9 @@
"espresso-server/lint.xml",
"!.DS_Store",
"CHANGELOG.md",
"scripts"
"scripts",
"LICENSE",
"npm-shrinkwrap.json"
],
"dependencies": {
"@babel/runtime": "^7.4.3",
Expand Down Expand Up @@ -117,18 +119,18 @@
"async-lock": "^1.0.0",
"chai": "^4.1.2",
"chai-as-promised": "^7.1.1",
"conventional-changelog-conventionalcommits": "^6.0.0",
"conventional-changelog-conventionalcommits": "^7.0.1",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-mocha": "^9.0.0",
"eslint-plugin-promise": "^6.0.0",
"lint-staged": "^13.0.3",
"lint-staged": "^14.0.0",
"mocha": "^10.0.0",
"pre-commit": "^1.2.2",
"rimraf": "^5.0.0",
"semantic-release": "^20.0.2",
"sinon": "^15.0.0",
"sinon": "^16.0.0",
"webdriverio": "^8.0.2",
"xpath": "^0.x"
}
Expand Down

0 comments on commit 316731f

Please sign in to comment.