Comment 2 for bug 1747795

Revision history for this message
Steven (stevens-q) wrote :

I ran the following Behat test manually

Environment tested: Master
Browser tested: Chrome

===================
Behat Test Script
===================

@javascript @core @core_institution @core_artefact
Feature: Leap2a import locks
    As an Institution admin
    I want to lock fields
    So that institution fields will not change when users upload Leap2a portfolios

Background:
Given the following "institutions" exist:
    | name | displayname | registerallowed | registerconfirm |
    | InstA | Institution A | ON | OFF |

And the following "FionaFang.xml" file exist

And the following "institution_locked_profile_field" exist
    | name | locked |
    | firstname | on |
    | student ID | on |

And the following "users" exist:
    | username | password | email | firstname | lastname | institution | authname | role |
    | UserA | Kupuhipa1 | <email address hidden> | Angela | User | Institution A | internal | member |

Scenario: user imports Leap2a file but some fields are locked
    Given I log in as "UserA" with password "Kupuhipa1"
    And I am on "/import/index.php"
    When I attach the file "UserA.xml" to "Upload Leap2A file"
    And I click on "Import"
    Then I should see "Choose the way to import your portfolio items"
    When I expand "About me" node
    Then I should see "Ignore" in the block "First name"
    And I should see "Ignore" in the block "student ID"
    And I should see "Ignore" in the block "Last name"
    And I should see "Replace" in the block "Last name"
    And I should see "Append" in the block "Last name"
    And I should see "Ignore" in the block "Display name"
    And I should see "Replace" in the block "Display name"
    And I should see "Append" in the block "Display name"

Catalyst QA Approved ✔