Skip to content

Commit e25e509

Browse files
committed
Merge branch '2.3-develop' of https://github.com/magento/magento2ce into MC-31089
2 parents e489eaa + 0595b0d commit e25e509

File tree

4 files changed

+21
-60
lines changed

4 files changed

+21
-60
lines changed

app/code/Magento/Indexer/Setup/Recurring.php

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@
1313
use Magento\Framework\Setup\InstallSchemaInterface;
1414
use Magento\Framework\Setup\ModuleContextInterface;
1515
use Magento\Framework\Setup\SchemaSetupInterface;
16+
use Magento\Framework\Indexer\IndexerInterfaceFactory;
1617
use Magento\Framework\Indexer\ConfigInterface;
1718
use Magento\Indexer\Model\Indexer\State;
1819
use Magento\Indexer\Model\Indexer\StateFactory;
1920
use Magento\Indexer\Model\ResourceModel\Indexer\State\CollectionFactory;
2021

2122
/**
23+
* Indexer recurring setup
24+
*
2225
* @codeCoverageIgnore
2326
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2427
*/
@@ -51,6 +54,11 @@ class Recurring implements InstallSchemaInterface
5154
*/
5255
private $stateFactory;
5356

57+
/**
58+
* @var IndexerInterfaceFactory
59+
*/
60+
private $indexerFactory;
61+
5462
/**
5563
* Init
5664
*
@@ -59,23 +67,26 @@ class Recurring implements InstallSchemaInterface
5967
* @param ConfigInterface $config
6068
* @param EncryptorInterface $encryptor
6169
* @param EncoderInterface $encoder
70+
* @param IndexerInterfaceFactory $indexerFactory
6271
*/
6372
public function __construct(
6473
CollectionFactory $statesFactory,
6574
StateFactory $stateFactory,
6675
ConfigInterface $config,
6776
EncryptorInterface $encryptor,
68-
EncoderInterface $encoder
77+
EncoderInterface $encoder,
78+
IndexerInterfaceFactory $indexerFactory
6979
) {
7080
$this->statesFactory = $statesFactory;
7181
$this->stateFactory = $stateFactory;
7282
$this->config = $config;
7383
$this->encryptor = $encryptor;
7484
$this->encoder = $encoder;
85+
$this->indexerFactory = $indexerFactory;
7586
}
7687

7788
/**
78-
* {@inheritdoc}
89+
* @inheritdoc
7990
*/
8091
public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)
8192
{
@@ -107,6 +118,11 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
107118
$state->setStatus(StateInterface::STATUS_INVALID);
108119
$state->save();
109120
}
121+
122+
$indexer = $this->indexerFactory->create()->load($indexerId);
123+
if ($indexer->isScheduled()) {
124+
$indexer->getView()->unsubscribe()->subscribe();
125+
}
110126
}
111127
}
112128
}

app/code/Magento/Indexer/Setup/RecurringData.php

Lines changed: 0 additions & 56 deletions
This file was deleted.

app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminCreditMemoActionGroup.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
</actionGroup>
5858
<actionGroup name="SubmitCreditMemoActionGroup">
5959
<grabFromCurrentUrl regex="~/order_id/(\d+)/~" stepKey="grabOrderId"/>
60-
<waitForElementVisible selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="waitButtonEnabled"/>
61-
<click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickSubmitCreditMemo"/>
60+
<waitForElementVisible selector="{{AdminCreditMemoTotalSection.submitRefundOfflineEnabled}}" stepKey="waitButtonEnabled"/>
61+
<click selector="{{AdminCreditMemoTotalSection.submitRefundOfflineEnabled}}" stepKey="clickSubmitCreditMemo"/>
6262
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForMessageAppears"/>
6363
<see selector="{{AdminMessagesSection.success}}" userInput="You created the credit memo." stepKey="seeCreditMemoCreateSuccess"/>
6464
<seeInCurrentUrl url="{{AdminOrderDetailsPage.url}}$grabOrderId" stepKey="seeViewOrderPageCreditMemo"/>

app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoTotalSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<element name="emailCopy" type="checkbox" selector=".order-totals-actions #send_email"/>
2020
<element name="refundStoreCredit" type="checkbox" selector=".order-totals-actions .field-refund-store-credit input[type='checkbox']"/>
2121
<element name="submitRefundOffline" type="button" selector=".order-totals-actions button[data-ui-id='order-items-submit-button']" timeout="60"/>
22+
<element name="submitRefundOfflineEnabled" type="button" selector=".order-totals-actions button[data-ui-id='order-items-submit-button']:not(.disabled)" timeout="60"/>
2223
<element name="creditMemoItem" type="text" selector="#sales_order_view_tabs_order_creditmemos"/>
2324
<element name="viewMemo" type="text" selector="div#sales_order_view_tabs_order_creditmemos_content a.action-menu-item"/>
2425
<element name="refundOffline" type="button" selector=".order-totals-actions button[data-ui-id='order-items-submit-offline']"/>

0 commit comments

Comments
 (0)