Skip to content

Commit

Permalink
feat(reset-script): delete test users, set site title
Browse files Browse the repository at this point in the history
  • Loading branch information
adekbadek committed Oct 25, 2024
1 parent cee3f6e commit 3515249
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
## Setting up a test site (CI or local)

1. On the test site, install and activate `newspack-plugin` and run `wp newspack setup`.
2. Install and activate also `woocommerce-gateway-stripe` and `woocommerce-subscriptions` plugins.
3. Configure the Stripe gateway to use the WC Connect Stripe gateway version (*not* the "Legacy checkout experience").
1. Install and activate also `woocommerce-gateway-stripe` and `woocommerce-subscriptions` plugins.
1. Configure the Stripe gateway to use the WC Connect Stripe gateway version (*not* the "Legacy checkout experience").

## Local setup & testing

Expand Down
8 changes: 8 additions & 0 deletions e2e-reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ echo ""
echo "Removing saved emails…"
wp --allow-root --skip-plugins --skip-themes post delete $(wp --allow-root --skip-plugins --skip-themes post list --post_type=email_log --format=ids) --force || true

echo ""
echo "Removing test users…"
wp --allow-root --skip-plugins --skip-themes user delete $(wp --allow-root --skip-plugins --skip-themes user list --field=ID | grep -v 1) --yes || true

echo ""
echo "Setting the site title…"
wp --allow-root --skip-plugins --skip-themes option update blogname "The Daily Test"

echo ""
echo "Selective resetting for E2E tests…"

Expand Down

0 comments on commit 3515249

Please sign in to comment.