GSA-TTS / usagov-benefits-eligibility

Benefits eligibility estimator tool for USAGov.
22 stars 5 forks source link

e2e test stub "Print Task" #846

Closed scottqueen-bixal closed 1 year ago

scottqueen-bixal commented 1 year ago

Description

It was noted in the README.md that:

The current print philosophy is that print is a different artifact than a web page, be sure to test printing after any website changes.

Please include a new test that confirms this integration as part of our e2e automation tests.

current behavior

https://github.com/GSA/usagov-benefits-eligibility/assets/37077057/e8f83223-3d45-4f61-8c3c-3cfb0cfaad8e

User Story

Architectural Decision Records (ADRs)

Note:

Given when we utilize cypress to trigger printing, a browser window pops up and the test will remain stuck until a user interacts with the window to close it, this test will stub the call to print and include an assertion to validate that printing was called once. To avoid opening print dialogue which makes the test stuck, we can stub the window.print method before the application calls it.

scottqueen-bixal commented 1 year ago

Here is a comprehensive approach to testing PDF in cypress https://filiphric.com/testing-pdf-file-with-cypress - do you think this will help us implement this test?

scottqueen-bixal commented 1 year ago

@nehemiah-abuga this work seems to be taking a bit longer than our initial estimate, please update LOE