Skip to content

Commit a8e6d89

Browse files
authored
Merge branch 'main' into phpunit-pre-symfony
2 parents ab93118 + 07bb0c3 commit a8e6d89

File tree

88 files changed

+1329
-54
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+1329
-54
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,6 +1689,15 @@
16891689
"code",
16901690
"bug"
16911691
]
1692+
},
1693+
{
1694+
"login": "denisahac",
1695+
"name": "Den Isahac",
1696+
"avatar_url": "https://avatars.githubusercontent.com/u/6700576?v=4",
1697+
"profile": "http://www.denisahac.xyz",
1698+
"contributions": [
1699+
"doc"
1700+
]
16921701
}
16931702
],
16941703
"commitType": "docs"

.cypress.config.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module.exports = {
2-
e2e: {
3-
setupNodeEvents(on, config) {
4-
// implement node event listeners here
5-
},
6-
baseUrl: 'https://magento-lts.ddev.site'
7-
},
2+
e2e: {
3+
setupNodeEvents(on, config) {
4+
// implement node event listeners here
5+
},
6+
baseUrl: 'https://magento-lts.ddev.site',
7+
}
88
};

.github/labeler.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,4 +934,10 @@
934934
- any-glob-to-any-file: [
935935
.rector.php,
936936
.github/workflows/rector.yml
937-
]
937+
]
938+
939+
'cypress':
940+
- changed-files:
941+
- any-glob-to-any-file: [
942+
cypress/*
943+
]

.github/workflows/check-files.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ on:
3939
phpunit:
4040
description: "Count changed PHPUnit files"
4141
value: ${{ jobs.check.outputs.phpunit }}
42+
cypress:
43+
description: "Count changed Cypress files"
44+
value: ${{ jobs.check.outputs.cypress }}
4245
# Allow manually triggering the workflow.
4346
workflow_dispatch:
4447

@@ -59,6 +62,7 @@ jobs:
5962
phpstan: ${{ steps.changes-phpstan.outputs.phpstan }}
6063
phpunit-test: ${{ steps.changes-phpunit-test.outputs.phpunit-test }}
6164
phpunit: ${{ steps.changes-phpunit.outputs.phpunit }}
65+
cypress: ${{ steps.changes-cypress.outputs.cypress }}
6266

6367
steps:
6468
- name: Checkout code
@@ -194,3 +198,11 @@ jobs:
194198
count="$(grep -oE "**phpunit**" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)"
195199
echo "$count PHPUnit file(s) changed"
196200
echo "phpunit=$count" >> $GITHUB_OUTPUT
201+
202+
- name: Check if Cypress files changed
203+
id: changes-cypress
204+
if: steps.changed-files-specific.outputs.any_modified == 'true'
205+
run: |
206+
count="$(grep -oE "cypress/" <<< "${{ steps.changed-files-specific.outputs.all_modified_files }}" | wc -l)"
207+
echo "$count Cypress file(s) changed"
208+
echo "cypress=$count" >> $GITHUB_OUTPUT

.github/workflows/cypress.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Cypress
2+
3+
on:
4+
workflow_call:
5+
# Allow manually triggering the workflow.
6+
workflow_dispatch:
7+
8+
jobs:
9+
test:
10+
name: Cypress
11+
runs-on: [ubuntu-latest]
12+
strategy:
13+
matrix:
14+
webserver: ['apache-fpm', 'nginx-fpm']
15+
16+
steps:
17+
- uses: actions/checkout@v1
18+
- name: Setup DDEV
19+
uses: ddev/github-action-setup-ddev@v1
20+
with:
21+
autostart: false
22+
23+
# install DDEV configuration
24+
- run: ddev config --project-type=magento --php-version=8.1 --webserver-type=${{ matrix.webserver }}
25+
26+
# install composer dependencies
27+
- run: ddev composer install
28+
29+
# install openmage
30+
- run: ddev openmage-install -q
31+
32+
# install cypress-addon
33+
- run: ddev add-on get tyler36/ddev-cypress
34+
35+
# start ddev
36+
- run: ddev start
37+
38+
# run cypress
39+
- run: ddev cypress-run --config-file .cypress.config.js

.github/workflows/workflow.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,14 @@ jobs:
136136
needs.check.outputs.phpunit > 0 ||
137137
needs.check.outputs.workflow > 0
138138
uses: ./.github/workflows/phpunit.yml
139+
140+
cypress:
141+
name: Cypress E2E Tests
142+
needs: [check, php-cs-fixer]
143+
if: |
144+
needs.check.outputs.cypress > 0 ||
145+
needs.check.outputs.php > 0 ||
146+
needs.check.outputs.phtml > 0 ||
147+
needs.check.outputs.xml > 0 ||
148+
needs.check.outputs.workflow > 0
149+
uses: ./.github/workflows/cypress.yml

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,5 +114,9 @@ app/etc/includes/ddev.xhgui.php
114114
# local development
115115
.localdev
116116

117+
# cypress
118+
cypress/screenshots/
119+
cypress/videos/
120+
117121
# rector
118122
.rector.result.cache

.rector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
try {
2424
return RectorConfig::configure()
25+
->withFileExtensions(['php', 'phtml'])
2526
->withCache(
2627
cacheDirectory: '.rector.result.cache',
2728
cacheClass: FileCacheStorage::class,

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
273273
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Axepih"><img src="https://avatars.githubusercontent.com/u/95623175?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Axepih</b></sub></a></td>
274274
<td align="center" valign="top" width="14.28%"><a href="https://github.com/gdemarsico"><img src="https://avatars.githubusercontent.com/u/2066819?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Gastón De Mársico</b></sub></a></td>
275275
</tr>
276+
<tr>
277+
<td align="center" valign="top" width="14.28%"><a href="http://www.denisahac.xyz"><img src="https://avatars.githubusercontent.com/u/6700576?v=4" loading="lazy" width="100" alt=""/><br /><sub><b>Den Isahac</b></sub></a></td>
278+
</tr>
276279
</tbody>
277280
</table>
278281

app/code/core/Mage/Adminhtml/Block/Widget/Container.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public function getHeaderText()
253253
*/
254254
public function getHeaderCssClass()
255255
{
256-
return 'head-' . strtr($this->_controller, '_', '-');
256+
return 'icon-head head-' . strtr($this->_controller, '_', '-');
257257
}
258258

259259
/**

0 commit comments

Comments
 (0)