Skip to content
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<!--Create New Template -->
<actionGroup name="AdminClickSaveRatingButtonActionGroup">
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSaveRatingButton"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<!--Create New Template -->
<actionGroup name="AdminFillNewRatingAttributeFormActionGroup">
<arguments>
<argument name="default_Value" type="string"/>
<argument name="store" type="string"/>
</arguments>

<fillField selector="{{AdminEditAndNewRatingSection.defaultValue}}" userInput="{{default_Value}}" stepKey="fillDefaultValueField"/>
<selectOption selector="{{AdminEditAndNewRatingSection.visibility}}" userInput="{{store}}" stepKey="selectStoreView"/>
<checkOption selector="{{AdminEditAndNewRatingSection.isActive}}" stepKey="checkIsActiveOption"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminRatingDeleteAttributeActionGroup">
<click stepKey="clickDeleteButton" selector="{{AdminMainActionsSection.delete}}"/>
<click stepKey="confirmDelete" selector="{{AdminMainActionsSection.confirmDelete}}"/>
<waitForPageLoad stepKey="waitForPageLoading"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminRatingOpenRatingAttributeFromGridActionGroup">
<click stepKey="openRatingAttribute" selector="{{AdminRatingGridSection.searchResultFirstRow}}"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminSearchRatingAttributeOnGridActionGroup">
<arguments>
<argument name="rating" type="string"/>
</arguments>
<click selector="{{AdminRatingGridSection.reset}}" stepKey="resetFilter"/>
<fillField userInput="{{rating}}" selector="{{AdminRatingGridSection.ratingCode}}" stepKey="filterName"/>
<click stepKey="clickSearchButton" selector="{{AdminRatingGridSection.search}}"/>
<waitForPageLoad stepKey="waitForPageLoading"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AssertAdminRatingAttributeInGridActionGroup">
<arguments>
<argument name="rating" type="string"/>
</arguments>

<see userInput="{{rating}}" selector="{{AdminRatingGridSection.ratingGrid}}" stepKey="assertRatingAttribute"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
<section name="AdminEditAndNewRatingSection">
<element name="defaultStoreViewTitleLabel" type="text" selector=".field-rating_code_1 label"/>
<element name="defaultStoreViewTitleInput" type="input" selector=".field-rating_code_1 input"/>
<element name="defaultValue" type="input" selector=".admin__field-control.control #rating_code"/>
<element name="visibility" type="select" selector=".admin__field.field.field-stores #stores"/>
<element name="isActive" type="input" selector="#is_active"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminRatingGridSection">
<element name="ratingCode" type="input" selector="#ratingsGrid_filter_rating_code"/>
<element name="reset" type="button" selector=".action-default.scalable.action-reset.action-tertiary"/>
<element name="search" type="button" selector=".action-default.scalable.action-secondary"/>
<element name="ratingGrid" type="text" selector="table.data-grid"/>
<element name="searchResultFirstRow" type="text" selector=".data-grid>tbody>tr"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminRatingsAddNewRatingAttributeTest">
<annotations>
<features value="Review"/>
<stories value="Rating Attributes"/>
<title value="Adding new rating attribute"/>
<description value="Admin should be able add new rating attribute"/>
<severity value="MINOR"/>
<group value="review"/>
</annotations>
<before>
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
</before>
<after>
<actionGroup ref="AdminRatingOpenRatingAttributeFromGridActionGroup" stepKey="openAttribute"/>
<actionGroup ref="AdminRatingDeleteAttributeActionGroup" stepKey="deleteCreatedRatingAttribute"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
<actionGroup ref="AdminNavigateToNewRatingFormActionGroup" stepKey="navigateToNewRatingPage"/>
<actionGroup ref="AdminFillNewRatingAttributeFormActionGroup" stepKey="fillRatingForm">
<argument name="default_Value" value="Test Rating"/>
<argument name="store" value="Default Store View"/>
</actionGroup>
<actionGroup ref="AdminClickSaveRatingButtonActionGroup" stepKey="saveRatingAttribute"/>
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="assertSuccessMessage">
<argument name="message" value="You saved the rating."/>
</actionGroup>
<actionGroup ref="AdminSearchRatingAttributeOnGridActionGroup" stepKey="searchCreatedRatingOnGrid">
<argument name="rating" value="Test Rating"/>
</actionGroup>
<actionGroup ref="AssertAdminRatingAttributeInGridActionGroup" stepKey="assertRatingAttributeInGrid">
<argument name="rating" value="Test Rating"/>
</actionGroup>
</test>
</tests>