|
1 |
| -import os |
2 |
| -import pytest |
3 |
| -from dendrite.async_api._core.dendrite_browser import AsyncDendrite |
| 1 | +# import os |
| 2 | +# import pytest |
| 3 | +# from dendrite.async_api._core.dendrite_browser import AsyncDendrite |
4 | 4 |
|
5 | 5 |
|
6 |
| -@pytest.mark.asyncio(loop_scope="session") |
7 |
| -async def test_download(browserbase: AsyncDendrite, tmp_path): |
8 |
| - page = await browserbase.goto( |
9 |
| - "https://browser-tests-alpha.vercel.app/api/download-test" |
10 |
| - ) |
11 |
| - await page.playwright_page.get_by_text("Download File").click() |
12 |
| - dw = await page.get_download(timeout=5000) |
| 6 | +# @pytest.mark.asyncio(loop_scope="session") |
| 7 | +# async def test_download(browserbase: AsyncDendrite, tmp_path): |
| 8 | +# page = await browserbase.goto( |
| 9 | +# "https://browser-tests-alpha.vercel.app/api/download-test" |
| 10 | +# ) |
| 11 | +# await page.playwright_page.get_by_text("Download File").click() |
| 12 | +# dw = await page.get_download(timeout=5000) |
13 | 13 |
|
14 |
| - # Save the downloaded file to the suggested location |
15 |
| - download_path = tmp_path / dw.suggested_filename |
16 |
| - await dw.save_as(download_path) |
| 14 | +# # Save the downloaded file to the suggested location |
| 15 | +# download_path = tmp_path / dw.suggested_filename |
| 16 | +# await dw.save_as(download_path) |
17 | 17 |
|
18 |
| - # Assertion: Verify that the file was downloaded successfully |
19 |
| - assert ( |
20 |
| - download_path.exists() |
21 |
| - ), f"Expected downloaded file at {download_path}, but it does not exist." |
22 |
| - assert ( |
23 |
| - os.path.getsize(download_path) > 0 |
24 |
| - ), f"Expected non-empty file at {download_path}, but file size is zero." |
| 18 | +# # Assertion: Verify that the file was downloaded successfully |
| 19 | +# assert ( |
| 20 | +# download_path.exists() |
| 21 | +# ), f"Expected downloaded file at {download_path}, but it does not exist." |
| 22 | +# assert ( |
| 23 | +# os.path.getsize(download_path) > 0 |
| 24 | +# ), f"Expected non-empty file at {download_path}, but file size is zero." |
0 commit comments