Skip to content

Fixes a code example on the Actions page. #582

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

Merged
merged 6 commits into from
Feb 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 22 additions & 23 deletions docs/test/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ This step can be referenced within the test using `conditionalClickStep1`.

The value format should met the following principles:

* Must be unique within [`<test>`](../test.md#test-tag).
* Naming should be as descriptive as possible:
* Describe the action performed.
* Briefly describe the purpose.
* Describe which data is in use.
* Should be in camelCase with lowercase first letter.
* Should be the last attribute of an element.
* Must be unique within [`<test>`](../test.md#test-tag).
* Naming should be as descriptive as possible:
* Describe the action performed.
* Briefly describe the purpose.
* Describe which data is in use.
* Should be in camelCase with lowercase first letter.
* Should be the last attribute of an element.

### `before` and `after`

Expand Down Expand Up @@ -142,25 +142,25 @@ Here, [`<click>`](#click) performs a click on a button that can be found by the

The following test actions return a variable:

* [grabAttributeFrom](#grabattributefrom)
* [grabCookie](#grabcookie)
* [grabFromCurrentUrl](#grabfromcurrenturl)
* [grabMultiple](#grabmultiple)
* [grabPageSource](#grabpagesource)
* [grabTextFrom](#grabtextfrom)
* [grabValueFrom](#grabvaluefrom)
* [executeJS](#executejs)
* [grabAttributeFrom](#grabattributefrom)
* [grabCookie](#grabcookie)
* [grabFromCurrentUrl](#grabfromcurrenturl)
* [grabMultiple](#grabmultiple)
* [grabPageSource](#grabpagesource)
* [grabTextFrom](#grabtextfrom)
* [grabValueFrom](#grabvaluefrom)
* [executeJS](#executejs)

Learn more in [Using data returned by test actions](../data.md#use-data-returned-by-test-actions).

## Actions handling data entities

The following test actions handle data entities using [metadata](../metadata.md):

* [createData](#createdata)
* [deleteData](#deletedata)
* [updateData](#updatedata)
* [getData](#getdata)
* [createData](#createdata)
* [deleteData](#deletedata)
* [updateData](#updatedata)
* [getData](#getdata)

Learn more in [Handling a REST API response](../metadata.md#rest-response).

Expand Down Expand Up @@ -1287,7 +1287,6 @@ Attribute|Type|Use|Description
`before`|string|optional| `stepKey` of action that must be executed next.
`after`|string|optional| `stepKey` of preceding action.


#### Example
```xml
<magentoCron stepKey="runStagingCronJobs" groups="staging"/>
Expand Down Expand Up @@ -1974,13 +1973,13 @@ Attribute|Type|Use|Description
#### Examples

```xml
<!-- Verify there are 10 `<div id="product" ... >...</div>` elements on the page. -->
<!-- Verify there are 10 `<div class="product" ... >...</div>` elements on the page. -->
<seeNumberOfElements userInput="10" selector="div.product" stepKey="seeTenProducts"/>
```

```xml
<!-- Verify there are between 5 and 10 `<div id="product" ... >...</div>` elements on the page. -->
<seeNumberOfElements userInput="[5, 10]" selector=".product" stepKey="seeFiveToTenProducts"/>
<!-- Verify there are between 5 and 10 `<div class="product" ... >...</div>` elements on the page. -->
<seeNumberOfElements parameterArray="[5, 10]" selector="div.product" stepKey="seeFiveToTenProducts"/>
```

### seeOptionIsSelected
Expand Down