Skip to content

Commit

Permalink
Merge branch '2.4-develop' into bug-33486
Browse files Browse the repository at this point in the history
  • Loading branch information
qsolutions-pl committed Sep 20, 2021
2 parents ddab158 + 1483c7a commit 0661722
Show file tree
Hide file tree
Showing 1,876 changed files with 83,317 additions and 44,433 deletions.
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Expand Up @@ -17,7 +17,7 @@ For more detailed information on contribution please read our [beginners guide](

1. Contributions must adhere to the [Magento coding standards](https://devdocs.magento.com/guides/v2.4/coding-standards/bk-coding-standards.html).
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.
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.
3. Commits must be accompanied by meaningful commit messages. Please see the [Magento Pull Request Template](https://github.com/magento/magento2/blob/HEAD/.github/PULL_REQUEST_TEMPLATE.md) for more information.
4. PRs which include bug fixes must be accompanied with a step-by-step description of how to reproduce the bug.
3. PRs which include new logic or new features must be submitted along with:
* Unit/integration test coverage
Expand All @@ -33,7 +33,7 @@ This will allow you to collaborate with the Magento 2 development team, fork the
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.
2. Review the [Contributor License Agreement](https://opensource.adobe.com/cla.html) if this is your first time contributing.
3. Create and test your work.
4. Fork the Magento 2 repository according to the [Fork A Repository instructions](https://devdocs.magento.com/guides/v2.4/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.4/contributor-guide/contributing.html#pull_request).
4. Follow the [Forks And Pull Requests Instructions](https://devdocs.magento.com/contributor-guide/contributing.html#forks-and-pull-requests) to fork the Magento 2 repository and send us a pull request.
5. Once your contribution is received the Magento 2 development team will review the contribution and collaborate with you as needed.

## Code of Conduct
Expand All @@ -43,6 +43,6 @@ The full text is available in the repository [Wiki](https://github.com/magento/m

## Connecting with Community!

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.
If you have any questions, join us in [#beginners](https://magentocommeng.slack.com/archives/CH8BGFX9D) Slack chat. If you are not on our slack, [click here](http://tinyurl.com/engcom-slack) to join.

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/).
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -32,6 +32,8 @@ atlassian*
/package.json
/.php_cs
/.php_cs.cache
/.php-cs-fixer.php
/.php-cs-fixer.cache
/grunt-config.json
/pub/media/*.*
!/pub/media/.htaccess
Expand Down
9 changes: 5 additions & 4 deletions .php_cs.dist → .php-cs-fixer.dist.php
Expand Up @@ -21,20 +21,20 @@
->exclude('setup/vendor')
->exclude('var');

return PhpCsFixer\Config::create()
->setFinder($finder)
$config = new PhpCsFixer\Config();
$config->setFinder($finder)
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'include' => true,
'new_with_braces' => true,
'no_empty_statement' => true,
'no_extra_consecutive_blank_lines' => true,
'no_extra_blank_lines' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_multiline_whitespace_around_double_arrow' => true,
'no_multiline_whitespace_before_semicolons' => true,
'multiline_whitespace_before_semicolons' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_unused_imports' => true,
Expand All @@ -44,3 +44,4 @@
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
]);
return $config;
12 changes: 7 additions & 5 deletions Gruntfile.js.sample
Expand Up @@ -16,10 +16,12 @@ module.exports = function (grunt) {
tasks = grunt.file.expand('./dev/tools/grunt/tasks/*'),
themes;

filesRouter.set('themes', 'dev/tools/grunt/configs/themes');
themes = filesRouter.get('themes');
filesRouter.set('themes', 'dev/tools/grunt/configs/themes');
themes = filesRouter.get('themes');

tasks = _.map(tasks, function(task){ return task.replace('.js', '') });
tasks = _.map(tasks, function (task) {
return task.replace('.js', '');
});
tasks.push('time-grunt');
tasks.forEach(function (task) {
require(task)(grunt);
Expand Down Expand Up @@ -53,7 +55,7 @@ module.exports = function (grunt) {
'autoprefixer',
'cssmin',
'usebanner'
].map(function(task){
].map(function (task) {
return task + ':' + component;
});

Expand All @@ -72,7 +74,7 @@ module.exports = function (grunt) {
'clean',
'exec:all'
];
_.each(themes, function(theme, name) {
_.each(themes, function (theme, name) {
tasks.push('less:' + name);
});
grunt.task.run(tasks);
Expand Down
75 changes: 52 additions & 23 deletions app/code/Magento/AdminNotification/Test/Unit/Model/FeedTest.php
Expand Up @@ -28,42 +28,69 @@
*/
class FeedTest extends TestCase
{
/** @var Feed */
/**
* @var Feed
*/
protected $feed;

/** @var ObjectManagerHelper */
/**
* @var ObjectManagerHelper
*/
protected $objectManagerHelper;

/** @var InboxFactory|MockObject */
/**
* @var InboxFactory|MockObject
*/
protected $inboxFactory;

/** @var Inbox|MockObject */
/**
* @var Inbox|MockObject
*/
protected $inboxModel;

/** @var CurlFactory|MockObject */
/**
* @var CurlFactory|MockObject
*/
protected $curlFactory;

/** @var Curl|MockObject */
/**
* @var Curl|MockObject
*/
protected $curl;

/** @var ConfigInterface|MockObject */
/**
* @var ConfigInterface|MockObject
*/
protected $backendConfig;

/** @var CacheInterface|MockObject */
/**
* @var CacheInterface|MockObject
*/
protected $cacheManager;

/** @var State|MockObject */
/**
* @var State|MockObject
*/
protected $appState;

/** @var DeploymentConfig|MockObject */
/**
* @var DeploymentConfig|MockObject
*/
protected $deploymentConfig;

/** @var ProductMetadata|MockObject */
/**
* @var ProductMetadata|MockObject
*/
protected $productMetadata;

/** @var UrlInterface|MockObject */
/**
* @var UrlInterface|MockObject
*/
protected $urlBuilder;

/**
* @inheritDoc
*/
protected function setUp(): void
{
$this->inboxFactory = $this->createPartialMock(
Expand Down Expand Up @@ -97,11 +124,8 @@ protected function setUp(): void
);

$this->deploymentConfig = $this->createMock(DeploymentConfig::class);

$this->objectManagerHelper = new ObjectManagerHelper($this);

$this->productMetadata = $this->createMock(ProductMetadata::class);

$this->urlBuilder = $this->getMockForAbstractClass(UrlInterface::class);

$this->feed = $this->objectManagerHelper->getObject(
Expand All @@ -120,11 +144,13 @@ protected function setUp(): void
}

/**
* @dataProvider checkUpdateDataProvider
* @param bool $callInbox
* @param string $curlRequest
*
* @return void
* @dataProvider checkUpdateDataProvider
*/
public function testCheckUpdate($callInbox, $curlRequest)
public function testCheckUpdate(bool $callInbox, string $curlRequest): void
{
$mockName = 'Test Product Name';
$mockVersion = '0.0.0';
Expand All @@ -144,16 +170,19 @@ public function testCheckUpdate($callInbox, $curlRequest)

$lastUpdate = 0;
$this->cacheManager->expects($this->once())->method('load')->willReturn($lastUpdate);
$this->curlFactory->expects($this->at(0))->method('create')->willReturn($this->curl);
$this->curlFactory
->method('create')
->willReturn($this->curl);
$this->curl->expects($this->once())->method('setConfig')->with($configValues)->willReturnSelf();
$this->curl->expects($this->once())->method('read')->willReturn($curlRequest);
$this->backendConfig->expects($this->at(0))->method('getValue')->willReturn('1');
$this->backendConfig->expects($this->once())->method('isSetFlag')->willReturn(false);
$this->backendConfig->expects($this->at(1))->method('getValue')
->willReturn('http://feed.magento.com');
$this->backendConfig
->method('getValue')
->willReturnOnConsecutiveCalls('1', 'http://feed.magento.com');
$this->deploymentConfig->expects($this->once())->method('get')
->with(ConfigOptionsListConstants::CONFIG_PATH_INSTALL_DATE)
->willReturn('Sat, 6 Sep 2014 16:46:11 UTC');

if ($callInbox) {
$this->inboxFactory->expects($this->once())->method('create')
->willReturn($this->inboxModel);
Expand Down Expand Up @@ -188,7 +217,7 @@ function ($initialValue, $item) use ($data) {
/**
* @return array
*/
public function checkUpdateDataProvider()
public function checkUpdateDataProvider(): array
{
return [
[
Expand Down Expand Up @@ -246,7 +275,7 @@ public function checkUpdateDataProvider()
</channel>
</rss>'
// @codingStandardsIgnoreEnd
],
]
];
}
}
Expand Up @@ -52,7 +52,7 @@ define([
tmpl = $(tmpl);

this.element.html(
$('<ul />', {
$('<ul></ul>', {
'class': 'message-system-list'
}).append(tmpl)
).trigger('contentUpdated');
Expand Down
Expand Up @@ -9,21 +9,21 @@
<div class="message-system-short">
<button class="message-system-action-dropdown" toggleCollapsible>
<span>
<translate args="'System Messages'"/>:
<text args="totalRecords"/>
<translate args="'System Messages'"></translate>:
<text args="totalRecords"></text>
</span>
</button>
<div class="message-system-short-wrapper" if="rows[0]" repeat="foreach: [rows[0]], item: '$row'" visible="!$collapsible.opened()">
<fastForEach args="data: getVisible(), as: '$col'" >
<render args="$col.getBody()"/>
<render args="$col.getBody()"></render>
</fastForEach>
</div>
</div>
<div class="message-system-collapsible">
<ul class="message-system-list">
<li repeat="foreach: rows, item: '$row'">
<fastForEach args="data: getVisible(), as: '$col'" >
<render args="$col.getBody()"/>
<render args="$col.getBody()"></render>
</fastForEach>
</li>
</ul>
Expand Down

0 comments on commit 0661722

Please sign in to comment.