Skip to content

Commit 4cc595f

Browse files
Start of integration tests
1 parent 4f4cfee commit 4cc595f

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

test/integration/conversion.spec.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,28 @@ test.describe('conversion', () => {
1515
await setAPIKey(page, 'AVIF123');
1616
await enableCompressionSizes(page, [], true);
1717
await setCompressionTiming(page, 'auto');
18-
await setConversionSettings(page, {
19-
replace: false,
20-
convert: true,
21-
})
2218
});
2319

2420
test.afterAll(async () => {
2521
await page.close();
2622
});
2723

2824
test('will add the optimized format to the original image', async () => {
25+
await setConversionSettings(page, {
26+
replace: false,
27+
convert: true,
28+
});
29+
await uploadMedia(page, 'input-example.jpg');
2930

31+
await clearMediaLibrary(page);
3032
});
3133

3234
test('will replace the original image with the optimized image', async () => {
35+
await setConversionSettings(page, {
36+
replace: true,
37+
convert: true,
38+
});
3339
await uploadMedia(page, 'input-example.jpg');
34-
3540
});
3641

3742
test('will display the optimized image on a page', async () => {});

test/integration/settings.spec.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,14 @@ test.describe('settings', () => {
214214
await expect(page.locator('#tinypng_resize_original_height')).toHaveValue('345');
215215
});
216216

217+
test('will not convert by default', async () => {
218+
219+
});
220+
221+
test('cannot have replace true while convert is false', async () => {
222+
223+
})
224+
217225
test('will store conversion settings', async () => {
218226
await setConversionSettings(page, {
219227
replace: true,

0 commit comments

Comments
 (0)