Skip to content

Commit 648b0fb

Browse files
Finish up existing integration tests
1 parent e956017 commit 648b0fb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ Got questions or feedback? Let us know! Contact us at support@tinypng.com.
2828

2929
### Running the integration tests
3030
1. Install Docker 1.12 and docker-compose.
31-
2. Run `bin/integration-tests <version>`. E.g. `bin/integration-tests 60`.
31+
2. Install npm dependancies
32+
3. Run `bin/integration-tests <version>`. E.g. `bin/integration-tests 60`.
3233

3334
### Check if the code follows WordPress standard
3435
1. Run `bin/check-style` to make sure there are no errors.

test/integration/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ export async function setOriginalImage(page: Page, settings: OriginalImageSettin
9393

9494
if (settings.resize) {
9595
await page.locator('#tinypng_resize_original_enabled').check({ force: true });
96-
await page.fill('#tinypng_resize_original_width', `${settings.width}`);
97-
await page.fill('#tinypng_resize_original_height', `${settings.height}`);
96+
await page.fill('#tinypng_resize_original_width', settings.width?.toString() || '');
97+
await page.fill('#tinypng_resize_original_height', settings.height?.toString() || '');
9898
} else {
9999
await page.locator('#tinypng_resize_original_enabled').uncheck({ force: true });
100100
}

0 commit comments

Comments
 (0)