Skip to content

Commit

Permalink
devops: WPBrowser upgraded to v4.x.x
Browse files Browse the repository at this point in the history
  • Loading branch information
kidunot89 committed May 15, 2024
1 parent e184488 commit bb5891e
Show file tree
Hide file tree
Showing 7 changed files with 323 additions and 179 deletions.
4 changes: 4 additions & 0 deletions bin/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ fi
echo "Setting pretty permalinks..."
wp rewrite structure '/%year%/%monthnum%/%postname%/' --allow-root

zone_id=$(wp wc shipping_zone create --name="Local" --order=1 --user=admin --porcelain --allow-root)
wp wc shipping_zone_method create "$zone_id" --method_id=flat_rate --order=1 --enabled=true --settings='{"cost":"10"}' --user=admin --allow-root
wp wc shipping_zone_method create "$zone_id" --method_id=free_shipping --order=2 --enabled=true --settings='{"requires":"min_amount","min_amount":"50"}' --user=admin --allow-root

echo "Prepare for app database dump..."
if [ ! -d "${PROJECT_DIR}/local/db" ]; then
mkdir "${PROJECT_DIR}/local/db"
Expand Down
61 changes: 2 additions & 59 deletions codeception.dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,62 +32,5 @@ extensions:
- "lucatume\\WPBrowser\\Command\\GenerateWPAjax"
- "lucatume\\WPBrowser\\Command\\GenerateWPCanonical"
- "lucatume\\WPBrowser\\Command\\GenerateWPXMLRPC"
modules:
config:
\Tests\WPGraphQL\Codeception\Module\WPGraphQL:
endpoint: '%WORDPRESS_URL%/graphql'
auth_header: 'Basic %TEST_SITE_ADMIN_APP_PASSWORD%'
\lucatume\WPBrowser\Module\WPCLI:
path: '%WP_ROOT_FOLDER%'
throw: true
\lucatume\WPBrowser\Module\WPDb:
dsn: 'mysql:host=%DB_HOST%;dbname=%DB_NAME%'
user: '%DB_USER%'
password: '%DB_PASSWORD%'
dump: 'local/db/app_db.sql'
populate: true
cleanup: true
waitlock: 10
url: '%WORDPRESS_URL%'
urlReplacement: true
tablePrefix: '%WP_TABLE_PREFIX%'
\lucatume\WPBrowser\Module\WPBrowser:
url: '%WORDPRESS_URL%'
wpRootFolder: '%WP_CORE_DIR%'
adminUsername: '%ADMIN_USERNAME%'
adminPassword: '%ADMIN_PASSWORD%'
adminPath: '/wp-admin'
\lucatume\WPBrowser\Module\REST:
depends: WPBrowser
url: '%WORDPRESS_URL%'
cookies: false
\lucatume\WPBrowser\Module\WPFilesystem:
wpRootFolder: '%WP_CORE_DIR%'
plugins: '/wp-content/plugins'
mu-plugins: '/wp-content/mu-plugins'
themes: '/wp-content/themes'
uploads: '/wp-content/uploads'
\lucatume\WPBrowser\Module\WPLoader:
skipInstall: true
wpRootFolder: '%WP_CORE_DIR%'
dbName: '%DB_NAME%'
dbHost: '%DB_HOST%'
dbUser: '%DB_USER%'
dbPassword: '%DB_PASSWORD%'
tablePrefix: '%WP_TABLE_PREFIX%'
domain: '%WORDPRESS_DOMAIN%'
adminEmail: '%ADMIN_EMAIL%'
title: 'WooGraphQL Tests'
plugins:
- woocommerce/woocommerce.php
- woocommerce-gateway-stripe/woocommerce-gateway-stripe.php
- wp-graphql/wp-graphql.php
- wp-graphql-jwt-authentication/wp-graphql-jwt-authentication.php
- wp-graphql-woocommerce/wp-graphql-woocommerce.php
activatePlugins:
- woocommerce/woocommerce.php
- woocommerce-gateway-stripe/woocommerce-gateway-stripe.php
- wp-graphql/wp-graphql.php
- wp-graphql-jwt-authentication/wp-graphql-jwt-authentication.php
- wp-graphql-woocommerce/wp-graphql-woocommerce.php
configFile: 'tests/_data/config.php'


Loading

0 comments on commit bb5891e

Please sign in to comment.