diff --git a/core/modules/user/src/Tests/UserRoleActionsTest.php b/core/modules/user/src/Tests/UserRoleActionsTest.php
new file mode 100644
index 0000000..05434bc
--- /dev/null
+++ b/core/modules/user/src/Tests/UserRoleActionsTest.php
@@ -0,0 +1,61 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\user\Tests\UserRoleActionsTest.
+ */
+
+namespace Drupal\user\Tests;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests editing actions auto-created for roles.
+ *
+ * @group user
+ */
+class UserRoleActionsTest extends WebTestBase {
+
+  /**
+   * User with admin privileges.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $adminUser;
+
+  /**
+   * Modules to enable.
+   *
+   * @var string[]
+   */
+  public static $modules = ['action'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    $this->adminUser = $this->drupalCreateUser(array('administer permissions', 'administer users', 'administer actions'));
+  }
+
+  /**
+   * Test editing actions added by user_user_role_insert().
+   */
+  function testRoleActionAdministration() {
+    $this->drupalLogin($this->adminUser);
+
+    // Add a role
+    $role_name = 'action_test';
+    $edit = array('label' => $role_name, 'id' => $role_name);
+    $this->drupalPostForm('admin/people/roles/add', $edit, t('Save'));
+
+    // Edit the corresponding action.
+    $edit = [
+      'label' => 'A new label for the action_text add role action'
+    ];
+    $this->drupalPostForm('/admin/config/system/actions/configure/user_add_role_action.action_test', $edit, t('Save'));
+    $this->assertNoText('The machine-readable name must contain only lowercase letters, numbers, and underscores.');
+    $this->assertText('The action has been successfully saved.');
+  }
+
+}
