-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Missed form validation in Admin Order Address Edit route sales/order/address #20840
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
magento-engcom-team
merged 7 commits into
magento:2.3-develop
from
XxXgeoXxX:2.3-develop#19360
Mar 16, 2019
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
54469ce
magento:magento2 Missed form validation in Admin Order Address Edit r…
XxXgeoXxX 464e981
magento:magento2 Missed form validation in Admin Order Address Edit r…
XxXgeoXxX 7b8e969
magento:magento2 Missed form validation in Admin Order Address Edit r…
XxXgeoXxX fd4ed41
magento:magento2 Missed form validation in Admin Order Address Edit r…
XxXgeoXxX 7d6cca6
magento:magento2 Missed form validation in Admin Order Address Edit r…
XxXgeoXxX 8b99ea2
magento:magento2 Missed form validation in Admin Order Address Edit r…
XxXgeoXxX 5867a48
ENGCOM-4238: MFTF test fix.
p-bystritsky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
...code/Magento/Sales/Test/Mftf/Test/AdminSubmitsOrderWithAndWithoutFieldsValidationTest.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| <?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="AdminSubmitsOrderWithAndWithoutFieldsValidationTest"> | ||
| <annotations> | ||
| <features value="Sales"/> | ||
| <stories value="Create orders"/> | ||
| <title value="Fields validation is required to create an order from Admin Panel"/> | ||
| <description value="Admin should not be able to submit orders without invalid address fields"/> | ||
| <group value="sales"/> | ||
| </annotations> | ||
| <before> | ||
| <createData entity="_defaultCategory" stepKey="createCategory"/> | ||
| <createData entity="_defaultProduct" stepKey="createSimpleProduct"> | ||
| <requiredEntity createDataKey="createCategory"/> | ||
| </createData> | ||
| </before> | ||
| <after> | ||
| <deleteData createDataKey="createSimpleProduct" stepKey="deleteProduct"/> | ||
| <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> | ||
| <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> | ||
| </after> | ||
| <!--Create order via Admin--> | ||
| <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
| <comment userInput="Admin creates order" stepKey="adminCreateOrderComment"/> | ||
| <!--<actionGroup ref="navigateToNewOrderPageNewCustomer" stepKey="navigateToNewOrderPage"/>--> | ||
| <amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderIndexPage"/> | ||
| <waitForPageLoad stepKey="waitForIndexPageLoad"/> | ||
| <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Orders" stepKey="seeIndexPageTitle"/> | ||
| <click selector="{{AdminOrdersGridSection.createNewOrder}}" stepKey="clickCreateNewOrder"/> | ||
| <click selector="{{AdminOrderFormActionSection.CreateNewCustomer}}" stepKey="clickCreateCustomer"/> | ||
| <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Create New Order" stepKey="seeNewOrderPageTitle"/> | ||
|
|
||
| <!--Check if order can be submitted without the required fields including email address--> | ||
| <actionGroup ref="checkRequiredFieldsNewOrderForm" stepKey="checkRequiredFieldsNewOrder" after="seeNewOrderPageTitle"/> | ||
| <scrollToTopOfPage stepKey="scrollToTopOfOrderFormPage" after="checkRequiredFieldsNewOrder"/> | ||
| <actionGroup ref="addSimpleProductToOrder" stepKey="addSimpleProductToOrder" after="scrollToTopOfOrderFormPage"> | ||
| <argument name="product" value="_defaultProduct"/> | ||
| </actionGroup> | ||
|
|
||
| <!--Fill customer group and customer email--> | ||
| <selectOption selector="{{AdminOrderFormAccountSection.group}}" userInput="{{GeneralCustomerGroup.code}}" stepKey="selectCustomerGroup" after="addSimpleProductToOrder"/> | ||
| <fillField selector="{{AdminOrderFormAccountSection.email}}" userInput="{{Simple_US_Customer.email}}" stepKey="fillCustomerEmail" after="selectCustomerGroup"/> | ||
|
|
||
| <!--Fill wrong customer address information--> | ||
| <actionGroup ref="fillOrderCustomerInformation" stepKey="fillCustomerAddress" after="fillCustomerEmail"> | ||
| <argument name="customer" value="Simple_US_Customer"/> | ||
| <argument name="address" value="US_address_TX_Wrong_Validation"/> | ||
| </actionGroup> | ||
| <!-- Select shipping --> | ||
| <actionGroup ref="orderSelectFlatRateShipping" stepKey="selectFlatRateShipping" after="fillCustomerAddress"/> | ||
|
|
||
| <!--Verify totals on Order page--> | ||
| <see selector="{{AdminOrderFormTotalSection.total('Subtotal')}}" userInput="${{AdminOrderSimpleProduct.subtotal}}" stepKey="seeOrderSubTotal" after="selectFlatRateShipping"/> | ||
| <see selector="{{AdminOrderFormTotalSection.total('Shipping')}}" userInput="${{AdminOrderSimpleProduct.shipping}}" stepKey="seeOrderShipping" after="seeOrderSubTotal"/> | ||
| <scrollTo selector="{{AdminOrderFormTotalSection.grandTotal}}" stepKey="scrollToOrderGrandTotal"/> | ||
| <see selector="{{AdminOrderFormTotalSection.grandTotal}}" userInput="${{AdminOrderSimpleProduct.grandTotal}}" stepKey="seeCorrectGrandTotal" after="scrollToOrderGrandTotal"/> | ||
|
|
||
| <!--Submit Order and verify information--> | ||
| <click selector="{{AdminOrderFormActionSection.SubmitOrder}}" stepKey="clickSubmitOrder" after="seeCorrectGrandTotal"/> | ||
| <see selector="{{AdminOrderFormBillingAddressSection.firstNameError}}" userInput="Please enter less or equal than 255 symbols." stepKey="firstNameError" after="clickSubmitOrder"/> | ||
|
|
||
| <!--Fill correct customer address information--> | ||
| <actionGroup ref="fillOrderCustomerInformation" stepKey="fillCustomerAddress" after="firstNameError"> | ||
| <argument name="customer" value="Simple_US_Customer"/> | ||
| <argument name="address" value="US_address_TX"/> | ||
| </actionGroup> | ||
| <!--Submit Order and verify information--> | ||
| <click selector="{{AdminOrderFormActionSection.SubmitOrder}}" stepKey="clickSubmitOrder" after="fillCustomerAddress"/> | ||
| <seeInCurrentUrl url="{{AdminOrderDetailsPage.url}}" stepKey="seeViewOrderPage" after="clickSubmitOrder"/> | ||
| <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="You created the order." stepKey="seeSuccessMessage" after="seeViewOrderPage"/> | ||
| </test> | ||
| </tests> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.