diff --git a/modules/social_features/social_user/social_user.routing.yml b/modules/social_features/social_user/social_user.routing.yml index 0a18fc36ed9..bdbfc49cf81 100644 --- a/modules/social_features/social_user/social_user.routing.yml +++ b/modules/social_features/social_user/social_user.routing.yml @@ -47,3 +47,10 @@ social_user.stream: requirements: _user_is_logged_in: 'TRUE' _custom_access: '\Drupal\social_user\Controller\SocialUserController::accessUsersPages' + +social_user.my_settings: + path: '/my-settings' + defaults: + _controller: '\Drupal\user\Controller\UserController::userEditPage' + requirements: + _user_is_logged_in: 'TRUE' diff --git a/tests/behat/features/capabilities/account/my-settings-page.feature b/tests/behat/features/capabilities/account/my-settings-page.feature new file mode 100644 index 00000000000..923f7561f31 --- /dev/null +++ b/tests/behat/features/capabilities/account/my-settings-page.feature @@ -0,0 +1,12 @@ +@api +Feature: Redirect user to their settings page + Benefit: To make it easier for users to access their settings page + Role: As a Authenticated + Goal/desire: I want to be redirected to "/user/*/edit" when I go to "/my-settings" + + Scenario: A user is redirected to their settings page + Given I am logged in as a user with the "authenticated" role + + When I go to "/my-settings" + + Then the URL should match "^\/user\/[^\/]+\/edit$"