Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: wdi5^2 #536

Merged
merged 19 commits into from
Sep 8, 2023
Prev Previous commit
Next Next commit
docs: update usage
and fix some stuff in configuration
  • Loading branch information
Volker Buzek committed Sep 7, 2023
commit fd2937fa702874b55b52956021098f8ae61310a4
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ With `wdi5` being an extension ("service") to WebdriverIO (`wdio`), first and fo

Of course the configuration file name can be changed arbitrarily. But then it needs to be specified explicitly when [running `wdi5`/`wdio`](running), e.g. `$> wdio run myconfig.js`.

?> `wdi5` can be used both in a [CJS-](https://nodejs.org/docs/latest/api/modules.html) and an [ESM-](https://nodejs.org/docs/latest/api/esm.html)environment. The code examples throughout sometimes use either or, but in no favor for one over the other.
?> `wdi5` can be used both in a [CJS-](https://nodejs.org/docs/latest/api/modules.html) and an [ESM-](https://nodejs.org/docs/latest/api/esm.html)environment. The code examples sometimes use either or, but in no favor of one over the other.

## `wdi5`

Expand Down
6 changes: 4 additions & 2 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ See below for many more examples on both using `wdi5`- and `wdio`-APIs, denoting
The files containing tests should reside in `$ui5-app/webapp/test/` and be named `*.test.(j|t)s`.
Yet both test file directory and naming pattern can be specified [via WebdriverIO's `specs`](https://webdriver.io/docs/options#specs) in [`wdio.conf.(j|t)s`](/configuration#wdi5).

?> `wdi5` can be used both in a [CJS-](https://nodejs.org/docs/latest/api/modules.html) and an [ESM-](https://nodejs.org/docs/latest/api/esm.html)environment. The code examples sometimes use either or, but in no favor of one over the other.

### Test suites

WebdriverIO and `wdi5` can be used with [Mocha](http:https://mochajs.org/), [Jasmine](http:https://jasmine.github.io/), and [Cucumber](https://cucumber.io/), with Mocha being used in [all examples](https://github.com/ui5-community/wdi5/tree/main/examples) in `wdi5`.
Expand Down Expand Up @@ -74,7 +76,7 @@ describe("test suite description", () => {
#### **JavaScript (ESM)**

```js
const { wdi5 } = require("wdio-ui5-service")
import { wdi5 } from "wdio-ui5-service"

describe("test suite description", () => {
before(async () => {
Expand Down Expand Up @@ -404,7 +406,7 @@ If `getAggregation` is called via a shorthand such as `sap.m.ListBase.getItems()

### `enterText`

`enterText(sText)`: input `sText` into a (input-capable) control via [EnterText](https://ui5.sap.com/#/api/sap.ui.test.actions.EnterText)
`enterText(text)`: input `text` (`string`) into a (input-capable) control via [EnterText](https://ui5.sap.com/#/api/sap.ui.test.actions.EnterText)

```javascript
const control = await browser.asControl(inputSelector)
Expand Down