Skip to content

Commit bdf94bf

Browse files
fix(ci): Use unsecure url for MFTF tests (#17)
Workaround as Selenium Chrome does not accept SSL certificate * ci(mftf): Use unsecure url to avoid selenium chrome certificate error * ci(mftf): Use magento 2.4.8 for test
1 parent 88e4d85 commit bdf94bf

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/mftf-tests.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
# Latest version
23-
m2-version: [ "2.4.7" ]
23+
m2-version: [ "2.4.8" ]
2424
php-version: [ "8.3" ]
2525
magento-repository: ['https://repo.magento.com/']
2626
database: ['mysql:5.7', 'mysql:8.0', 'mariadb:10.6']
@@ -45,12 +45,19 @@ jobs:
4545
composer_auth: ${{ secrets.M2_COMPOSER_AUTH }}
4646
database: ${{ matrix.database }}
4747

48+
- name: Set unsecure url
49+
# Workaround as something goes wrong with Selenium Chrome and SSL certificates
50+
run: |
51+
SECURE_URL="${{ steps.magento2-install.outputs.m2_url }}"
52+
UNSECURE_URL="${SECURE_URL/https:/http:}"
53+
echo "UNSECURE_URL=$UNSECURE_URL" >> $GITHUB_ENV
54+
4855
- name: Add Selenium to DDEV
4956
run: |
5057
ddev get julienloizelet/ddev-magento2-mftf
5158
cp .ddev/okaeli-add-on/magento2/custom_files/mftf/.credentials dev/tests/acceptance/.credentials
5259
cp .ddev/okaeli-add-on/magento2/custom_files/mftf/.env.dist dev/tests/acceptance/.env
53-
sed -i -e 's,REPLACE_BASE_URL,${{ steps.magento2-install.outputs.m2_url }},' dev/tests/acceptance/.env
60+
sed -i -e 's,REPLACE_BASE_URL,${{ env.UNSECURE_URL }},' dev/tests/acceptance/.env
5461
ddev restart
5562
5663
- name: Configure Nginx for MFTF
@@ -69,9 +76,12 @@ jobs:
6976
ddev magento config:set cms/wysiwyg/enabled disabled
7077
ddev magento config:set admin/security/admin_account_sharing 1
7178
ddev magento config:set admin/security/use_form_key 0
79+
ddev magento config:set web/seo/use_rewrites 1
80+
ddev magento config:set web/unsecure/base_url ${{env.UNSECURE_URL}}/
7281
ddev magento cache:clean config full_page
7382
ddev exec vendor/bin/mftf build:project
7483
75-
- name: Run AdminCreateNewCustomerOnStorefrontTest
76-
run: ddev exec vendor/bin/mftf run:test AdminCreateNewCustomerOnStorefrontTest
84+
- name: Run a test
85+
run: ddev exec vendor/bin/mftf run:test AdminLoginSuccessfulTest
86+
7787

0 commit comments

Comments
 (0)