Code review feedback

This commit is contained in:
Greg 2021-08-16 08:18:18 -06:00
parent ad9cc5fb90
commit 0161dd1a95
2 changed files with 19 additions and 3 deletions

View File

@ -1,12 +1,13 @@
# Unreleased
- `updateReadyPageStatus` utility to update the status of the ready page
- Added plugin upload functionality util that provides a method to pull a plugin zip from a remote location
- `updateReadyPageStatus` utility to update the status of the ready page.
- Added plugin upload functionality util that provides a method to pull a plugin zip from a remote location:
- `getRemotePluginZip( fileUrl )` to get the remote zip. Returns the filepath of the zip location.
- Added plugin zip utility functions:
- `checkNestedZip( zipFilePath, savePath )` checks a plugin zip file for any nested zip files. If one is found, it is extracted. Returns the path where the zip file is located.
- `downloadZip( fileUrl, downloadPath )` downloads a plugin zip file from a remote location to the provided path.
- Added `getLatestReleaseZipUrl( owner, repository, getPrerelease, perPage )` util function to get the latest release zip from a GitHub repository
- Added `getLatestReleaseZipUrl( owner, repository, getPrerelease, perPage )` util function to get the latest release zip from a GitHub repository.
- Added `DEFAULT_TIMEOUT_OVERRIDE` that allows passing in a time in milliseconds to override the default Jest and Puppeteer timeouts.
# 0.2.2

View File

@ -87,6 +87,21 @@ await takeScreenshotFor( 'name of current step' );
Screenshots will be saved to `tests/e2e/screenshots`. This folder is cleared at the beginning of each test run.
### Override default test timeout
To override the default timeout for the tests, you can use the `DEFAULT_TIMEOUT_OVERRIDE` flag and pass in a maximum timeout in milliseconds. For example, you can pass it in when running the tests from the command line:
```bash
DEFAULT_TIMEOUT_OVERRIDE=35000 npx wc-e2e test:e2e
```
This value will override the default Jest timeout as well as pass the timeout to the following Puppeteer methods:
* page.setDefaultTimeout();
* page.setDefaultNavigationTimeout();
For a list of the methods that the above timeout affects, please see the Puppeteer documentation for [`page.setDefaultTimeout()`](https://pptr.dev/#?product=Puppeteer&version=v10.2.0&show=api-pagesetdefaulttimeouttimeout) and [`page.setDefaultNavigationTimeout`](https://pptr.dev/#?product=Puppeteer&version=v10.2.0&show=api-pagesetdefaultnavigationtimeouttimeout) for more information.
### Jest Puppeteer Config
The test sequencer uses the following default Puppeteer configuration: