Skip to content

Commit 3bc8038

Browse files
author
Kyle McGonagle
committed
Add test for type ag without extension in path.
1 parent 44e99a7 commit 3bc8038

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/async/test_screenshot.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async def test_should_infer_screenshot_type_from_path(
7171
output_png_file = tmp_path / "foo"
7272
await page.screenshot(path=output_png_file)
7373
assert_image_file_format(output_png_file, "PNG")
74-
74+
7575

7676
async def test_should_screenshot_with_type_argument(page: Page, tmp_path: Path) -> None:
7777
output_jpeg_with_png_extension = tmp_path / "foo_jpeg.png"
@@ -81,3 +81,7 @@ async def test_should_screenshot_with_type_argument(page: Page, tmp_path: Path)
8181
output_png_with_jpeg_extension = tmp_path / "bar_png.jpeg"
8282
await page.screenshot(path=output_png_with_jpeg_extension, type="png")
8383
assert_image_file_format(output_png_with_jpeg_extension, "PNG")
84+
85+
output_png_with_jpeg_extension = tmp_path / "bar_jpeg"
86+
await page.screenshot(path=output_png_with_jpeg_extension, type="jpeg")
87+
assert_image_file_format(output_png_with_jpeg_extension, "JPEG")

0 commit comments

Comments
 (0)