anonymous_view.feature 1.77 KB
Newer Older
1
2
3
4
5
6
7
8
@javascript @core @core_view @core_portfolio
Feature: The Anonymised pages option

In order to be able to see the (Author's name hidden) link

Background:
    Given the following "users" exist:
     | username | password | email | firstname | lastname | institution | authname | role |
9
10
     | userA | Kupuhipa1 | test01@example.com | Pete | Mc | mahara | internal | member |
     | userB | Kupuhipa1 | test02@example.com | Son | Nguyen | mahara | internal | member |
11
12
13
14
15
16
    And the following "pages" exist:
      | title | description| ownertype | ownername |
      | Page 1 | page P1 | user | userA |

Scenario: Testing that views & collections are collated properly
    # Turn on anonymous pages
17
    Given I log in as "admin" with password "Kupuhipa1"
18
19
20
21
22
23
24
25
    And I go to "admin/site/options.php"
    And I follow "General settings"
    And I set the following fields to these values:
    | Allow anonymous pages | 1 |
    And I press "Update site options"
    And I log out

    # Make page anonymous
26
    Given I log in as "userA" with password "Kupuhipa1"
27
    And I choose "Pages and collections" in "Portfolio" from Main menu
28
29
30
31
32
33
34
35
36
37
38
    And I follow "Page 1"
    And I follow "Edit this page"
    And I follow "Edit title and description"
    And I set the following fields to these values:
    | Anonymise | 1 |
    And I press "Save"
    And I follow "Share page"
    And I select "Registered users" from "accesslist[0][searchtype]"
    And I press "Save"
    And I log out

39
    Given I log in as "userB" with password "Kupuhipa1"
40
41
42
43
    And I am on homepage
    Then I should see "(Author's name hidden)"
    And I log out

44
    Given I log in as "admin" with password "Kupuhipa1"
45
46
47
48
    And I am on homepage
    Then should see "(Author's name hidden)"
    And I follow "(Author's name hidden)"
    Then I should see "userA"