Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 6523017

Browse files
author
Dmitry Shevtsov
committed
added final review edits
1 parent 036b81c commit 6523017

File tree

9 files changed

+24
-24
lines changed

9 files changed

+24
-24
lines changed

_includes/mtf/block_attributes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ See the `block` node attributes details in the following table:
66
|---|---|---|---|---|
77
|`name`| Name of the block| Required|Unique in the page. The method to get the block class instance is generated using this value.|`widgetGrid`|
88
|`class`| Full name of the block class |Required| Class name |`Magento\Widget\Test\Block\Adminhtml\Widget\WidgetGrid` |
9-
|`locator`| CSS selector or XPath locator of the block.|Required|[CSS Selectors](http://www.w3.org/TR/selectors/), <a href="http://www.w3.org/TR/xpath-31/">XPath</a>|CSS: `#widgetInstanceGrid`, XPath: `//*[@id="widgetInstanceGrid"`]|
9+
|`locator`| CSS selector or XPath locator of the block|Required|[CSS Selectors](http://www.w3.org/TR/selectors/), <a href="http://www.w3.org/TR/xpath-31/">XPath</a>|CSS: `#widgetInstanceGrid`, XPath: `//*[@id="widgetInstanceGrid"]`|
1010
|`strategy` |Selector strategy| Required|`css selector` or `xpath`| `css selector`|
1111

1212
</div>

_includes/mtf/page-generator.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<p>To apply all changes you've made to the page (XML file), run the page generator.</p>
2-
<pre><code>php magento2/dev/tests/functional/utils/page.php</code></pre>
3-
<p>The page will be updated in the <code>magento2/dev/tests/functional/generated</code> directory.</p>
2+
<pre><code>php &lt;magento2&gt;/dev/tests/functional/utils/page.php</code></pre>
3+
<p>The page will be updated in the <code>&lt;magento2&gt;/dev/tests/functional/generated</code> directory.</p>

guides/v2.0/mtf/mtf_entities/mtf_block.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ To enable this feature follow:
5252

5353
1. Log in to Magento Admin as administrator
5454
1. Follow **STORES > Configuration**
55-
1. Change **Store View** to **Main Website** (the Template Path and Block name will only appear for current website)
55+
1. Change **Store View** to **Main Website** (the template path and block name will only appear for current website)
5656
1. Follow **ADVANCED > Developer**
5757
1. Expand the **Debug** tab
5858
1. Set **Template Path Hints** to **Yes**
@@ -235,7 +235,7 @@ See a description of the nodes in the following table.
235235

236236
<table><tbody>
237237
<tr><th>Node </th><th>Description </th><th>Value from example</th></tr>
238-
<tr><td><code>mapping</code> </td><td>Root node with a <code>strict</code> attribute. If <code>strict</code> equals 0, then all the fixture field data must be entered in the block form. If <code>strict</code> equals 1, then only the mapping file fields data must be entered in the block form. </td><td><code>"1"</code>. *only* the *mapping* file fields data *must* be entered in the block form.</td></tr>
238+
<tr><td><code>mapping</code> </td><td>Root node with a <code>strict</code> attribute. If <code>strict</code> equals <code>0</code>, then all the fixture field data must be entered in the block form. If <code>strict</code> equals <code>1</code>, then only the mapping file fields data must be entered in the block form. </td><td><code>"1"</code>. <i>Only</i> the <i>mapping</i> file fields data <i>must</i> be entered in the block form.</td></tr>
239239
<tr><td><code>wrapper</code> </td><td>Automatically adds <code>group_name</code> to the selector of the field, when <code>selector</code> has not been specified. </td><td><code>login</code></td></tr>
240240
<tr><td><code>fields</code> </td><td>The node containing mapping fields. </td><td><code>&lt;email&gt;</code>, <code>&lt;password /&gt;</code>.</td></tr>
241241
<tr><td><code>selector</code> </td><td>Value for the selector that is used to find the field. Default: <code>[name='group_name[field_node_name]']</code>. Default value is assigned automatically if the node is absent in the field. </td><td>For the <code>&lt;email&gt;</code>, the <code>[name='login[username]']</code>.<br/> For the <code>&lt;password /&gt;</code>, the <code>[name='login[password]']</code> that is the default value where <code>wrapper="login"</code>.</td></tr>
@@ -323,7 +323,7 @@ See the following table to understand the node's purpose.
323323
<tr><td><code>class</code> </td><td>Reference to the class that handles tab’s behavior.</td></tr>
324324
<tr><td><code>selector</code> </td><td>Identifier for the selector of the tab in the HTML code, used to open the tab.</td></tr>
325325
<tr><td><code>strategy</code> </td><td>Strategy of the selector. Can be <code>css selector</code> or <code>xpath</code>.</td></tr>
326-
<tr><td><code>fields</code> </td><td>List of fields with parameters, that are the same as in the [form mapping](#mtf_block_form_xml_nodes). Also field in tab can include more then one field, in this case add <code>field</code> attribute <code>composite="1"</code>.</td></tr>
326+
<tr><td><code>fields</code> </td><td>List of fields with parameters, that are the same as in the <a href="#mtf_block_form_xml_nodes">form mapping</a>. Also field in tab can include more then one field, in this case add <code>field</code> attribute <code>composite="1"</code>.</td></tr>
327327
</tbody>
328328
</table>
329329

@@ -432,7 +432,7 @@ Let's create render for the bundle product.
432432
Details:
433433

434434
* The PHP class for the page will be generated in the Magento_Catalog module, because we did not mention module attribute in the `page` node
435-
* In the viewBlock `block`, we indicate `name` attribute only
435+
* In the `block`, we indicate `name` attribute only
436436

437437
**Step 4**. Run the page generator
438438

guides/v2.0/mtf/mtf_entities/mtf_fixture-repo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ As you can see, the `ConfigData.xml` of the `Authorizenet` module and the `Confi
433433

434434
To run the generator, enter the following command in your terminal:
435435

436-
php magento2/dev/tests/functional/utils/generate.php
436+
php <magento2>/dev/tests/functional/utils/generate.php
437437

438438
The preceding is an example of repository merging. Using the approach from the example you can merge repositories for any other fixture, not `Config` only.
439439

guides/v2.0/mtf/mtf_entities/mtf_fixture.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ In this chapter we will create a new fixture and modify it, considering differen
3232

3333
To apply any changes of the fixture, you should run generate tool:
3434

35-
cd magento2/dev/tests/functional/utils
35+
cd <magento2>/dev/tests/functional/utils
3636
php generate.php
3737

3838
This tool creates PHP classes that are used by the test.
@@ -45,7 +45,7 @@ Let's imagine that we want to create new fixture to test our Widget module.
4545

4646
Magento has a tool that automatically generates your fixture with parameters you indicated in arguments. That is `generateFixtureXml.php,` located in `<magento2>/dev/tests/functional/utils`.
4747

48-
cd magento2/dev/tests/functional/utils
48+
cd <magento2>/dev/tests/functional/utils
4949
php -f generateFixtureXml.php -- --name widget --entity_type widget_instance --collection Magento\\Widget\\Model\\Resource\\Widget\\Instance\\Collection
5050

5151
<div class="bs-callout bs-callout-info" id="info">
@@ -103,7 +103,7 @@ Following is the generated Widget fixture located in `<magento2>/dev/tests/funct
103103

104104
To generate PHP classes, enter the following commands in the order shown:
105105

106-
cd magento2/dev/tests/functional/utils
106+
cd <magento2>/dev/tests/functional/utils
107107
php generate.php
108108

109109
That's it!
@@ -193,7 +193,7 @@ Let's manually add a new field and `group` attribute to the `Widget.xml`. See wh
193193

194194
To apply the changes, enter the following commands:
195195

196-
cd magento2/dev/tests/functional/utils
196+
cd <magento2>/dev/tests/functional/utils
197197
php generate.php
198198

199199
## Add a repository to the fixture field {#mtf_fixture_repositoy}
@@ -247,7 +247,7 @@ Following is the code of `LayoutUpdates.xml`. It specifies two datasets that you
247247

248248
To apply the changes, enter the following commands:
249249

250-
cd magento2/dev/tests/functional/utils
250+
cd <magento2>/dev/tests/functional/utils
251251
php generate.php
252252

253253
## Add the data source to the fixture field {#mtf_fixture_source}
@@ -278,7 +278,7 @@ Let's see our data source file `<magento2>/dev/tests/functional/tests/app/Magent
278278

279279
To apply the changes, enter the following commands:
280280

281-
cd magento2/dev/tests/functional/utils
281+
cd <magento2>/dev/tests/functional/utils
282282
php generate.php
283283

284284
<div class="bs-callout bs-callout-warning">
@@ -314,7 +314,7 @@ We can create file that adds field `new_field` to our widget fixture.
314314

315315
To apply the changes, enter the following commands:
316316

317-
cd magento2/dev/tests/functional/utils
317+
cd <magento2>/dev/tests/functional/utils
318318
php generate.php
319319

320320
`new_field` has been added in fixture `Widget.php`.
@@ -351,6 +351,6 @@ In this example you will create a new fixture PHP class AdWidget that extends Wi
351351

352352
To generate your new fixture PHP class, enter the following commands:
353353

354-
cd magento2/dev/tests/functional/utils
354+
cd <magento2>/dev/tests/functional/utils
355355
php generate.php
356356

guides/v2.0/mtf/mtf_entities/mtf_page.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The following table explains `<page>` attributes.
7575
|`name`|Name of the page PHP class, that will be generated in `<magento2>/dev/tests/functional/generated/Magento/<module>/Page/<area>/<name>.php`.|`WidgetInstanceIndex` |
7676
|`area`|The page usage area. Determines a [type of the page](#mtf_page_types). The directory with the name assigned to `area` will be created in the module. Value can be `Adminhtml` for the Admin area, or any other for another area.|`Adminhtml`. The page class will be generated in the `<magento2>/dev/tests/functional/generated/Magento/Widget/Page/Adminhtml`. |
7777
|`mca`{:#mca}|Path following the base URL for the Magento pages (storefront or Admin), or full URL for other pages. MCA is an abbreviation of the Module Controller Action.|`admin/widget_instance/index`. Considering that `area="Adminhtml"`, the Magento page under test is `http://example.com/admin/admin/widget_instance/index`|
78-
|`module`|Module where the page will be generated |`Magento_Widget`. The page will be generated in the `<magento2>/dev/tests/functional/Magento/Widget/Page`|
78+
|`module`|Module where the page will be generated. |`Magento_Widget`. The page will be generated in the `<magento2>/dev/tests/functional/Magento/Widget/Page`|
7979

8080
{% include mtf/block_attributes.md %}
8181

@@ -99,13 +99,13 @@ The page will be opened as a concatenation of `app_backend_url` from `<magento2>
9999

100100
### Storefront page {#mtf_page_storefront}
101101

102-
Storefront page is recognizable by `area` assigned any value except `Adminhtml` *and* `mca` doesn't have `http`. This type of page extends the [Mtf\Page\FrontendPage][] class.
102+
Storefront page is recognizable by `area` assigned any value except `Adminhtml`, *and* `mca` doesn't have `http`. This type of page extends the [Mtf\Page\FrontendPage][] class.
103103

104104
The page will be opened as concatenation of `app_frontend_url` from `magento2/dev/tests/functional/phpunit.xml` and [mca](#mca) link.
105105

106106
### External page {#mtf_page_extern}
107107

108-
External page has `area` assigned any value except `Adminhtml` AND `mca` containing `http`. The generated page extends [Magento\Mtf\Page\ExternalPage][] class.
108+
External page has `area` assigned any value except `Adminhtml`, *and* `mca` containing `http`. The generated page extends [Magento\Mtf\Page\ExternalPage][] class.
109109

110110
The page will be opened using [mca](#mca) link.
111111

@@ -168,7 +168,7 @@ We should create `dev/tests/functional/tests/app/Magento/Review/Test/Page/Produc
168168

169169
And generate the updated page:
170170

171-
php magento2/dev/tests/functional/utils/generate/page.php
171+
php <magento2>/dev/tests/functional/utils/generate/page.php
172172

173173
The result is in the `<magento2>/dev/tests/functional/generated/Magento/Catalog/Test/Page/Product/CatalogProductView.php` with the following code:
174174

guides/v2.0/mtf/mtf_installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The Magento Testing Framework requires Composer, which downloads libraries defin
5959
1. <a href="{{ site.gdeurl }}install-gde/basics/basics_login.html">Open a command prompt</a>.
6060
1. Log in to your Magento server as a user with permissions to modify the Magento file system. (This is typically <a href="{{ site.gdeurl }}install-gde/prereq/apache-user.html">the Magento file system owner</a>.)
6161

62-
cd magento2/dev/tests/functional/
62+
cd <magento2>/dev/tests/functional/
6363
composer install
6464

6565
<div class="bs-callout bs-callout-info" id="info">
@@ -76,7 +76,7 @@ And run from this directory <code>php composer.phar install</code>.</p>
7676

7777
Check whether the `vendor` directory exists in `<magento2>/dev/tests/functional/`.
7878

79-
cd magento2/dev/tests/functional/
79+
cd <magento2>/dev/tests/functional/
8080
ls
8181

8282
Find the `mtf` directory.

guides/v2.0/mtf/mtf_quickstart/mtf_quickstart_environmemt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Generator generates fixtures, repositories and page objects. Once MTF is initial
4646

4747
Enter in terminal:
4848

49-
cd magento2/dev/tests/functional/utils
49+
cd <magento2>/dev/tests/functional/utils
5050
php generate.php
5151

5252
<h2 id="mtf_install_pre">Next Steps</h2>

guides/v2.0/mtf/mtf_update.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ Step 3. <a href="{{ site.gdeurl }}mtf/mtf_installation.html#mtf_install_perfo
4343

4444
Enter in terminal:
4545

46-
cd magento2/dev/tests/functional/
46+
cd <magento2>/dev/tests/functional/
4747
composer update

0 commit comments

Comments
 (0)