Skip to content

Commit

Permalink
Merge branch '2.4-develop' into use-action-group-to-open-admin-produc…
Browse files Browse the repository at this point in the history
…t-page
  • Loading branch information
Usik2203 committed Apr 20, 2020
2 parents e3c47c6 + 1e28f35 commit 2888454
Show file tree
Hide file tree
Showing 704 changed files with 13,564 additions and 4,545 deletions.

This file was deleted.

This file was deleted.

22 changes: 13 additions & 9 deletions app/code/Magento/Amqp/Test/Unit/Setup/ConfigOptionsListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@

namespace Magento\Amqp\Test\Unit\Setup;

use Magento\Amqp\Setup\ConnectionValidator;
use Magento\Framework\Config\Data\ConfigData;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
use Magento\Amqp\Setup\ConfigOptionsList;
use Magento\Framework\Setup\Option\TextConfigOption;
use Magento\Framework\App\DeploymentConfig;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;

class ConfigOptionsListTest extends \PHPUnit\Framework\TestCase
class ConfigOptionsListTest extends TestCase
{
/**
* @var ObjectManager
Expand All @@ -24,12 +28,12 @@ class ConfigOptionsListTest extends \PHPUnit\Framework\TestCase
private $model;

/**
* @var \Magento\Amqp\Setup\ConnectionValidator|\PHPUnit_Framework_MockObject_MockObject
* @var ConnectionValidator|MockObject
*/
private $connectionValidatorMock;

/**
* @var \Magento\Framework\App\DeploymentConfig|\PHPUnit_Framework_MockObject_MockObject
* @var DeploymentConfig|MockObject
*/
private $deploymentConfigMock;

Expand All @@ -38,7 +42,7 @@ class ConfigOptionsListTest extends \PHPUnit\Framework\TestCase
*/
private $options;

protected function setUp()
protected function setUp(): void
{
$this->options = [
ConfigOptionsList::INPUT_KEY_QUEUE_AMQP_HOST => 'host',
Expand All @@ -51,18 +55,18 @@ protected function setUp()
];

$this->objectManager = new ObjectManager($this);
$this->connectionValidatorMock = $this->getMockBuilder(\Magento\Amqp\Setup\ConnectionValidator::class)
$this->connectionValidatorMock = $this->getMockBuilder(ConnectionValidator::class)
->disableOriginalConstructor()
->setMethods([])
->getMock();

$this->deploymentConfigMock = $this->getMockBuilder(\Magento\Framework\App\DeploymentConfig::class)
$this->deploymentConfigMock = $this->getMockBuilder(DeploymentConfig::class)
->disableOriginalConstructor()
->setMethods([])
->getMock();

$this->model = $this->objectManager->getObject(
\Magento\Amqp\Setup\ConfigOptionsList::class,
ConfigOptionsList::class,
[
'connectionValidator' => $this->connectionValidatorMock,
]
Expand Down Expand Up @@ -135,9 +139,9 @@ public function testCreateConfig($options, $expectedConfigData)
$result = $this->model->createConfig($options, $this->deploymentConfigMock);
$this->assertInternalType('array', $result);
$this->assertNotEmpty($result);
/** @var \Magento\Framework\Config\Data\ConfigData $configData */
/** @var ConfigData $configData */
$configData = $result[0];
$this->assertInstanceOf(\Magento\Framework\Config\Data\ConfigData::class, $configData);
$this->assertInstanceOf(ConfigData::class, $configData);
$this->assertEquals($expectedConfigData, $configData->getData());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</annotations>

<before>
<actionGroup ref = "LoginAsAdmin" stepKey="loginAsAdmin"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/AsynchronousOperations/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
},
"require": {
"magento/framework": "*",
"magento/framework-message-queue": "*",
"magento/framework-bulk": "*",
"magento/module-authorization": "*",
"magento/module-backend": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
</annotations>

<waitForElementVisible selector="{{AdminHeaderSection.adminUserAccountText}}" stepKey="waitForAdminAccountTextVisible"/>
<seeElement selector="{{AdminHeaderSection.adminUserAccountText}}" stepKey="assertAdminAccountTextElement"/>
</actionGroup>
</actionGroups>

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminMessagesSection">
<!-- Keep both sets of elements -->
<!-- Set One - more specific, works for most of message blocks -->
<element name="success" type="text" selector="#messages div.message-success"/>
<element name="nthSuccess" type="text" selector=".message.message-success.success:nth-of-type({{n}})>div" parameterized="true"/>
<element name="error" type="text" selector="#messages div.message-error"/>
<element name="notice" type="text" selector=".message.message-notice.notice"/>
<element name="messageByType" type="text" selector="#messages div.message-{{messageType}}" parameterized="true" />
<element name="warning" type="text" selector="#messages div.message-warning"/>
<element name="accessDenied" type="text" selector=".access-denied-page"/>
<!-- Deprecated elements, please do not use them. Use elements above-->
<!-- Elements below are too common and catch non messages blocks. Ex: system messages blocks-->
<!-- Set Two - more generic, needed for message blocks in Product Import, Staging Update, etc -->
<element name="successMessage" type="text" selector=".message-success"/>
<element name="errorMessage" type="text" selector=".message.message-error.error"/>
<element name="warningMessage" type="text" selector=".message-warning"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
<waitForLoadingMaskToDisappear stepKey="waitForSearchingOrder"/>
<!-- Create invoice -->
<comment userInput="Create invoice" stepKey="createInvoice"/>
<click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/>
<waitForPageLoad stepKey="waitForOrderPageToLoad"/>

<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/>
<click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoiceButton"/>
<waitForPageLoad stepKey="waitForInvoicePageToLoad"/>
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Invoice" stepKey="seeNewInvoiceInPageTitle" after="clickInvoiceButton"/>
Expand All @@ -95,8 +95,7 @@
<comment userInput="Create Shipment for the order" stepKey="createShipmentForOrder"/>
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="onOrdersPage2"/>
<waitForPageLoad time="30" stepKey="waitForOrderListPageLoading"/>
<click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="openOrderPageForShip"/>
<waitForPageLoad stepKey="waitForOrderDetailsPage"/>
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="openOrderPageForShip"/>
<click selector="{{AdminOrderDetailsMainActionsSection.ship}}" stepKey="clickShipAction"/>
<waitForPageLoad stepKey="waitForShipmentPagePage"/>
<seeInCurrentUrl url="{{AdminShipmentNewPage.url}}" stepKey="seeOrderShipmentUrl"/>
Expand Down
27 changes: 0 additions & 27 deletions app/code/Magento/Backend/Test/Mftf/Test/AdminLoginTest.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,15 @@
<!--Go to storefront-->
<amOnPage url="" stepKey="DoToStorefront"/>
<!--Create account-->
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUserFromStorefrontActionGroup">
<argument name="Customer" value="Simple_US_Customer"/>
<actionGroup ref="StorefrontOpenCustomerAccountCreatePageActionGroup" stepKey="openCreateAccountPage"/>
<actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillCreateAccountForm">
<argument name="customer" value="Simple_US_Customer"/>
</actionGroup>
<actionGroup ref="StorefrontClickCreateAnAccountCustomerAccountCreationFormActionGroup" stepKey="submitCreateAccountForm"/>
<actionGroup ref="AssertMessageCustomerCreateAccountActionGroup" stepKey="seeSuccessMessage">
<argument name="messageType" value="success"/>
<argument name="message" value="Thank you for registering with Main Website Store."/>
</actionGroup>

<!--Add product to cart-->
<amOnPage url="$$product.sku$$.html" stepKey="goToProductPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,14 @@
<argument name="price" value="Discount"/>
<argument name="amount" value="50"/>
</actionGroup>
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="signUpNewUser">
<argument name="Customer" value="CustomerEntityOne"/>
<actionGroup ref="StorefrontOpenCustomerAccountCreatePageActionGroup" stepKey="openCreateAccountPage"/>
<actionGroup ref="StorefrontFillCustomerAccountCreationFormActionGroup" stepKey="fillCreateAccountForm">
<argument name="customer" value="CustomerEntityOne"/>
</actionGroup>
<actionGroup ref="StorefrontClickCreateAnAccountCustomerAccountCreationFormActionGroup" stepKey="submitCreateAccountForm"/>
<actionGroup ref="AssertMessageCustomerCreateAccountActionGroup" stepKey="seeSuccessMessage">
<argument name="messageType" value="success"/>
<argument name="message" value="Thank you for registering with Main Website Store."/>
</actionGroup>
<amOnPage url="{{StorefrontProductPage.url(BundleProduct.urlKey)}}" stepKey="goToStorefront"/>
<waitForPageLoad stepKey="waitForStorefront"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@
<argument name="product" value="$$simpleProduct2$$"/>
<argument name="currency" value="USD - US Dollar"/>
</actionGroup>
<click stepKey="openMiniCart" selector="{{StorefrontMinicartSection.showCart}}"/>
<waitForPageLoad stepKey="waitForMiniCart"/>
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="openMiniCart"/>
<see stepKey="seeCartSubtotal" userInput="$12,300.00"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
<actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderById">
<argument name="orderId" value="$grabOrderNumber"/>
</actionGroup>
<click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/>
<waitForPageLoad stepKey="waitForAdminOrderPageLoad"/>

<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/>
<scrollTo selector="{{AdminOrderTotalSection.subTotal}}" stepKey="scrollToOrderTotalSection"/>
<see selector="{{AdminOrderTotalSection.subTotal}}" userInput="$0.00" stepKey="checkSubtotal"/>
</test>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@
<waitForPageLoad stepKey="waitForElementAdded"/>

<!-- Go to the shopping cart page and grab the value of the option title -->
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="onPageShoppingCart"/>
<waitForPageLoad stepKey="waitForCartPageLoad"/>
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="onPageShoppingCart"/>
<grabTextFrom selector="{{CheckoutCartProductSection.nthBundleOptionName('1')}}" stepKey="grabTotalBefore"/>

<!-- Find the product that we just created using the product grid -->
Expand All @@ -99,8 +98,7 @@
<see stepKey="assertSuccess2" selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product."/>

<!-- Go to the shopping cart page and make sure the title has changed -->
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="onPageShoppingCart1"/>
<waitForPageLoad stepKey="waitForCartPageLoad1"/>
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="onPageShoppingCart1"/>
<grabTextFrom selector="{{CheckoutCartProductSection.nthBundleOptionName('1')}}" stepKey="grabTotalAfter"/>
<assertNotEquals stepKey="assertNotEquals">
<actualResult type="string">{$grabTotalAfter}</actualResult>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@
<see selector="{{StorefrontMessagesSection.success}}" userInput="You added {{BundleProduct.name}} to your shopping cart." stepKey="seeAddToCartSuccessMessage"/>

<!-- Verify cart contents -->
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCart"/>
<waitForPageLoad stepKey="waitForCart"/>
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCart"/>
<see selector="{{StorefrontBundledSection.nthItemOptionsTitle('1')}}" userInput="Option One" stepKey="seeOption1"/>
<see selector="{{StorefrontBundledSection.nthItemOptionsTitle('2')}}" userInput="Option Two" stepKey="seeOption2"/>
<see selector="{{StorefrontBundledSection.nthItemOptionsTitle('3')}}" userInput="Option Three" stepKey="seeOption3"/>
Expand Down
Loading

0 comments on commit 2888454

Please sign in to comment.