diff --git a/acceptance-tests/src/test/java/uk/gov/di/test/step_definitions/AccountManagementStepDef.java b/acceptance-tests/src/test/java/uk/gov/di/test/step_definitions/AccountManagementStepDef.java deleted file mode 100644 index 166e6f0b..00000000 --- a/acceptance-tests/src/test/java/uk/gov/di/test/step_definitions/AccountManagementStepDef.java +++ /dev/null @@ -1,39 +0,0 @@ -package uk.gov.di.test.step_definitions; - -import io.cucumber.java.en.When; -import org.hamcrest.Matchers; -import org.json.JSONObject; -import uk.gov.di.test.pages.BasePage; -import uk.gov.di.test.pages.StubUserInfoPage; - -import java.util.Map; - -import static io.restassured.RestAssured.given; -import static uk.gov.di.test.utils.Constants.NON_EXISTENT_EMAIL; - -public class AccountManagementStepDef extends BasePage { - StubUserInfoPage stubUserInfoPage = StubUserInfoPage.getStubUserInfoPage(); - - @When( - "the Account Management Update Password API is called with an email address that does not exist, an error is returned") - public void theUserIsReturnedToTheService() { - JSONObject obj = new JSONObject(stubUserInfoPage.getAccessToken()); - String bearerJWT = obj.getString("access_token"); - String bearerToken = "Bearer ".concat(bearerJWT); - - String body = - "{\n \"email\":\"" - + NON_EXISTENT_EMAIL - + "\",\n" - + " \"newPassword\":\"testPassword123!\"\n" - + "}"; - given().headers(Map.of("Authorization", bearerToken)) - .body(body) - .when() - .post(TEST_CONFIG_SERVICE.get("INTERNAL_AM_API").concat("/update-password")) - .then() - .statusCode(400) - .body("code", Matchers.is(1010)) - .body("message", Matchers.is("An account with this email address does not exist")); - } -} diff --git a/acceptance-tests/src/test/java/uk/gov/di/test/step_definitions/DocAppStepDef.java b/acceptance-tests/src/test/java/uk/gov/di/test/step_definitions/DocAppStepDef.java deleted file mode 100644 index b3760b73..00000000 --- a/acceptance-tests/src/test/java/uk/gov/di/test/step_definitions/DocAppStepDef.java +++ /dev/null @@ -1,51 +0,0 @@ -package uk.gov.di.test.step_definitions; - -import io.cucumber.java.en.And; -import io.cucumber.java.en.Given; -import io.cucumber.java.en.Then; -import io.cucumber.java.en.When; -import uk.gov.di.test.pages.BasePage; -import uk.gov.di.test.pages.DocAppPage; -import uk.gov.di.test.utils.Driver; - -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class DocAppStepDef extends BasePage { - - private String jsonPayLoad; - public DocAppPage docAppPage = new DocAppPage(); - protected static final String DOC_APP_URL = - TEST_CONFIG_SERVICE.getOrDefault( - "DOC_APP_URL", "https://doc-app-rp-build.build.stubs.account.gov.uk/"); - - @Given("the doc app services are running") - public void theDocAppServicesAreRunning() { - // deliberately empty - } - - @When("the user visits the doc app relying party") - public void theUserVisitsTheDocAppRelyingParty() { - Driver.get().get(DOC_APP_URL.toString()); - } - - @And("the user sends a valid json payload") - public void theUserSendsAValidJsonPayload() { - jsonPayLoad = "{\"test\" : \"example\"}"; - docAppPage.enterPayLoad(jsonPayLoad); - docAppPage.clickSubmitButton(); - } - - @Then("the user is taken to the user information page") - public void theUserIsTakenToTheUserInformationPage() { - waitForPageLoad("Example - GOV.UK - User Info"); - assertTrue( - Driver.get().getCurrentUrl().contains("/oidc/authorization-code/callback?code=")); - assertTrue(docAppPage.docAppCredentialsDisplayed()); - assertTrue(docAppPage.idTokenDisplayed()); - } - - @When("the user clicks the My Account link") - public void theUserClicksTheMyAccountLink() { - docAppPage.accountLinkClick(); - } -} diff --git a/acceptance-tests/src/test/resources/uk/gov/di/test/features/005_auth_app_2fa_journey.feature b/acceptance-tests/src/test/resources/uk/gov/di/test/features/005_auth_app_2fa_journey.feature index 8c6dff43..c0a6d2d3 100644 --- a/acceptance-tests/src/test/resources/uk/gov/di/test/features/005_auth_app_2fa_journey.feature +++ b/acceptance-tests/src/test/resources/uk/gov/di/test/features/005_auth_app_2fa_journey.feature @@ -1,8 +1,8 @@ -@AuthApp2FA @build @staging @build-sp @staging-sp +@AuthApp2FA @build @staging @build-sp @staging-sp @dev Feature: Authentication App Journeys New user creates an account and logs in using an auth app - @dev + Scenario: User successfully registers with auth app 2FA and login with 2fa-on Given a user does not yet exist When the user comes from the stub relying party with option 2fa-off and is taken to the "Create your GOV.UK One Login or sign in" page @@ -34,7 +34,7 @@ Feature: Authentication App Journeys When the user enters the security code from the auth app Then the user is returned to the service - @dev + Scenario: User successfully login without 2FA Given a user with App MFA exists When the user comes from the stub relying party with option 2fa-off and is taken to the "Create your GOV.UK One Login or sign in" page diff --git a/acceptance-tests/src/test/resources/uk/gov/di/test/features/010_existing_user_journey.feature b/acceptance-tests/src/test/resources/uk/gov/di/test/features/010_existing_user_journey.feature index 0992f858..549f7873 100644 --- a/acceptance-tests/src/test/resources/uk/gov/di/test/features/010_existing_user_journey.feature +++ b/acceptance-tests/src/test/resources/uk/gov/di/test/features/010_existing_user_journey.feature @@ -1,8 +1,7 @@ -@Existing @build @staging @build-sp @staging-sp +@Existing @build @staging @build-sp @staging-sp @dev Feature: Login Journey Existing user walks through a login journey - @dev Scenario: Existing user tries to create an account with the same email address Given a user exists When the user comes from the stub relying party with default options and is taken to the "Create your GOV.UK One Login or sign in" page @@ -11,7 +10,6 @@ Feature: Login Journey When the user enters their email address Then the user is taken to the "You have a GOV.UK One Login" page - @dev Scenario: Existing user is correctly prompted to login using sms Given a user with SMS MFA exists When the user comes from the stub relying party with default options and is taken to the "Create your GOV.UK One Login or sign in" page @@ -24,7 +22,6 @@ Feature: Login Journey When the user enters the six digit security code from their phone Then the user is returned to the service - @dev Scenario: Existing user switches content to Welsh Given a user exists When the user comes from the stub relying party with default options and is taken to the "Create your GOV.UK One Login or sign in" page diff --git a/acceptance-tests/src/test/resources/uk/gov/di/test/features/025_doc_app_journey.featureZZZ b/acceptance-tests/src/test/resources/uk/gov/di/test/features/025_doc_app_journey.featureZZZ deleted file mode 100644 index 34dbe92e..00000000 --- a/acceptance-tests/src/test/resources/uk/gov/di/test/features/025_doc_app_journey.featureZZZ +++ /dev/null @@ -1,10 +0,0 @@ -@Doc @build -Feature: Doc app journey - User can perform a Doc app journey - - Scenario: User completes a Doc app journey successfully - Given the user visits the doc app relying party - And the user clicks the continue button - And the user sends a valid json payload - Then the user is taken to the user information page - And the user clicks the My Account link diff --git a/acceptance-tests/src/test/resources/uk/gov/di/test/features/Account_management_apis.featureZZZ b/acceptance-tests/src/test/resources/uk/gov/di/test/features/Account_management_apis.featureZZZ deleted file mode 100644 index 99624cdb..00000000 --- a/acceptance-tests/src/test/resources/uk/gov/di/test/features/Account_management_apis.featureZZZ +++ /dev/null @@ -1,15 +0,0 @@ -@AccountManagement @build @staging - Feature: Account Management - Scenario: Account Management API throws "An account with this email address does not exist" when a user sends an unregistered email to the API, after signing in - Given a user with SMS MFA exists - When the user comes from the stub relying party with option scopes-account-management and is taken to the "Create your GOV.UK One Login or sign in" page - When the user selects sign in - Then the user is taken to the "Enter your email" page - When the user enters their email address - Then the user is taken to the "Enter your password" page - When the user enters their password - Then the user is taken to the "Check your phone" page - When the user enters the six digit security code from their phone - Then the user is returned to the service - When the Account Management Update Password API is called with an email address that does not exist, an error is returned - Then the user clicks logout diff --git a/acceptance-tests/src/test/resources/uk/gov/di/test/features/Mfa_reset.feature b/acceptance-tests/src/test/resources/uk/gov/di/test/features/Mfa_reset.feature index 8b1b3c53..c087f1af 100644 --- a/acceptance-tests/src/test/resources/uk/gov/di/test/features/Mfa_reset.feature +++ b/acceptance-tests/src/test/resources/uk/gov/di/test/features/Mfa_reset.feature @@ -1,4 +1,4 @@ -@mfa-reset +@mfa-reset @under-development @dev #https://govukverify.atlassian.net/browse/AUT-3825 @@ -88,8 +88,8 @@ Feature: The MFA reset process. Then the user is returned to the service - # ************************* Negative tests when for unsuccessful IPV responses ********************** +@AUT-3826 Scenario Outline: Mfa User choose to reset their MFA but are unsuccessful in identity verification Given a user with "" MFA exists When the user comes from the stub relying party with default options and is taken to the "Create your GOV.UK One Login or sign in" page @@ -101,10 +101,10 @@ Feature: The MFA reset process. Then the user is taken to the IPV stub page When "" radio option selected And the user clicks the continue button - Then the user is taken to the "There’s a problem with this service" page + Then the user is taken to the "" page Examples: - | Mfa Type | Link Text | IPV Response | - | App | I do not have access to the authenticator app | No identity available | - | SMS | Problems with the code? | Identity check incomplete | - | App | I do not have access to the authenticator app | Identity check failed | - | SMS | Problems with the code? | Identity did not match | + | Mfa Type | Link Text | IPV Response | Title | + | App | I do not have access to the authenticator app | No identity available | You cannot change how you get security codes | + | SMS | Problems with the code? | Identity check incomplete | You cannot change how you get security codes | + | App | I do not have access to the authenticator app | Identity check failed | There’s a problem with this service | + | SMS | Problems with the code? | Identity did not match | There’s a problem with this service |