This is an internal package containing Functional Tests based on Playwright. This is used specifically by the Loki Checkout core development team. Do not use this for your own shop. Also, do not enable the module LokiCheckout_FunctionalTests
in production. When using this module anyway, do make sure to configured a proper token.
Install this package via composer:
composer require loki-checkout/magento2-functional-tests
Next, enable this module:
bin/magento module:enable LokiCheckout_FunctionalTests
Setup Playwright:
cd vendor/loki-checkout/magento2-functional-tests/Test/Playwright/
npm install
npx playwright install
Next, create a custom .env
file within the same Test/Playwright/
folder:
TEST_URL=http://magento.local
TEST_TOKEN=foobar
Next, make sure the listing of LokiCheckout modules in app/etc/loki-checkout.json
is up to date:
bin/magento loki-checkout:modules:dump
Make sure a secure token is configured. The security token can also be reset from the CLI:
bin/magento config:set loki_functional_tests/general/token foobar
For instance, you could generate a random token as follows
TOKEN=`tr -dc A-Za-z0-9 </dev/urandom | head -c 128; echo`
bin/magento config:set loki_functional_tests/general/token $TOKEN
Just make sure that the token matches the one in .env
.
All commands are run from the previous folder:
cd vendor/loki-checkout/magento2-functional-tests/Test/Playwright/
Run tests in headless mode:
npx playwright test
npx playwright show-report
Or run tests in the UI mode:
npx playwright test --ui
Or:
npx playwright test --headed
Because the app/etc/loki-checkout.json
file contains entries that are being turned into Playwright projects, you can also run just a single project:
npx playwright test --ui --project=LokiCheckout_Mollie
npx playwright test --ui --project=LokiCheckout_Core basic-test
npx playwright test --ui --project=LokiCheckout_Core basic-test --debug
Note that parallelism doesn't work well. Each test could reconfigure the Magento instance with specific modules and configuration options. With that, the reconfiguration for one test might conflict with another test. Because of this, tests should not be run in parallel :(
For getting support, create an Issue under the following project URL:
https://gitlab.yireo.com/loki-checkout/LokiCheckout_FunctionalTests
The following options of this module can be configured via the Store Configuration:
loki_checkout/functional_tests/token
The following dependencies are declared in the module its `etc/module.xml` file:
LokiCheckout_Core
LokiCheckout_DevProfiles
LokiCheckout_DevTools
Loki_Base
Loki_Components
Loki_CssUtils
Loki_FieldComponents
Loki_MapComponents
Magento_Backend
Magento_Catalog
Magento_CatalogInventory
Magento_Checkout
Magento_CheckoutAgreements
Magento_Cms
Magento_Config
Magento_Customer
Magento_Directory
Magento_Eav
Magento_Indexer
Magento_Newsletter
Magento_Payment
Magento_Quote
Magento_Sales
Magento_Shipping
Magento_Store
Magento_Theme
Magento_Vault
Yireo_CspUtilities
Yireo_HyvaThemeAutoRegistration
Yireo_ModuleDuplicator
Yireo_TestGenerator
LokiCheckout_FunctionalTests
loki-checkout/magento2-functional-tests
ext-json: *
ext-pcre: *
loki-checkout/magento2-core: ^2.0
loki-checkout/magento2-dev-profiles: ^2.0
loki-checkout/magento2-dev-tools: ^2.0
loki/magento2-components: ^2.0
magento/framework: ^103.0
magento/module-backend: ^102.0
magento/module-catalog: ^104.0
magento/module-checkout: ^100.4
magento/module-quote: ^101.2
magento/module-store: ^101.1
symfony/console: ~v6.4.21
dev-main#429e4b415fc21a6d50628d1e5552b7fc1feec325 | 20 October 2025 |
2.0.9 | 20 October 2025 |
2.0.8 | 20 October 2025 |
2.0.7 | 20 October 2025 |
2.0.6 | 20 October 2025 |
2.0.5 | 20 October 2025 |
2.0.4 | 20 October 2025 |
2.0.3 | 20 October 2025 |
2.0.2 | 20 October 2025 |
2.0.1 | 20 October 2025 |
2.0.0 | 20 October 2025 |
1.0.0 | 20 October 2025 |
0.0.4 | 20 October 2025 |
0.0.3 | 20 October 2025 |
0.0.2 | 20 October 2025 |
0.0.1 | 20 October 2025 |
Yireo_Loki*
to Loki*
yireo/magento2-loki*
to loki/magento2*
LokiCheckout_Core
to 2.0.0hasAlpineComponent
Yireo_ExtensionChecker
enabled