<commit_before>Feature: Roles

  Use a [role] [1] whenever you want to group actions that are specific to a
  certain kind of user, or to a user performing tasks in a certain context.

  For example, if you have an app with a public area, an area that is specific
  to registered users and an area that is specific to admins, then you may have
  3 different roles: visitor, user and admin. But you may want to sub-divide
  these roles even further: a user that is managing their account performs a
  different set of tasks than does a user that is shopping.

  [1]: https://github.com/mojotech/dill/blob/master/lib/dill/role.rb

  Scenario: Defining a role

    You declare a role by inheriting from `Dill::Role`:

    Given the following role definition:
      """
      class Gardener < Dill::Role; end
      """
    Then we can use the role as we do any other Ruby object:
      """
      Gardener.new
      """

  @javascript
  Scenario: Roles group actions

    We said above that roles group actions. Usually those actions involve the
    following:

    1. Visiting a certain path.
    2. Interacting with a number of widgets.

    Given the following HTML at the path "/garden":<commit_msg>[tests] Clarify role scenario even more.<commit_after>Feature: Roles

  Use a [role] [1] whenever you want to group actions that are specific to a
  certain kind of user, or to a user performing tasks in a certain context.

  For example, if you have an app with a public area, an area that is specific
  to registered users and an area that is specific to admins, then you may have
  3 different roles: visitor, user and admin. But you may want to sub-divide
  these roles even further: a user that is managing their account performs a
  different set of tasks than does a user that is shopping.

  [1]: https://github.com/mojotech/dill/blob/master/lib/dill/role.rb

  Scenario: Defining a role

    You declare a role by inheriting from `Dill::Role`:

    Given the following role definition:
      """
      class Gardener < Dill::Role; end
      """
    Then we can use the role as we do any other Ruby object:
      """
      Gardener.new
      """

  @javascript
  Scenario: Roles group actions

    We said above that roles group actions. Usually those actions involve the
    following:

    1. Visiting a certain path (or more). Use `visit` and pass it a path, just
       like with Capybara. You can use Rails path helpers inside role actions.

    2. Interacting with a widget (or more). These widgets can be defined [inside
       the role] [2], or outside (below).

    [2]: #declaring-a-role-specific-widget

    Given the following HTML at the path "/garden":
{'fraction_non_alphanumeric': 0.06362275449101797, 'fraction_numerical': 0.004491017964071856, 'mean_word_length': 2.9895522388059703, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6236666', 'n_tokens_mistral': 746, 'n_tokens_neox': 715, 'n_words': 388}