-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update save sign out integrartion tests
- Loading branch information
1 parent
2edb55f
commit efa62a7
Showing
3 changed files
with
58 additions
and
65 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 |
---|---|---|
|
@@ -8,7 +8,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: PROJECT VERSION\n" | ||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" | ||
"POT-Creation-Date: 2020-06-03 09:10+0100\n" | ||
"POT-Creation-Date: 2020-06-09 13:22+0100\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|
@@ -584,12 +584,12 @@ msgstr "" | |
msgid "Save and sign out" | ||
msgstr "" | ||
|
||
#: templates/layouts/configs/_save-sign-out-button.html:18 | ||
msgid "Sign out" | ||
#: templates/layouts/configs/_save-sign-out-button.html:7 | ||
msgid "Save and complete later" | ||
msgstr "" | ||
|
||
#: templates/layouts/configs/_save-sign-out-button.html:32 | ||
msgid "Save and complete later" | ||
#: templates/layouts/configs/_save-sign-out-button.html:24 | ||
msgid "Sign out" | ||
msgstr "" | ||
|
||
#: templates/partials/answer-guidance.html:13 | ||
|
@@ -607,23 +607,23 @@ msgid "" | |
" of the section</a>" | ||
msgstr "" | ||
|
||
#: templates/partials/question.html:39 | ||
#: templates/partials/question.html:48 | ||
msgid "Selecting this will clear your answer" | ||
msgstr "" | ||
|
||
#: templates/partials/question.html:40 | ||
#: templates/partials/question.html:49 | ||
msgid "cleared" | ||
msgstr "" | ||
|
||
#: templates/partials/question.html:43 | ||
#: templates/partials/question.html:52 | ||
msgid "Selecting this will deselect any selected options" | ||
msgstr "" | ||
|
||
#: templates/partials/question.html:44 templates/partials/question.html:52 | ||
#: templates/partials/question.html:53 templates/partials/question.html:61 | ||
msgid "deselected" | ||
msgstr "" | ||
|
||
#: templates/partials/question.html:48 | ||
#: templates/partials/question.html:57 | ||
msgid "Or" | ||
msgstr "" | ||
|
||
|
55 changes: 0 additions & 55 deletions
55
tests/integration/questionnaire/test_questionnaire_save_sign_out.py
This file was deleted.
Oops, something went wrong.
48 changes: 48 additions & 0 deletions
48
tests/integration/questionnaire/test_questionnaire_sign_out.py
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
from tests.integration.integration_test_case import IntegrationTestCase | ||
|
||
|
||
class TestSignOut(IntegrationTestCase): | ||
def test_sign_out_not_signed_in_redirects_to_signed_out_page(self): | ||
self.get("/sign-out") | ||
self.assertInUrl("/signed-out") | ||
|
||
def test_sign_out_without_log_out_url_redirects_to_signed_out_page(self): | ||
self.launchSurvey("test_textfield") | ||
self.get("/sign-out") | ||
self.assertInUrl("/signed-out") | ||
|
||
def test_sign_out_with_log_out_url_redirects_to_log_out_url(self): | ||
self.launchSurvey( | ||
"test_textfield", | ||
account_service_log_out_url="https://localhost/logout", | ||
) | ||
self.get("/sign-out") | ||
self.assertInUrl("/logout") | ||
|
||
def test_sign_out_after_navigating_backwards(self): | ||
# If a user completes a block, then goes back and signs out, on re-authentication | ||
# they should resume on the first incomplete location | ||
self.launchSurvey("test_textfield") | ||
self.post({"name-answer": "Joe Bloggs"}) | ||
|
||
# Go back to the first page | ||
self.get("/questionnaire/name-block") | ||
|
||
self.get("/sign-out") | ||
self.launchSurvey("test_textfield") | ||
|
||
# Check we are on the second page | ||
self.assertEqual("/questionnaire/summary", self.last_url) | ||
|
||
def test_sign_out_on_section_summary(self): | ||
# If a user completes a section and signs out on the section summary, | ||
# on re-authentication they should resume at the start of the next section | ||
self.launchSurvey("test_section_summary", display_address="test address") | ||
self.post({"insurance-type-answer": "Both"}) | ||
self.post({"insurance-address-answer": "Address"}) | ||
|
||
self.get("/sign-out") | ||
self.launchSurvey("test_section_summary", display_address="test address") | ||
|
||
# Check we are at the start of the next section | ||
self.assertInUrl("/questionnaire/house-type/") |