# Codeception Test Suite Configuration
#
# Suite for acceptance tests.
# Perform tests in browser using the WPWebDriver or WPBrowser.
# Use WPDb to set up your initial database fixture.
# If you need both WPWebDriver and WPBrowser tests - create a separate suite.

actor: AcceptanceTester
modules:
    enabled:
        - WPDb
        - WPLoader
        - WPWebDriver
        - \Helper\Acceptance
    config:
        WPDb:
            dsn: 'mysql:host=%WP_DB_HOST%;dbname=%WP_DB_NAME%'
            user: '%WP_DB_USER%'
            password: '%WP_DB_PASSWORD%'
            dump: tests/_data/dump.sql
            populate: true
            cleanup: true
            url: '%WP_URL%'
            tablePrefix: '%WP_TABLE_PREFIX%'
        WPLoader:
            # just load WordPress using the same db as WPDb
            loadOnly: true
            wpRootFolder: '%WP_ROOT_FOLDER%'
            dbName: '%WP_DB_NAME%'
            dbHost: '%WP_DB_HOST%'
            dbUser: '%WP_DB_USER%'
            dbPassword: '%WP_DB_PASSWORD%'
            constants:
                SCRIPT_DEBUG: true
        WPWebDriver:
            url: '%WP_CHROMEDRIVER_URL%'
            adminUsername: '%WP_ADMIN_USERNAME%'
            adminPassword: '%WP_ADMIN_PASSWORD%'
            adminUrl: /wp-admin
            browser: chrome
            host: '%CHROMEDRIVER_HOST%'
            port: '%CHROMEDRIVER_PORT%'
            wait: 10
            window_size: 1920,1080
            log_js_errors: true
            capabilities:
                'goog:chromeOptions':
                    args:
                        - '--headless'
                        - '--disable-gpu'
                        - '--disable-dev-shm-usage'
                        - "--proxy-server='direct://'"
                        - '--proxy-bypass-list=*'
                        - '--no-sandbox'
