MDL-62026 tool_dataprivacy: Behat tests for contacting PO
[moodle.git] / admin / tool / dataprivacy / tests / behat / contact_privacy_officer.feature
blobe015d194c322c71690548673966142660e8582e3
1 @tool @tool_dataprivacy
2 Feature: Contact the privacy officer
3   As a user
4   In order to reach out to the site's privacy officer
5   I need to be able to contact the site's privacy officer in Moodle
7   Background:
8     Given the following "users" exist:
9       | username | firstname | lastname | email          |
10       | student1 | Student   | 1        | s1@example.com |
11     And I log in as "admin"
12     And I set the following administration settings values:
13       | contactdataprotectionofficer | 1 |
14     And I log out
16   @javascript
17   Scenario: Contacting the privacy officer
18     Given I log in as "student1"
19     And I follow "Profile" in the user menu
20     And I should see "Contact the privacy officer"
21     And I click on "Contact the privacy officer" "link"
22     And I set the field "Message" to "Hello DPO!"
23     And I press "Send"
24     And I should see "Your request has been submitted to the privacy officer"
25     And I click on "Data requests" "link"
26     And I should see "Hello DPO!" in the "General inquiry" "table_row"