# Codeception Test Suite Configuration
#
# Suite for acceptance tests.
# Perform tests in browser using the WebDriver or PhpBrowser.
# If you need both WebDriver and PHPBrowser tests - create a separate suite.

actor: AcceptanceTester
modules:
  enabled:
    - Asserts
    - \OxidEsales\GdprOptinModule\Tests\Codeception\Support\Helper\Acceptance
    - WebDriver:
        url: '%SHOP_URL%'
        host: '%SELENIUM_SERVER_HOST%'
        browser: '%BROWSER_NAME%'
        port: '%SELENIUM_SERVER_PORT%'
        window_size: 1920x2200
        clear_cookies: true
    - \OxidEsales\Codeception\Module\ShopSetup:
        dump: '%DUMP_PATH%'
        fixtures: '%FIXTURES_PATH%'
    - Db:
        dsn: 'mysql:host=%DB_HOST%;dbname=%DB_NAME%;charset=utf8'
        user: '%DB_USERNAME%'
        password: '%DB_PASSWORD%'
        port: '%DB_PORT%'
        dump: '%DUMP_PATH%'
        mysql_config: '%MYSQL_CONFIG_PATH%'
        populate: true # run populator before all tests
        cleanup: true # run populator before each test
        populator: 'mysql --defaults-file=$mysql_config --default-character-set=utf8 $dbname < $dump'
        initial_queries:
          - 'SET @@SESSION.sql_mode=""'
    - \OxidEsales\Codeception\Module\Oxideshop:
        screen_shot_url: '%SCREEN_SHOT_URL%'
        depends:
          - WebDriver
          - Db
    - \OxidEsales\Codeception\Module\Database:
        depends: Db
    - \OxidEsales\Codeception\Module\SelectTheme:
        depends:
          - \OxidEsales\Codeception\Module\Database
        theme_id: '%THEME_ID%'
    - \OxidEsales\Codeception\Module\Translation\TranslationsModule:
        shop_path: '%SHOP_SOURCE_PATH%'
        paths:
          - 'Application/views/apex'
          - '../vendor/oxid-esales/gdpr-optin-module/translations'
        paths_admin:
          - 'Application/views/admin_twig'
          - '../vendor/oxid-esales/gdpr-optin-module/views/admin_twig'
    - \OxidEsales\Codeception\Module\OxideshopAdmin:
        screen_shot_url: '%SCREEN_SHOT_URL%'
        depends:
          - WebDriver
          - \OxidEsales\Codeception\Module\Oxideshop
    - \OxidEsales\Codeception\Module\OxideshopModules:
step_decorators:
  - \Codeception\Step\Retry
