test.feature 5.72 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
@javascript @core @blocktype
Feature: Creating a page with blocks
    As a user
    I want to add a page with blocks as a background step
    As a group admin
    I want to add a page with blocks as a background step

Background:
    Given the following "users" exist:
    | username | password | email | firstname | lastname | institution | authname | role |
    | UserA | Kupuh1pa! | UserA@example.org | Angela  | User | mahara | internal | member |
    | UserB | Kupuh1pa! | UserB@example.org | Bob     | Boi  | mahara | internal | member |

    And the following "groups" exist:
    | name | owner | description | grouptype | open | invitefriends | editroles | submittableto | allowarchives | members | staff |
    | Group1 | UserB | Group1 owned by UserB | standard | ON | OFF | all | ON | OFF | UserA |  |

    And the following "pages" exist:
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
    | title         | description | ownertype | ownername |
    | Page UserA_00 | Page 01     | user      | UserA |
    | Page UserB_00 | Page 01     | user      | UserA |
    | Page Grp1     | Page 01     | group     | Group1 |
    | Page One      | test 01     | user      | UserA |

    And the following "journals" exist:
    | owner | ownertype | title   | description      | tags               |
    | UserA | user      | journal1| this is journal1 | amber,brown,cobalt |
    | Group1| group      |journal2| this is journal1 | amber,brown,cobalt |

    And the following "journalentries" exist:
    | owner   | ownertype | title       | entry                  | blog     | tags      | draft |
    | UserA   | user      | Entry One   | This is my entry  One  | journal1 | cats,dogs | 0     |
    | UserA   | user      | Entry Two   | This is my entry Two   | journal1 | cats,dogs | 0     |
    | UserA   | user      | Entry Three | This is my entry Three | journal1 | cats,dogs | 0     |
    | UserA   | user      | Entry Four  | This is my entry Four  | journal1 | cats,dogs | 0     |
    | UserA   | user      | Entry Five  | This is my entry Five  | journal1 | cats,dogs | 0     |
    | Group1  | group     | Group e1    | This is my group entry | journal2 |           | 0     |
38
39

    And the following "blocks" exist:
40
41
42
43
44
45
46
47
48
    | title       | type         | page          |retractable | data |
    | My text 1   | text         | Page UserA_00 | yes        | This is some text |
    | image jpg   | image        | Page UserA_00 | no         | attachment=Image1.jpg; width=100 |
    | image png   | image        | Page UserA_00 | no         | attachment=Image2.png |
    | My files 1  | filedownload | Page UserA_00 | auto       | attachments=mahara_about.pdf |
    | My files 2  | filedownload | Page UserA_00 | no         | attachments=mahara_about.pdf,Image2.png |
    | Rss news    | externalfeed | Page UserA_00 | No         | source=http://rss.nzherald.co.nz/rss/xml/nzhtsrsscid_000000698.xml |
    | Rss food    | externalfeed | Page UserA_00 | no         | source=http://www.thekitchenmaid.com/feed |

49
50
51
    | G image 3   | image          | Page Grp1     | no         | attachment=Image3.png |
    | G files 2   | filedownload   | Page Grp1     | no         | attachments=mahara_about.pdf,Image2.png,testvid3.mp4,mahara.mp3 |
    | nzslang     | externalvideo  | Page Grp1     | no         | source=https://youtu.be/yRxFm70nOrY |
52

53
54
55
56
57
58
59
60
61
62
63
64
65
66
    | my social   | socialprofile  | Page UserB_00 | no         | sns=instagram,twitter,facebook,tumblr,pinterest |
    | gall style1 | gallery        | Page UserB_00 | no         | attachments=Image1.jpg,Image3.png,Image3.png,Image2.png;imagesel=2;showdesc=yes;width=75;imagestyle=1;photoframe=1 |
    | gall style2 | gallery        | Page UserB_00 | yes        | attachments=Image3.png,Image2.png,Image1.jpg;imagesel=2;showdesc=yes;width=75;imagestyle=2 |
    | gall style3 | gallery        | Page UserB_00 | yes        | attachments=Image3.png,Image2.png,Image1.jpg;imagesel=2;showdesc=no;imagestyle=3;photoframe=0|
    | myfolder    | folder         | Page UserB_00 | no         | dirname=myfolder;attachments=mahara_about.pdf,Image2.png,Image1.jpg,Image3.png,mahara.mp3 |
    | my html     | html           | Page UserB_00 | yes        | attachment=test_html.html |
    | internalm v | internalmedia  | Page UserB_00 | no         | attachment=testvid3.mp4 |
    | internalm a | internalmedia  | Page UserB_00 | no         | attachment=mahara.mp3 |
    | my pdf      | pdf            | Page UserB_00 | no         | attachment=mahara_about.pdf |

    | my blog     | blog           | Page One      | no         | copytype=nocopy;count=5;journaltitle=journal1 |
    | my blogpost | blogpost       | Page One      | no         | copytype=nocopy;journaltitle=journal1;entrytitle=Entry Two |
    | Comments    | comment        | Page One      |            | no configdata |
    | PeerAssessmt| peerassessment | Page One      | auto       | no configdata |
Doris Tam's avatar
Doris Tam committed
67

68
69


70
71

Scenario: Create Page UserA_00 with text blocks
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
    # To allow users to upload specific internal media types
    Given I log in as "admin" with password "Kupuh1pa!"
    And I go to "/admin/extensions/pluginconfig.php?plugintype=blocktype&pluginname=file/internalmedia"
    And I set the following fields to these values:
    | 3GPP media file       | 1 |
    | AVI video file        | 1 |
    | FLV flash movie       | 1 |
    | MP3 audio file        | 1 |
    | MP4 media file        | 1 |
    | MPEG movie            | 1 |
    | OGA audio file        | 1 |
    | OGG Vorbis audio file | 1 |
    | OGV video file        | 1 |
    | QuickTime movie       | 1 |
    | WEBM video file       | 1 |
    | WMV video file        | 1 |
    And I press "Save"
    Then I log out

    Then I log in as "UserA" with password "Kupuh1pa!"
92
93
    And I go to portfolio page "Page UserA_00"
    And I go to portfolio page "Page Grp1"
94
    And I go to portfolio page "Page UserB_00"
95
    And I go to portfolio page "Page One"