Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.4-develop' into test-coverage/…
Browse files Browse the repository at this point in the history
…27589-email-integration-tests
  • Loading branch information
lbajsarowicz committed Apr 17, 2020
2 parents cd895a5 + cd77da6 commit d4b8083
Show file tree
Hide file tree
Showing 551 changed files with 8,087 additions and 4,257 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

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 @@ -36,8 +36,7 @@
<deleteData createDataKey="simpleProduct4" stepKey="deleteSimpleProduct4"/>
</after>
<!--Make category-->
<amOnPage url="{{AdminCategoryPage.url}}" stepKey="goToCategoryPage"/>
<waitForPageLoad stepKey="waitForCategoryPageLoad"/>
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="goToCategoryPage"/>
<actionGroup ref="CreateCategoryActionGroup" stepKey="createASubcategory">
<argument name="categoryEntity" value="SimpleSubCategory"/>
</actionGroup>
Expand Down
Loading

0 comments on commit d4b8083

Please sign in to comment.