Skip to content

Commit f8195c0

Browse files
merge magento/2.3-develop into magento-epam/EPAM-PR-53
2 parents 78bd826 + c2e834d commit f8195c0

File tree

39 files changed

+373
-257
lines changed

39 files changed

+373
-257
lines changed

.github/CONTRIBUTING.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
# Contributing to Magento 2 code
22

33
Contributions to the Magento 2 codebase are done using the fork & pull model.
4-
This contribution model has contributors maintaining their own copy of the forked codebase (which can easily be synced with the main copy). The forked repository is then used to submit a request to the base repository to “pull” a set of changes. For more information on pull requests please refer to [GitHub Help](https://help.github.com/articles/about-pull-requests/).
4+
This contribution model has contributors maintaining their own fork of the Magento 2 repository.
5+
The forked repository is then used to submit a request to the base repository to “pull” a set of changes.
6+
For more information on pull requests please refer to [GitHub Help](https://help.github.com/articles/about-pull-requests/).
57

68
Contributions can take the form of new components or features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes or optimizations.
79

8-
The Magento 2 development team will review all issues and contributions submitted by the community of developers in the first in, first out order. During the review we might require clarifications from the contributor. If there is no response from the contributor within two weeks, the pull request will be closed.
10+
The Magento 2 development team or community maintainers will review all issues and contributions submitted by the community of developers in the first in, first out order.
11+
During the review we might require clarifications from the contributor.
12+
If there is no response from the contributor within two weeks, the pull request will be closed.
913

14+
For more detialed information on contribution please read our [beginners guide](https://github.com/magento/magento2/wiki/Getting-Started).
1015

1116
## Contribution requirements
1217

13-
1. Contributions must adhere to the [Magento coding standards](https://devdocs.magento.com/guides/v2.2/coding-standards/bk-coding-standards.html).
18+
1. Contributions must adhere to the [Magento coding standards](https://devdocs.magento.com/guides/v2.3/coding-standards/bk-coding-standards.html).
1419
2. Pull requests (PRs) must be accompanied by a meaningful description of their purpose. Comprehensive descriptions increase the chances of a pull request being merged quickly and without additional clarification requests.
15-
3. Commits must be accompanied by meaningful commit messages. Please see the [Magento Pull Request Template](https://github.com/magento/magento2/blob/2.2-develop/.github/PULL_REQUEST_TEMPLATE.md) for more information.
20+
3. Commits must be accompanied by meaningful commit messages. Please see the [Magento Pull Request Template](https://github.com/magento/magento2/blob/2.3-develop/.github/PULL_REQUEST_TEMPLATE.md) for more information.
1621
4. PRs which include bug fixes must be accompanied with a step-by-step description of how to reproduce the bug.
1722
3. PRs which include new logic or new features must be submitted along with:
1823
* Unit/integration test coverage
@@ -22,15 +27,22 @@ The Magento 2 development team will review all issues and contributions submitte
2227

2328
## Contribution process
2429

25-
If you are a new GitHub user, we recommend that you create your own [free github account](https://github.com/signup/free). This will allow you to collaborate with the Magento 2 development team, fork the Magento 2 project and send pull requests.
30+
If you are a new GitHub user, we recommend that you create your own [free github account](https://github.com/signup/free).
31+
This will allow you to collaborate with the Magento 2 development team, fork the Magento 2 project and send pull requests.
2632

2733
1. Search current [listed issues](https://github.com/magento/magento2/issues) (open or closed) for similar proposals of intended contribution before starting work on a new contribution.
2834
2. Review the [Contributor License Agreement](https://magento.com/legaldocuments/mca) if this is your first time contributing.
2935
3. Create and test your work.
30-
4. Fork the Magento 2 repository according to the [Fork A Repository instructions](https://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#fork) and when you are ready to send us a pull request – follow the [Create A Pull Request instructions](https://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#pull_request).
36+
4. Fork the Magento 2 repository according to the [Fork A Repository instructions](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#fork) and when you are ready to send us a pull request – follow the [Create A Pull Request instructions](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#pull_request).
3137
5. Once your contribution is received the Magento 2 development team will review the contribution and collaborate with you as needed.
3238

3339
## Code of Conduct
3440

3541
Please note that this project is released with a Contributor Code of Conduct. We expect you to agree to its terms when participating in this project.
3642
The full text is available in the repository [Wiki](https://github.com/magento/magento2/wiki/Magento-Code-of-Conduct).
43+
44+
## Connecting with Community!
45+
46+
If you have any questions, join us in [#beginners](https://magentocommeng.slack.com/messages/CH8BGFX9D) Slack chat. If you are not on our slack, [click here](http://tinyurl.com/engcom-slack) to join.
47+
48+
Need to find a project? Check out the [Slack Channels](https://github.com/magento/magento2/wiki/Slack-Channels) (with listed project info) and the [Magento Community Portal](https://opensource.magento.com/).

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
There could be 1 or more issues linked here and it will help us find some more information about the reasoning behind this change.
2222
-->
2323
1. magento/magento2#<issue_number>: Issue title
24-
2. ...
2524

2625
### Manual testing scenarios (*)
2726
<!---
@@ -31,6 +30,12 @@
3130
1. ...
3231
2. ...
3332

33+
### Questions or comments
34+
<!---
35+
If relevant, here you can ask questions or provide comments on your pull request for the reviewer
36+
For example if you need assistance with writing tests or would like some feedback on one of your development ideas
37+
-->
38+
3439
### Contribution checklist (*)
3540
- [ ] Pull request has a meaningful description of its purpose
3641
- [ ] All commits are accompanied by meaningful commit messages

app/code/Magento/Catalog/Model/ResourceModel/Product/Option.php

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
namespace Magento\Catalog\Model\ResourceModel\Product;
77

88
use Magento\Catalog\Api\Data\ProductInterface;
9+
use Magento\Store\Model\ScopeInterface;
910

1011
/**
1112
* Catalog product custom option resource model
@@ -154,24 +155,26 @@ protected function _saveValuePrices(\Magento\Framework\Model\AbstractModel $obje
154155

155156
$scope = (int)$this->_config->getValue(
156157
\Magento\Store\Model\Store::XML_PATH_PRICE_SCOPE,
157-
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
158+
ScopeInterface::SCOPE_STORE
158159
);
159160

160161
if ($object->getStoreId() != '0' && $scope == \Magento\Store\Model\Store::PRICE_SCOPE_WEBSITE) {
161-
$baseCurrency = $this->_config->getValue(
162+
$website = $this->_storeManager->getStore($object->getStoreId())->getWebsite();
163+
164+
$websiteBaseCurrency = $this->_config->getValue(
162165
\Magento\Directory\Model\Currency::XML_PATH_CURRENCY_BASE,
163-
'default'
166+
ScopeInterface::SCOPE_WEBSITE,
167+
$website
164168
);
165169

166-
$storeIds = $this->_storeManager->getStore($object->getStoreId())->getWebsite()->getStoreIds();
170+
$storeIds = $website->getStoreIds();
167171
if (is_array($storeIds)) {
168172
foreach ($storeIds as $storeId) {
169173
if ($object->getPriceType() == 'fixed') {
170174
$storeCurrency = $this->_storeManager->getStore($storeId)->getBaseCurrencyCode();
171-
$rate = $this->_currencyFactory->create()->load($baseCurrency)->getRate($storeCurrency);
172-
if (!$rate) {
173-
$rate = 1;
174-
}
175+
$rate = $this->_currencyFactory->create()->load($websiteBaseCurrency)
176+
->getRate($storeCurrency);
177+
$rate ?: $rate = 1;
175178
$newPrice = $object->getPrice() * $rate;
176179
} else {
177180
$newPrice = $object->getPrice();
@@ -582,6 +585,8 @@ public function getPriceTypes()
582585
}
583586

584587
/**
588+
* Returns metadata poll.
589+
*
585590
* @return \Magento\Framework\EntityManager\MetadataPool
586591
*/
587592
private function getMetadataPool()

app/code/Magento/CatalogImportExport/Test/Mftf/ActionGroup/AdminExportActionGroup.xml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,34 @@
5353
<arguments>
5454
<argument name="rowIndex" type="string"/>
5555
</arguments>
56-
<reloadPage stepKey="refreshPage"/>
57-
<waitForPageLoad stepKey="waitFormReload"/>
56+
<amOnPage url="{{AdminExportIndexPage.url}}" stepKey="goToExportIndexPage"/>
5857
<click stepKey="clickSelectBtn" selector="{{AdminExportAttributeSection.selectByIndex(rowIndex)}}"/>
5958
<click stepKey="clickOnDelete" selector="{{AdminExportAttributeSection.delete(rowIndex)}}" after="clickSelectBtn"/>
6059
<waitForElementVisible selector="{{AdminProductGridConfirmActionSection.title}}" stepKey="waitForConfirmModal"/>
6160
<click selector="{{AdminProductGridConfirmActionSection.ok}}" stepKey="confirmDelete"/>
62-
<waitForPageLoad stepKey="waitForExportDataDeleted" />
61+
<waitForElementVisible selector="{{AdminDataGridTableSection.dataGridEmpty}}" stepKey="waitDataGridEmptyMessageAppears"/>
62+
<see selector="{{AdminDataGridTableSection.dataGridEmpty}}" userInput="We couldn't find any records." stepKey="assertDataGridEmptyMessage"/>
63+
</actionGroup>
64+
65+
<actionGroup name="deleteAllExportedFiles">
66+
<amOnPage url="{{AdminExportIndexPage.url}}" stepKey="goToExportIndexPage"/>
67+
<executeInSelenium
68+
function="
69+
function ($webdriver) use ($I) {
70+
$buttons = $webdriver->findElements(\Facebook\WebDriver\WebDriverBy::xpath('//tr[@data-repeat-index=\'0\']//button'));
71+
while(!empty($buttons)) {
72+
$buttons[0]->click();
73+
$I->waitForElementVisible('//tr[@data-repeat-index=\'0\']//a[text()=\'Delete\']', 10);
74+
$deleteButton = $webdriver->findElement(\Facebook\WebDriver\WebDriverBy::xpath('//tr[@data-repeat-index=\'0\']//a[text()=\'Delete\']'));
75+
$deleteButton->click();
76+
$I->waitForElementVisible('.modal-popup.confirm button.action-accept', 10);
77+
$I->click('.modal-popup.confirm button.action-accept');
78+
$I->waitForPageLoad(60);
79+
$buttons = $webdriver->findElements(\Facebook\WebDriver\WebDriverBy::xpath('//tr[@data-repeat-index=\'0\']//button'));
80+
}
81+
}"
82+
stepKey="deleteAllExportedFilesOneByOne"/>
83+
<waitForElementVisible selector="{{AdminDataGridTableSection.dataGridEmpty}}" stepKey="waitDataGridEmptyMessageAppears"/>
6384
<see selector="{{AdminDataGridTableSection.dataGridEmpty}}" userInput="We couldn't find any records." stepKey="assertDataGridEmptyMessage"/>
6485
</actionGroup>
6586
</actionGroups>

app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,15 @@
8080
<requiredEntity createDataKey="secondSimpleProductForFixedWithAttribute"/>
8181
</createData>
8282

83-
<!-- Login as admin -->
84-
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
85-
8683
<!-- Run cron twice -->
8784
<magentoCLI command="cron:run" stepKey="runCron1"/>
8885
<magentoCLI command="cron:run" stepKey="runCron2"/>
86+
87+
<!-- Login as admin -->
88+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
89+
<actionGroup ref="deleteAllExportedFiles" stepKey="clearExportedFilesList"/>
8990
</before>
9091
<after>
91-
<!-- Delete exported file -->
92-
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
93-
<argument name="rowIndex" value="0"/>
94-
</actionGroup>
95-
9692
<!-- Delete products creations -->
9793
<deleteData createDataKey="createDynamicBundleProduct" stepKey="deleteDynamicBundleProduct"/>
9894
<deleteData createDataKey="firstSimpleProductForDynamic" stepKey="deleteFirstSimpleProductForDynamic"/>
@@ -105,6 +101,10 @@
105101
<deleteData createDataKey="secondSimpleProductForFixedWithAttribute" stepKey="deleteSecondSimpleProductForFixedWithAttribute"/>
106102
<deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/>
107103

104+
<!-- Delete exported file -->
105+
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
106+
<argument name="rowIndex" value="0"/>
107+
</actionGroup>
108108
<!-- Log out -->
109109
<actionGroup ref="logout" stepKey="logout"/>
110110
</after>

app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,15 @@
4848
<requiredEntity createDataKey="createSecondSimpleProduct"/>
4949
</updateData>
5050

51-
<!-- Login as admin -->
52-
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
53-
5451
<!-- Run cron twice -->
5552
<magentoCLI command="cron:run" stepKey="runCron1"/>
5653
<magentoCLI command="cron:run" stepKey="runCron2"/>
54+
55+
<!-- Login as admin -->
56+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
57+
<actionGroup ref="deleteAllExportedFiles" stepKey="clearExportedFilesList"/>
5758
</before>
5859
<after>
59-
<!-- Delete exported file -->
60-
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
61-
<argument name="rowIndex" value="0"/>
62-
</actionGroup>
63-
6460
<!-- Deleted created products -->
6561
<deleteData createDataKey="createFirstSimpleProduct" stepKey="deleteFirstSimpleProduct"/>
6662
<deleteData createDataKey="createSecondSimpleProduct" stepKey="deleteSecondSimpleProduct"/>
@@ -69,6 +65,10 @@
6965
<!-- Delete category -->
7066
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
7167

68+
<!-- Delete exported file -->
69+
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
70+
<argument name="rowIndex" value="0"/>
71+
</actionGroup>
7272
<!-- Log out -->
7373
<actionGroup ref="logout" stepKey="logout"/>
7474
</after>

app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,26 +73,26 @@
7373
<requiredEntity createDataKey="createConfigSecondChildProduct"/>
7474
</createData>
7575

76-
<!-- Login as admin -->
77-
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
78-
7976
<!-- Run cron twice -->
8077
<magentoCLI command="cron:run" stepKey="runCron1"/>
8178
<magentoCLI command="cron:run" stepKey="runCron2"/>
79+
80+
<!-- Login as admin -->
81+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
82+
<actionGroup ref="deleteAllExportedFiles" stepKey="clearExportedFilesList"/>
8283
</before>
8384
<after>
84-
<!-- Delete exported file -->
85-
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
86-
<argument name="rowIndex" value="0"/>
87-
</actionGroup>
88-
8985
<!-- Delete configurable product creation -->
9086
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/>
9187
<deleteData createDataKey="createConfigFirstChildProduct" stepKey="deleteConfigFirstChildProduct"/>
9288
<deleteData createDataKey="createConfigSecondChildProduct" stepKey="deleteConfigSecondChildProduct"/>
9389
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
9490
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
9591

92+
<!-- Delete exported file -->
93+
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
94+
<argument name="rowIndex" value="0"/>
95+
</actionGroup>
9696
<!-- Log out -->
9797
<actionGroup ref="logout" stepKey="logout"/>
9898
</after>

app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,26 +89,26 @@
8989
<requiredEntity createDataKey="createConfigProduct"/>
9090
</createData>
9191

92-
<!-- Login as admin -->
93-
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
94-
9592
<!-- Run cron twice -->
9693
<magentoCLI command="cron:run" stepKey="runCron1"/>
9794
<magentoCLI command="cron:run" stepKey="runCron2"/>
95+
96+
<!-- Login as admin -->
97+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
98+
<actionGroup ref="deleteAllExportedFiles" stepKey="clearExportedFilesList"/>
9899
</before>
99100
<after>
100-
<!-- Delete exported file -->
101-
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
102-
<argument name="rowIndex" value="0"/>
103-
</actionGroup>
104-
105101
<!-- Delete configurable product creation -->
106102
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/>
107103
<deleteData createDataKey="createConfigFirstChildProduct" stepKey="deleteConfigFirstChildProduct"/>
108104
<deleteData createDataKey="createConfigSecondChildProduct" stepKey="deleteConfigSecondChildProduct"/>
109105
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
110106
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
111107

108+
<!-- Delete exported file -->
109+
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
110+
<argument name="rowIndex" value="0"/>
111+
</actionGroup>
112112
<!-- Log out -->
113113
<actionGroup ref="logout" stepKey="logout"/>
114114
</after>

app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,15 @@
7171
<requiredEntity createDataKey="createConfigSecondChildProduct"/>
7272
</createData>
7373

74-
<!-- Login as admin -->
75-
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
76-
7774
<!-- Run cron twice -->
7875
<magentoCLI command="cron:run" stepKey="runCron1"/>
7976
<magentoCLI command="cron:run" stepKey="runCron2"/>
77+
78+
<!-- Login as admin -->
79+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
80+
<actionGroup ref="deleteAllExportedFiles" stepKey="clearExportedFilesList"/>
8081
</before>
8182
<after>
82-
<!-- Delete exported file -->
83-
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
84-
<argument name="rowIndex" value="0"/>
85-
</actionGroup>
86-
8783
<!-- Delete simple product -->
8884
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
8985

@@ -94,6 +90,10 @@
9490
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
9591
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
9692

93+
<!-- Delete exported file -->
94+
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
95+
<argument name="rowIndex" value="0"/>
96+
</actionGroup>
9797
<!-- Log out -->
9898
<actionGroup ref="logout" stepKey="logout"/>
9999
</after>

0 commit comments

Comments
 (0)