Skip to content

Mqe 2215: Docs Annual Review Part 2 #760

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 3 commits into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions docs/merge_points/extend-action-groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ In this example we add a `<click>` command to check the checkbox that our extens
<!-- {% raw %} -->

```xml
<actionGroup name="FillAdminSimpleProductForm">
<actionGroup name="AdminFillSimpleProductFormActionGroup">
<arguments>
<argument name="category"/>
<argument name="simpleProduct"/>
Expand All @@ -34,10 +34,10 @@ In this example we add a `<click>` command to check the checkbox that our extens
</actionGroup>
```

## File to merge
## Extend file

```xml
<actionGroup name="FillAdminSimpleProductFormWithMyExtension" extends="FillAdminSimpleProductForm">
<actionGroup name="AdminFillSimpleProductFormWithMyExtensionActionGroup" extends="AdminFillSimpleProductFormActionGroup">
<!-- This will be added after the step "fillQuantity" on line 12 in the above test. -->
<click selector="{{MyExtensionSection.myCheckbox}}" stepKey="clickMyCheckbox" after="fillQuantity"/>
</actionGroup>
Expand All @@ -48,7 +48,7 @@ In this example we add a `<click>` command to check the checkbox that our extens
Note that there are now two action groups below.

```xml
<actionGroup name="FillAdminSimpleProductForm">
<actionGroup name="AdminFillSimpleProductFormActionGroup">
<arguments>
<argument name="category"/>
<argument name="simpleProduct"/>
Expand All @@ -71,7 +71,7 @@ Note that there are now two action groups below.
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSectionAssert"/>
<seeInField userInput="{{simpleProduct.urlKey}}" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="assertFieldUrlKey"/>
</actionGroup>
<actionGroup name="FillAdminSimpleProductFormWithMyExtension">
<actionGroup name="AdminFillSimpleProductFormWithMyExtensionActionGroup">
<arguments>
<argument name="category"/>
<argument name="simpleProduct"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/merge_points/extend-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ In this example we update the quantity to 1001 and add a new piece of data relev
</entity>
```

## File to merge
## Extend file

```xml
<entity name="ExtensionProduct" type="product" extends="SimpleProduct">
Expand Down
14 changes: 7 additions & 7 deletions docs/merge_points/extend-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ In this example, we add an action group to a new copy of the original test for o
<deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/>
</after>

<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/>
<actionGroup ref="FillAdminSimpleProductForm" stepKey="fillProductFieldsInAdmin">
<actionGroup ref="AdminLoginActionGroup" stepKey="AdminLoginActionGroup1"/>
<actionGroup ref="AdminFillSimpleProductFormActionGroup" stepKey="fillProductFieldsInAdmin">
<argument name="category" value="$$createPreReqCategory$$"/>
<argument name="simpleProduct" value="_defaultProduct"/>
</actionGroup>
Expand All @@ -40,7 +40,7 @@ In this example, we add an action group to a new copy of the original test for o
</test>
```

## File to merge
## Extend file

```xml
<test name="AdminCreateSimpleProductExtensionTest" extends="AdminCreateSimpleProductTest">
Expand Down Expand Up @@ -89,8 +89,8 @@ Note that there are now two tests below.
<deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/>
</after>

<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/>
<actionGroup ref="FillAdminSimpleProductForm" stepKey="fillProductFieldsInAdmin">
<actionGroup ref="AdminLoginActionGroup" stepKey="AdminLoginActionGroup1"/>
<actionGroup ref="AdminFillSimpleProductFormActionGroup" stepKey="fillProductFieldsInAdmin">
<argument name="category" value="$$createPreReqCategory$$"/>
<argument name="simpleProduct" value="_defaultProduct"/>
</actionGroup>
Expand Down Expand Up @@ -120,8 +120,8 @@ Note that there are now two tests below.
<deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/>
</after>

<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/>
<actionGroup ref="FillAdminSimpleProductForm" stepKey="fillProductFieldsInAdmin">
<actionGroup ref="AdminLoginActionGroup" stepKey="AdminLoginActionGroup1"/>
<actionGroup ref="AdminFillSimpleProductFormActionGroup" stepKey="fillProductFieldsInAdmin">
<argument name="category" value="$$createPreReqCategory$$"/>
<argument name="simpleProduct" value="_defaultProduct"/>
</actionGroup>
Expand Down
8 changes: 4 additions & 4 deletions docs/merge_points/merge-action-groups.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Merge action groups

An action group is a set of individual actions working together as a group.
These action groups can be shared between tests and they also be modified to your needs.
These action groups can be shared between tests and they also can be modified to your needs.

In this example we add a `<click>` command to check the checkbox that our extension adds to the simple product creation form.

Expand All @@ -10,7 +10,7 @@ In this example we add a `<click>` command to check the checkbox that our extens
<!-- {% raw %} -->

```xml
<actionGroup name="FillAdminSimpleProductForm">
<actionGroup name="AdminFillSimpleProductFormActionGroup">
<arguments>
<argument name="category"/>
<argument name="simpleProduct"/>
Expand Down Expand Up @@ -38,7 +38,7 @@ In this example we add a `<click>` command to check the checkbox that our extens
## File to merge

```xml
<actionGroup name="FillAdminSimpleProductForm">
<actionGroup name="AdminFillSimpleProductFormActionGroup">
<!-- This will be added after the step "fillQuantity" in the above test. -->
<click selector="{{MyExtensionSection.myCheckbox}}" stepKey="clickMyCheckbox" after="fillQuantity"/>
</actionGroup>
Expand All @@ -47,7 +47,7 @@ In this example we add a `<click>` command to check the checkbox that our extens
## Resultant test

```xml
<actionGroup name="FillAdminSimpleProductForm">
<actionGroup name="AdminFillSimpleProductFormActionGroup">
<arguments>
<argument name="category"/>
<argument name="simpleProduct"/>
Expand Down
7 changes: 3 additions & 4 deletions docs/merge_points/merge-sections.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ In this example we add another selector to the section on the products page sect
<!-- {% raw %} -->

```xml
<section name="ProductsPageSection">
<section name="AdminProductsPageSection">
<element name="addProductButton" type="button" selector="//button[@id='add_new_product-button']"/>
<element name="checkboxForProduct" type="button" selector="//*[contains(text(),'{{args}}')]/parent::td/preceding-sibling::td/label[@class='data-grid-checkbox-cell-inner']" parameterized="true"/>
<element name="actions" type="button" selector="//div[@class='col-xs-2']/div[@class='action-select-wrap']/button[@class='action-select']"/>
Expand All @@ -22,7 +22,7 @@ In this example we add another selector to the section on the products page sect
## File to merge

```xml
<section name="ProductsPageSection">
<section name="AdminProductsPageSection">
<!-- myExtensionElement will simply be added to the page -->
<element name="myExtensionElement" type="button" selector="input.myExtension"/>
</section>
Expand All @@ -31,7 +31,7 @@ In this example we add another selector to the section on the products page sect
## Resultant section

```xml
<section name="ProductsPageSection">
<section name="AdminProductsPageSection">
<element name="addProductButton" type="button" selector="//button[@id='add_new_product-button']"/>
<element name="checkboxForProduct" type="button" selector="//*[contains(text(),'{{args}}')]/parent::td/preceding-sibling::td/label[@class='data-grid-checkbox-cell-inner']" parameterized="true"/>
<element name="actions" type="button" selector="//div[@class='col-xs-2']/div[@class='action-select-wrap']/button[@class='action-select']"/>
Expand All @@ -41,7 +41,6 @@ In this example we add another selector to the section on the products page sect
<!-- New element merged -->
<element name="myExtensionElement" type="button" selector="input.myExtension"/>
</section>
</page>
```

<!-- {% endraw %} -->
8 changes: 4 additions & 4 deletions docs/merge_points/merge-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ In this example we add an action group that modifies the original test to intera
<deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/>
</after>

<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/>
<actionGroup ref="FillAdminSimpleProductForm" stepKey="fillProductFieldsInAdmin">
<actionGroup ref="AdminLoginActionGroup" stepKey="adminLoginActionGroup1"/>
<actionGroup ref="AdminFillSimpleProductFormActionGroup" stepKey="fillProductFieldsInAdmin">
<argument name="category" value="$$createPreReqCategory$$"/>
<argument name="simpleProduct" value="_defaultProduct"/>
</actionGroup>
Expand Down Expand Up @@ -77,8 +77,8 @@ In this example we add an action group that modifies the original test to intera
<deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/>
</after>

<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/>
<actionGroup ref="FillAdminSimpleProductForm" stepKey="fillProductFieldsInAdmin">
<actionGroup ref="AdminLoginActionGroup" stepKey="AdminLoginActionGroup1"/>
<actionGroup ref="AdminFillSimpleProductFormActionGroup" stepKey="fillProductFieldsInAdmin">
<argument name="category" value="$$createPreReqCategory$$"/>
<argument name="simpleProduct" value="_defaultProduct"/>
</actionGroup>
Expand Down