Skip to content

Commit

Permalink
made e2e docx test faster
Browse files Browse the repository at this point in the history
  • Loading branch information
omehes committed Sep 24, 2024
1 parent 71b1e21 commit 9845918
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions backend/app/tests/ui/test_e2e_docx_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,11 @@ def test_e2e_docx_jobs(chrome_page_slow, corgi_base_url, repo, book):

# THEN: A new job is queued and verified
home.wait_for_job_created(current_job_id)
home.wait_for_job_status(JobStatus.COMPLETED)
home.wait_for_job_status(JobStatus.PROCESSING)

if home.queued_job_type == "Docx (git)":
with chrome_page_slow.expect_download() as download_info:
home.click_job_type_icon()
home.click_job_id()

download = download_info.value
assert repo in home.job_id_dialog_title.inner_text()
assert "Docx (git)" in home.job_id_dialog_title.inner_text()

assert "zip" in download.url

assert repo and book in download.url

download.save_as("docx.zip")

assert os.path.getsize("docx.zip") > 0

else:
pytest.fail(
"No new job was queued. Last job is at "
+ home.elapsed_time.inner_text()
)
home.click_abort_button()

0 comments on commit 9845918

Please sign in to comment.