-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1242 from 10up/fix/e2e-tests
Fix cypress tests
- Loading branch information
Showing
6 changed files
with
76 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
npm run env run tests-wordpress "chmod -c ugo+w /var/www/html" | ||
npm run env run tests-cli "wp rewrite structure '/%postname%/' --hard" | ||
wp-env run tests-wordpress chmod -c ugo+w /var/www/html | ||
wp-env run tests-cli wp rewrite structure '/%postname%/' --hard | ||
|
||
status=0 | ||
npm run env run tests-cli "wp site list" || status=$? | ||
wp-env run tests-cli wp site list || status=$? | ||
|
||
if [ $status -eq 0 ] | ||
then | ||
echo "Multisite already initialized" | ||
else | ||
echo "Converting to multisite" | ||
npm run env run tests-cli "wp core multisite-convert --title='Distributor Multisite'" | ||
npm run env run tests-cli "wp user create second '[email protected]' --user_pass=password --role=administrator" | ||
npm run env run tests-cli "wp site create --slug=second --title='Second Site' --email='[email protected]'" | ||
npm run env run tests-cli "wp theme enable twentytwentyone --activate" | ||
npm run env run tests-cli "wp theme enable twentytwentyone --url=localhost/second --activate" | ||
npm run env run tests-cli "cp wp-content/plugins/distributor/tests/cypress/.htaccess .htaccess" | ||
wp-env run tests-cli wp core multisite-convert --title='Distributor Multisite' | ||
wp-env run tests-cli wp user create second '[email protected]' --user_pass=password --role=administrator | ||
wp-env run tests-cli wp site create --slug=second --title='Second Site' --email='[email protected]' | ||
wp-env run tests-cli wp theme enable twentytwentyone --activate | ||
wp-env run tests-cli wp theme enable twentytwentyone --url=localhost/second --activate | ||
wp-env run tests-cli cp wp-content/plugins/distributor/tests/cypress/.htaccess .htaccess | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters