<commit_before><commit_msg>MDL-45266 behat: tests for login block<commit_after>@block @block_login
Feature: Login from a block
    In order to make it easier to login
    As an user
    In need to login through a block

  Background:
    Given the following "users" exist:
      | username | password | firstname | lastname | email |
      | testuser | testpass | Test      | User     | <EMAIL> |
    And I log in as "admin"
    And I navigate to "Turn editing on" node in "Front page settings"
    And I add the "Login" block

  Scenario: Login block visible to non-logged in users
    Given I log out
    When I am on homepage
    Then "Login" "block" should exist

  Scenario: Login as student through login block
    Given I log out
    And I am on homepage
    When I set the field "Username" to "testuser"
    And I set the field "Password" to "<PASSWORD>"
    And I click on "Log in" "button" in the "Login" "block"
    Then I should see "You are logged in as Test User"
    And "Login" "block" should not exist

{'fraction_non_alphanumeric': 0.06673209028459273, 'fraction_numerical': 0.004906771344455349, 'mean_word_length': 2.849056603773585, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '4322612', 'n_tokens_mistral': 300, 'n_tokens_neox': 292, 'n_words': 152}