Merge branch 'develop' of https://github.com/tainacan/tainacan into develop
This commit is contained in:
commit
d9f336f895
|
@ -20,3 +20,5 @@ src/admin/scss/.sass-cache
|
|||
src/assets/css/tainacan-admin.css
|
||||
src/assets/css/tainacan-admin.css.map
|
||||
cypress/videos
|
||||
cypress/screenshots
|
||||
.vscode
|
|
@ -1,2 +0,0 @@
|
|||
{
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
if [ $# - lt 2 ]; then
|
||||
echo "usage: $0 [skip-head]"
|
||||
exit 1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SKIP_HEAD=${1-1}
|
||||
|
@ -13,8 +13,9 @@ source build-config.cfg
|
|||
|
||||
plugin_name=`basename $wp_plugin_dir`
|
||||
test_db_prefix='wptests_'
|
||||
cy_record_key='a15e6599-d240-4d98-b582-dea93a3008c0'
|
||||
|
||||
################## set up cypress environment
|
||||
################# set up cypress environment
|
||||
# replace table prefix in wp_config
|
||||
echo "Changing DB prefix in wp_config..."
|
||||
sed -i s/"require_once(ABSPATH . 'wp-settings.php');"/"\$table_prefix = '$test_db_prefix';\nrequire_once(ABSPATH . 'wp-settings.php');"/ $wp_base_dir/wp-config.php
|
||||
|
@ -33,17 +34,18 @@ cd -
|
|||
# cypress beginning
|
||||
if [ ${SKIP_HEAD} = "0" ]
|
||||
then
|
||||
./node_modules/.bin/cypress run --config baseUrl=$wp_url
|
||||
./node_modules/.bin/cypress run --config baseUrl=$wp_url --record --key $cy_record_key
|
||||
else
|
||||
./node_modules/.bin/cypress open --config baseUrl=$wp_url
|
||||
./node_modules/.bin/cypress open --config baseUrl=$wp_url
|
||||
fi
|
||||
|
||||
################## teardown cypress environment
|
||||
# remove WordPress
|
||||
echo "Removing WordPress..."
|
||||
cd $wp_base_dir
|
||||
cd $wp_base_dir/
|
||||
wp db query "DROP TABLES $(wp db tables | paste -s -d, -);"
|
||||
|
||||
# recover table prefix in wp_config
|
||||
echo "Restoring DB prefix in wp_config..."
|
||||
sed -i s/"\$table_prefix = '$test_db_prefix';"/""/ $wp_base_dir/wp-config.php
|
||||
sed -i s/"\$table_prefix = '$test_db_prefix';"/test/ $wp_base_dir/wp-config.php
|
||||
sed -i '/test/d' $wp_base_dir/wp-config.php
|
||||
|
|
Loading…
Reference in New Issue