When you’re trying to select a theme in the backoffice, PrestaShop will test if your theme is valid. It won’t install if the theme isn’t valid.
A theme is valid if it contains some files and some configuration keys.
Here is the complete list of required files:
Your configuration file
config/theme.yml (read more about this file)
must details some configuration keys.
Here is the list of keys PrestaShop will look for. The dot represent the nesting.
PrestaShop 1.7 comes with an automated test suite used to develop Classic. You should use them to ensure your theme is fully compatible with PrestaShop’s feature.
java and Chrome installed on your machine.
The test suite is destructive. Do not run it in production.
Prepare your store for the tests:
tests/Selenium/settings.jsand customize according to your setup
php prepare-shop.php. WARNING: never do this on a production shop because it will edit existing products without asking for your permission.
The test suite uses Selenium,
webdriver.io allows you to perform almost any action a browser would do using a fluent promise-based API.
You will need some familiarity with promises to make the most of the tool.
If you want to create a custom test, there are a few things you should know. Tests are contained in
Until we can do more documentation, please have a look at the existing tests and at the WebDriver.io API.
If you need to add general purpose helper functions for your tests, they should go in
If you need fixtures for your tests, please use the ones from the default installation or provide a script that installs them.
Do not hard-code things such as product ids in your tests: instead abstract them behind a name and put
them in the