-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…hen-pressing-previous [FCL-180] Save user input when pressing previous in licence application form
- Loading branch information
Showing
2 changed files
with
56 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -300,3 +300,37 @@ def get_review_row(page, label): | |
expect(get_review_row(page, "What is the full legal name")).to_have_text( | ||
"New Organisation name" | ||
) | ||
|
||
|
||
def test_data_saved_when_going_back(page: Page): | ||
""" | ||
Test the process to apply for a computational analysis licence. | ||
We stop on the review page (short of actually submitting the form) | ||
(which triggers an email to the licencing team): the final step will be tested | ||
in isolation with a mocked email service.""" | ||
|
||
# Fill contact details in full | ||
page.goto("/re-use-find-case-law-records/steps/contact") | ||
page.get_by_label("Contact Full Name").fill("Full Name") | ||
page.get_by_label("Contact Email address").fill("[email protected]") | ||
page.get_by_label( | ||
"This is a different person (please enter their details below)" | ||
).click() | ||
page.get_by_label("Licence holder Full Name").fill("Licence Holder") | ||
page.get_by_label("Licence holder Email").fill("[email protected]") | ||
|
||
# On the next page, fill only 1 field, leaving others blank | ||
page.get_by_text("Next").click() | ||
page.get_by_label("What is the full legal name of your organisation?").fill( | ||
"Organisation name" | ||
) | ||
|
||
# Check previous page has information | ||
page.get_by_text("Previous").click() | ||
expect(page.get_by_label("Contact Full Name")).to_have_value("Full Name") | ||
|
||
# Check incomplete next page has information | ||
page.get_by_text("Next").click() | ||
expect( | ||
page.get_by_label("What is the full legal name of your organisation?") | ||
).to_have_value("Organisation name") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters