Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@tool @tool_dataprivacy
2
Feature: Protected data should not be deleted
3
  In order to delete data for users and meet legal requirements
4
  As an privacy office
5
  I need to be ensure that only expired or unprotected data is removed
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username  | firstname       | lastname  |
10
      | u1        | u1              | u1        |
11
    And the following "courses" exist:
12
      | fullname  | shortname  | startdate       | enddate         |
13
      | C1        | C1         | ##1 year ago##  | ##1 month ago##  |
14
      | C2        | C2         | ##1 year ago##  | ##last day of next month##     |
15
    And the following "course enrolments" exist:
16
      | user  | course  | role    |
17
      | u1    | C1      | student |
18
      | u1    | C2      | student |
19
    And the following "activities" exist:
20
      | activity   | name                   | intro                         | course | idnumber    |
21
      | forum      | forump1                | Test forum description        | C1     | forump1      |
22
      | forum      | forumu1                | Test forum description        | C1     | forumu1      |
23
      | forum      | forump2                | Test forum description        | C2     | forump2      |
24
      | forum      | forumu2                | Test forum description        | C2     | forumu2      |
25
    And the following data privacy "categories" exist:
26
      | name          |
27
      | CAT           |
28
    And the following data privacy "purposes" exist:
29
      | name         | retentionperiod | protected  |
30
      | Site purpose | PT1H            | 0          |
31
      | prot         | P1D             | 1          |
32
      | unprot       | P1D             | 0          |
33
    And the following "mod_forum > discussions" exist:
34
      | user     | forum   | name                | message              |
35
      | u1       | forump1 | Discussion subject  | Test post in forump1 |
36
      | u1       | forumu1 | Discussion subject  | Test post in forumu1 |
37
      | u1       | forump2 | Discussion subject  | Test post in forump2 |
38
      | u1       | forumu2 | Discussion subject  | Test post in forumu2 |
39
    And I set the category and purpose for the "forump1" "forum" in course "C1" to "CAT" and "prot"
40
    And I set the category and purpose for the "forump2" "forum" in course "C2" to "CAT" and "prot"
41
    And I set the category and purpose for the "forumu1" "forum" in course "C1" to "CAT" and "unprot"
42
    And I set the category and purpose for the "forumu2" "forum" in course "C2" to "CAT" and "unprot"
43
    And I set the site category and purpose to "CAT" and "Site purpose"
44
 
45
  @javascripta
46
  Scenario: Unexpired and protected data is not removed
47
    Given  I log in as "admin"
48
    And I create a dataprivacy "delete" request for "u1"
49
    And I approve a dataprivacy "delete" request for "u1"
50
    And I run all adhoc tasks
51
    And I navigate to "Users > Privacy and policies > Data requests" in site administration
52
    And I should see "Deleted" in the "u1" "table_row"
53
 
54
    And I am on the "forump1" "forum activity" page
55
    And I follow "Discussion subject"
56
    Then I should not see "Test post in forump1"
57
 
58
    When I am on the "forumu1" "forum activity" page
59
    And I follow "Discussion subject"
60
    Then I should not see "Test post in forumu1"
61
 
62
    And I am on the "forump2" "forum activity" page
63
    And I follow "Discussion subject"
64
    Then I should see "Test post in forump2"
65
 
66
    When I am on the "forumu2" "forum activity" page
67
    And I follow "Discussion subject"
68
    Then I should not see "Test post in forumu2"