| @@ -53,8 +53,12 @@ | ||
| 53 | 53 | # The above will only run the SettingsPage test. |
| 54 | 54 | |
| 55 | 55 | # Run all multisite integration tests. |
| 56 | 56 | composer testwp-ms |
| 57 | + | |
| 58 | +# Run with coverage. | |
| 59 | +composer coveragewp | |
| 60 | +composer coveragewp -- --filter SettingsPageTest | |
| 57 | 61 | ``` |
| 58 | 62 | |
| 59 | 63 | ### Troubleshooting |
| 60 | 64 | - If you encounter any `require` (class not found) issues, you can usually fix them by running `composer dump-autoload`. |
| @@ -106,8 +110,9 @@ | ||
| 106 | 110 | - Run the tests: |
| 107 | 111 | - To run all E2E tests: `npm run test:e2e`. |
| 108 | 112 | - To run a specific test: `npm run test:e2e activation-flow.spec.js`. |
| 109 | 113 | - For debugging purposes, you might want to run tests visually: `npm run test:e2e:debug`. |
| 114 | + - By default, the tests run against the wp-env tests site, on the port set by `WP_ENV_TESTS_PORT` or `.wp-env.override.json` (8889 otherwise). To target another site, set `WP_BASE_URL`, for example `WP_BASE_URL=http://localhost:8080 npm run test:e2e`. | |
| 110 | 115 | - Finish: |
| 111 | 116 | - When you're finished testing, the WordPress environment can be stopped using `npm run dev:stop`. |
| 112 | 117 | |
| 113 | 118 | ### Automated E2E testing |
| @@ -121,11 +126,11 @@ | ||
| 121 | 126 | - Disable and re-enable the plugin |
| 122 | 127 | - Visit the settings page and click on the tabs |
| 123 | 128 | - Update a setting using the settings page |
| 124 | 129 | - Try to save an invalid Site ID and API Secret combination |
| 125 | -- Try the Content Helper Widget and Sidebar with: | |
| 130 | +- Try the Content Intelligence Widget and Sidebar with: | |
| 126 | 131 | - An empty API Secret |
| 127 | 132 | - No Site ID |
| 128 | -- Check that The Content Helper Post List Stats appears | |
| 133 | +- Check that The Content Intelligence Post List Stats appears | |
| 129 | 134 | - Check that "ld+json" and "parsely-cfg" are injected into the front-end |
| 130 | 135 | |
| 131 | 136 | This list is currently a work in progress. |