Skip to content

Commit

Permalink
ENGCOM-3910: Order shipping method bug #20381
Browse files Browse the repository at this point in the history
 - Merge Pull Request #20381 from maheshWebkul721/magento2:order-shipping-method-bug
 - Merged commits:
   1. 82b1707
   2. ccd3014
   3. 36cab08
  • Loading branch information
magento-engcom-team committed Feb 7, 2019
2 parents 79a20f5 + 36cab08 commit 6b01abb
Show file tree
Hide file tree
Showing 719 changed files with 13,176 additions and 3,031 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?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="SetAdminAccountActionGroup">
<arguments>
<argument name="InterfaceLocaleByValue" type="string"/>
</arguments>
<!-- Navigate to admin System Account Page-->
<amOnPage url="{{AdminSystemAccountPage.url}}" stepKey="openAdminSystemAccountPage" />
<waitForPageLoad stepKey="loadAdminSystemAccountPage"/>
<!-- Change Admin locale to Français (France) / French (France) -->
<selectOption userInput="{{InterfaceLocaleByValue}}" selector="{{AdminSystemAccountSection.interfaceLocale}}" stepKey="setInterfaceLocate"/>
<fillField selector="{{AdminSystemAccountSection.currentPassword}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}" stepKey="fillPassword"/>
<click selector="{{AdminCustomerMainActionsSection.saveButton}}" stepKey="clickSave"/>
<waitForElement selector="{{AdminCustomerMessagesSection.successMessage}}" stepKey="waitSuccessMessage"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-->

<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
<page name="AdminDashboardPage" url="admin/dashboard/" area="admin" module="Magento_Backend">
<section name="AdminMenuSection"/>
</page>
Expand Down
14 changes: 14 additions & 0 deletions app/code/Magento/Backend/Test/Mftf/Page/AdminSystemAccountPage.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
<page name="AdminSystemAccountPage" url="admin/system_account/index/" area="admin" module="Magento_Backend">
<section name="AdminSystemAccountSection"/>
</page>
</pages>
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
<element name="save" type="button" selector="#save" timeout="30"/>
<element name="saveAndContinue" type="button" selector="button[id*=save_and_continue]" timeout="30"/>
<element name="delete" type="button" selector="#delete" timeout="30"/>
<element name="add" type="button" selector="#add" timeout="30"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@
<element name="widgets" type="button" selector="#nav li[data-ui-id='menu-magento-widget-cms-widget-instance']"/>
<element name="stores" type="button" selector="#menu-magento-backend-stores"/>
<element name="configuration" type="button" selector="#nav li[data-ui-id='menu-magento-config-system-config']"/>
<element name="dashboard" type="button" selector="//li[@id='menu-magento-backend-dashboard']"/>
<element name="sales" type="button" selector="//li[@id='menu-magento-sales-sales']"/>
<element name="marketing" type="button" selector="//li[@id='menu-magento-backend-marketing']"/>
<element name="system" type="button" selector="//li[@id='menu-magento-backend-system']"/>
<element name="findPartners" type="button" selector="//li[@id='menu-magento-marketplace-partners']"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="StorefrontHeaderSection">
<section name="AdminSystemAccountSection">
<element name="interfaceLocale" type="text" selector="#interface_locale"/>
<element name="currentPassword" type="text" selector="#current_password"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
<section name="LocaleOptionsSection">
<element name="sectionHeader" type="text" selector="#general_locale-head"/>
<element name="timezone" type="select" selector="#general_locale_timezone"/>
<element name="useDefault" type="checkbox" selector="#general_locale_timezone_inherit"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?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="AdminAttributeTextSwatchesCanBeFiledTest">
<annotations>
<features value="Backend"/>
<stories value="Unable to add more attributes in size"/>
<title value="Check that attribute text swatches can be filed"/>
<description value="Check that attribute text swatches can be filed"/>
<severity value="MAJOR"/>
<testCaseId value="MAGETWO-96710"/>
<useCaseId value="MAGETWO-96409"/>
<group value="backend"/>
<group value="ui"/>
</annotations>
<before>

<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>

</before>
<after>
<!-- Delete all 10 store views -->
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView1">
<argument name="customStore" value="customStore"/>
</actionGroup>
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView2">
<argument name="customStore" value="NewStoreViewData"/>
</actionGroup>
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView3">
<argument name="customStore" value="storeViewData"/>
</actionGroup>
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView4">
<argument name="customStore" value="storeViewData1"/>
</actionGroup>
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView5">
<argument name="customStore" value="storeViewData2"/>
</actionGroup>
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView6">
<argument name="customStore" value="storeViewData3"/>
</actionGroup>
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView7">
<argument name="customStore" value="storeViewData4"/>
</actionGroup>
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView8">
<argument name="customStore" value="storeViewData5"/>
</actionGroup>
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView9">
<argument name="customStore" value="storeViewData6"/>
</actionGroup>
<actionGroup ref="AdminDeleteStoreViewActionGroup" stepKey="deleteStoreView10">
<argument name="customStore" value="storeViewData7"/>
</actionGroup>

<actionGroup ref="logout" stepKey="logout"/>
</after>

<!-- Create 10 store views -->
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView1">
<argument name="customStore" value="customStore"/>
</actionGroup>
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView2">
<argument name="customStore" value="NewStoreViewData"/>
</actionGroup>
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView3">
<argument name="customStore" value="storeViewData"/>
</actionGroup>
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView4">
<argument name="customStore" value="storeViewData1"/>
</actionGroup>
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView5">
<argument name="customStore" value="storeViewData2"/>
</actionGroup>
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView6">
<argument name="customStore" value="storeViewData3"/>
</actionGroup>
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView7">
<argument name="customStore" value="storeViewData4"/>
</actionGroup>
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView8">
<argument name="customStore" value="storeViewData5"/>
</actionGroup>
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView9">
<argument name="customStore" value="storeViewData6"/>
</actionGroup>
<actionGroup ref="AdminCreateStoreViewActionGroup" stepKey="createStoreView10">
<argument name="customStore" value="storeViewData7"/>
</actionGroup>

<!--Navigate to Product attribute page-->
<amOnPage url="{{ProductAttributePage.url}}" stepKey="navigateToNewProductAttributePage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<fillField userInput="test_label" selector="{{AttributePropertiesSection.DefaultLabel}}" stepKey="fillDefaultLabel"/>
<selectOption selector="{{AttributePropertiesSection.InputType}}" userInput="Text Swatch" stepKey="selectInputType"/>
<click selector="{{AttributePropertiesSection.addSwatch}}" stepKey="clickAddSwatch"/>
<waitForAjaxLoad stepKey="waitForAjaxLoad"/>

<!-- Fill Swatch and Description fields for Admin -->
<fillField selector="{{AttributeManageSwatchSection.swatchField('Admin')}}" userInput="test" stepKey="fillSwatchForAdmin"/>
<fillField selector="{{AttributeManageSwatchSection.descriptionField('Admin')}}" userInput="test" stepKey="fillDescriptionForAdmin"/>

<!-- Grab value Swatch and Description fields for Admin -->
<grabValueFrom selector="{{AttributeManageSwatchSection.swatchField('Admin')}}" stepKey="grabSwatchForAdmin"/>
<grabValueFrom selector="{{AttributeManageSwatchSection.descriptionField('Admin')}}" stepKey="grabDescriptionForAdmin"/>

<!-- Check that Swatch and Description fields for Admin are not empty-->
<assertNotEmpty actual="$grabSwatchForAdmin" stepKey="checkSwatchFieldForAdmin"/>
<assertNotEmpty actual="$grabDescriptionForAdmin" stepKey="checkDescriptionFieldForAdmin"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<?php $_tabType = (!preg_match('/\s?ajax\s?/', $_tabClass) && $block->getTabUrl($_tab) != '#') ? 'link' : '' ?>
<?php $_tabHref = $block->getTabUrl($_tab) == '#' ? '#' . $block->getTabId($_tab) . '_content' : $block->getTabUrl($_tab) ?>
<li>
<a href="<?= /* @escapeNotVerified */ $_tabHref ?>" id="<?= /* @escapeNotVerified */ $block->getTabId($_tab) ?>" title="<?= /* @escapeNotVerified */ $block->getTabTitle($_tab) ?>" class="<?php $_tabClass ?>" data-tab-type="<?php $_tabType ?>">
<a href="<?= $block->escapeHtmlAttr($_tabHref) ?>" id="<?= $block->escapeHtmlAttr($block->getTabId($_tab)) ?>" title="<?= $block->escapeHtmlAttr($block->getTabTitle($_tab)) ?>" class="<?= $block->escapeHtmlAttr($_tabClass) ?>" data-tab-type="<?= $block->escapeHtmlAttr($_tabType) ?>">
<span>
<span class="changed" title="<?= /* @escapeNotVerified */ __('The information in this tab has been changed.') ?>"></span>
<span class="error" title="<?= /* @escapeNotVerified */ __('This tab contains invalid data. Please resolve this before saving.') ?>"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminOrderBraintreeFillActionGroup">
<!--Select Braintree Payment method on Admin Order Create Page-->
<click stepKey="chooseBraintree" selector="{{NewOrderSection.creditCardBraintree}}"/>
Expand Down Expand Up @@ -39,4 +39,4 @@
<wait stepKey="waitForFillCVV" time="1"/>
<switchToIFrame stepKey="switchBackFromCVV"/>
</actionGroup>
</actionGroups>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="GoToUserRoles">
<click selector="#menu-magento-backend-system" stepKey="clickOnSystemIcon"/>
<waitForPageLoad stepKey="waitForSystemsPageToOpen"/>
Expand All @@ -15,24 +16,24 @@
</actionGroup>

<!--Create new role-->
<actionGroup name="AdminCreateRole">
<actionGroup name="AdminCreateNewRole">
<arguments>
<argument name="role" type="string" defaultValue=""/>
<argument name="resource" type="string" defaultValue="All"/>
<argument name="scope" type="string" defaultValue="Custom"/>
<argument name="websites" type="string" defaultValue="Main Website"/>
</arguments>
<click selector="{{AdminCreateRoleSection.create}}" stepKey="clickToAddNewRole"/>
<fillField selector="{{AdminCreateRoleSection.name}}" userInput="{{role.name}}" stepKey="setRoleName"/>
<fillField stepKey="setPassword" selector="{{AdminCreateRoleSection.password}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
<click selector="{{AdminCreateRoleSection.roleResources}}" stepKey="clickToOpenRoleResources"/>
<waitForPageLoad stepKey="waitForRoleResourcePage" time="5"/>
<click selector="{{AdminCreateRoleSection.roleScope}}" stepKey="clickToExpandScopeAccess"/>
<click selector="{{AdminCreateRoleSection.scopeValue(resource)}}" stepKey="clickToSelectScopeAccess"/>
<click stepKey="checkSales" selector="//a[text()='Sales']"/>
<click selector="{{AdminCreateRoleSection.save}}" stepKey="clickToSaveRole"/>
<waitForPageLoad stepKey="waitForPageLoad" time="10"/>
<see userInput="You saved the role." stepKey="seeSuccessMessage" />
</actionGroup>


<!--Delete role-->
<actionGroup name="AdminDeleteRoleActionGroup">
<arguments>
Expand All @@ -46,4 +47,4 @@
<waitForPageLoad stepKey="waitForPageLoad" time="10"/>
<see stepKey="seeSuccessMessage" userInput="You deleted the role."/>
</actionGroup>
</actionGroups>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<!--Go to all users-->
<actionGroup name="GoToAllUsers">
<click selector="{{AdminCreateUserSection.system}}" stepKey="clickOnSystemIcon"/>
Expand Down Expand Up @@ -39,11 +39,10 @@
<see userInput="You saved the user." stepKey="seeSuccessMessage" />
</actionGroup>


<!--Delete User-->
<actionGroup name="AdminDeleteUserActionGroup">
<actionGroup name="AdminDeleteNewUserActionGroup">

<click stepKey="clickOnUser" selector="{{AdminDeleteUserSection.theUser}}"/>
<waitForPageLoad stepKey="waitForUserPageToLoad"/>
<fillField stepKey="TypeCurrentPassword" selector="{{AdminDeleteUserSection.password}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}"/>
<scrollToTopOfPage stepKey="scrollToTop"/>
<click stepKey="clickToDeleteUser" selector="{{AdminDeleteUserSection.delete}}"/>
Expand All @@ -52,4 +51,5 @@
<waitForPageLoad stepKey="waitForPageLoad" time="10"/>
<see userInput="You deleted the user." stepKey="seeSuccessMessage" />
</actionGroup>

</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<!-- GoTo ConfigureBraintree fields -->
<click stepKey="clickOnSTORES" selector="{{AdminMenuSection.stores}}"/>
<waitForPageLoad stepKey="waitForConfiguration" time="2"/>
<click stepKey="clickOnConfigurations" selector="{{StoresSubmenuSection.configuration}}" />
<click stepKey="clickOnConfigurations" selector="{{AdminMenuSection.configuration}}" />
<waitForPageLoad stepKey="waitForSales" time="2"/>
<click stepKey="clickOnSales" selector="{{ConfigurationListSection.sales}}" />
<waitForPageLoad stepKey="waitForPaymentMethods" time="2"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,27 @@
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="StorefrontFillCartDataActionGroup">
<arguments>
<argument name="cartData" defaultValue="PaymentAndShippingInfo"/>
</arguments>
<switchToIFrame selector="{{BraintreeConfigurationPaymentSection.cartFrame}}" stepKey="switchToIframe"/>
<waitForElementVisible selector="{{BraintreeConfigurationPaymentSection.cartCode}}" stepKey="waitCartCodeElement"/>
<fillField selector="{{BraintreeConfigurationPaymentSection.cartCode}}" userInput="{{cartData.cardNumber}}" stepKey="setCartCode"/>
<switchToIFrame stepKey="switchBack"/>
<switchToIFrame selector="{{BraintreeConfigurationPaymentSection.monthFrame}}" stepKey="switchToIframe1"/>
<waitForElementVisible selector="{{BraintreeConfigurationPaymentSection.month}}" stepKey="waitMonthElement"/>
<fillField selector="{{BraintreeConfigurationPaymentSection.month}}" userInput="{{cartData.month}}" stepKey="setMonth"/>
<switchToIFrame stepKey="switchBack1"/>
<switchToIFrame selector="{{BraintreeConfigurationPaymentSection.yearFrame}}" stepKey="switchToIframe2"/>
<waitForElementVisible selector="{{BraintreeConfigurationPaymentSection.year}}" stepKey="waitYearElement"/>
<fillField selector="{{BraintreeConfigurationPaymentSection.year}}" userInput="{{cartData.year}}" stepKey="setYear"/>
<switchToIFrame stepKey="switchBack2"/>
<switchToIFrame selector="{{BraintreeConfigurationPaymentSection.codeFrame}}" stepKey="switchToIframe3"/>
<waitForElementVisible selector="{{BraintreeConfigurationPaymentSection.verificationNumber}}" stepKey="waitVerificationNumber"/>
<fillField selector="{{BraintreeConfigurationPaymentSection.verificationNumber}}" userInput="{{cartData.cvv}}" stepKey="setVerificationNumber"/>
<switchToIFrame stepKey="SwitchBackToWindow"/>

</actionGroup>

</actionGroups>
Loading

0 comments on commit 6b01abb

Please sign in to comment.