HEX
Server: Apache
System: Linux webm010.cluster103.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: iestorre (46869)
PHP: 8.0.30
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/i/e/s/iestorre/moodleAW/moodle03/blocks/login/tests/behat/login_block.feature
@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     | student1@asd.com |
    And I log in as "admin"
    And I follow "Turn editing on"
    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 "testpass"
    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