Commit 19bad994 authored by Doris Tam's avatar Doris Tam

Bug 1810990: blocktypes: profile information and others for get_field checks

    additional:
        - added tabledata for all file information for table artefact_files_file
        - profileicon set for user acccording to latest block (will move to create_user later)
        - found bugs after testing with logging in different users, small bug fixes here and there

Change-Id: Icedfc86ded96de53c6de2823b226c3d9c361444b
parent b0778db2
......@@ -262,10 +262,10 @@ class BehatDataGenerators extends BehatBase {
foreach ($record as &$value) {
$value = trim($value);
// Normalise boolean values
if (strtolower($value) == 'on' || $value == '1' || $value == 'yes' || $value == 'true') {
if (strtolower($value) == 'on' || $value == '1' || $value == 'true') {
$value = true;
}
else if (strtolower($value) == 'off' || $value == '0' || $value == 'no' || $value == 'false') {
else if (strtolower($value) == 'off' || $value == '0' || $value == 'false') {
$value = false;
}
}
......
......@@ -26,16 +26,17 @@ Background:
| Group1 | unicorns! | topic one | cheer on | woo! mahara unicorns unite! | UserB |
| Group1 | | topic one | cheer on | 10 papercranes, let's go! | UserB |
| Group1 | unicorns! | topic one | extra subj | 100 papercranes, let's go! | UserB |
| Group1 | unicorns! | |origami | 1000 papercranes, let's go! | UserB |
| Group1 | unicorns! | | origami | 1000 papercranes, let's go! | UserB |
And the following "pages" exist:
| title | description | ownertype | ownername |
| Page UserA_00 | Page 01 | user | UserA |
| Page UserB_00 | Page 01 | user | UserA |
| Page UserA | Page 01 | user | UserA |
| Page UserB | Page 01 | user | UserB |
| Page Grp1 | Page 01 | group | Group1 |
| Page One | test 01 | user | UserA |
| Page Two | test 01 | user | UserA |
| Page Three | test 01 | user | UserA |
| Page Four | test 01 | user | UserA |
And the following "collections" exist:
| title | ownertype | ownername | description | pages |
......@@ -63,38 +64,39 @@ Background:
| Group1 | group | Group Plan | This is my group plan | unicorn |
And the following "tasks" exist:
| owner | ownertype | plan | title | description | completiondate | completed | tags |
| UserA | user | Plan One | Task One| Task One Description | 12/12/19 | no | cats,dogs |
| UserA | user | Plan One | Task Two| Task Two Description | 12/01/19 | yes | cats,dogs |
| UserA | user | Plan Two | Task 2a | Task 2a Description | 12/10/19 | yes | cats,dogs |
| UserA | user | Plan Two | Task 2b | Task 2b Description | 11/05/19 | yes | cats,dogs |
| UserA | user | Plan Two | Task 2c | Task 2c Description | 22/02/19 | yes | cats,dogs |
| owner | ownertype | plan | title | description | completiondate | completed | tags |
| UserA | user | Plan One | Task One a | Task 1a Description | 12/12/19 | false | cats,dogs |
| UserA | user | Plan One | Task One b | Task 1b Description | 12/01/19 | true | cats,dogs |
| UserA | user | Plan Two | Task Two a | Task 2a Description | 12/10/19 | true | cats,dogs |
| UserA | user | Plan Two | Task Two b | Task 2b Description | 11/01/19 | true | cats,dogs |
| UserA | user | Plan Two | Task Two c | Task 2c Description | 22/02/19 | true | cats,dogs |
And the following "blocks" exist:
| title | type | page |retractable | data |
| Text | 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 |
| Files to download | filedownload | Page UserA_00 | auto | attachments=mahara_about.pdf |
| Files to download | filedownload | Page UserA_00 | no | attachments=mahara_about.pdf,Image2.png |
| External Feed - News | externalfeed | Page UserA_00 | No | source=http://rss.nzherald.co.nz/rss/xml/nzhtsrsscid_000000698.xml;count=5 |
| External Feed - Food | externalfeed | Page UserA_00 | no | source=http://www.thekitchenmaid.com/feed;count=3 |
| Image | image | Page Grp1 | no | attachment=Image3.png |
| Files to download | filedownload | Page Grp1 | no | attachments=mahara_about.pdf,Image2.png,testvid3.mp4,mahara.mp3 |
| External Video | externalvideo | Page Grp1 | no | source=https://youtu.be/yRxFm70nOrY |
| Social Media | socialprofile | Page UserB_00 | no | sns=instagram,twitter,facebook,tumblr,pinterest,mysocialmedia |
| Gallery - style 1 | gallery | Page UserB_00 | no | attachments=Image1.jpg,Image3.png,Image3.png,Image2.png;imagesel=2;showdesc=yes;width=75;imagestyle=1;photoframe=1 |
| Gallery - style 2 | gallery | Page UserB_00 | yes | attachments=Image3.png,Image2.png,Image1.jpg;imagesel=2;showdesc=yes;width=75;imagestyle=2 |
| Gallery - style 3 | gallery | Page UserB_00 | yes | attachments=Image3.png,Image2.png,Image1.jpg;imagesel=2;showdesc=no;imagestyle=3;photoframe=0|
| Folder | folder | Page UserB_00 | no | dirname=myfolder;attachments=mahara_about.pdf,Image2.png,Image1.jpg,Image3.png,mahara.mp3 |
| Some HTML | html | Page UserB_00 | yes | attachment=test_html.html |
| Text | text | Page UserA | yes | This is some text |
| Image JPG | image | Page UserA | no | attachment=Image1.jpg; width=100 |
| Image PNG | image | Page UserA | no | attachment=Image2.png |
| Files to download | filedownload | Page UserA | auto | attachments=mahara_about.pdf |
| Files to download | filedownload | Page UserA | no | attachments=mahara_about.pdf,Image2.png |
| External Feed - News | externalfeed | Page UserA | No | source=http://rss.nzherald.co.nz/rss/xml/nzhtsrsscid_000000698.xml;count=5 |
| External Feed - Food | externalfeed | Page UserA | no | source=http://www.thekitchenmaid.com/feed;count=3 |
| Social Media | socialprofile | Page UserA | no | sns=instagram,twitter,facebook,tumblr,pinterest,mysocialmedia |
| Image | image | Page Grp1 | no | attachment=Image3.png |
| Files to download | filedownload | Page Grp1 | no | attachments=mahara_about.pdf,Image2.png,testvid3.mp4,mahara.mp3 |
| External Video | externalvideo | Page Grp1 | no | source=https://youtu.be/yRxFm70nOrY |
| Navigation | navigation | Page Grp1 | no | collection=collection one;copytoall=yes |
| Social Media | socialprofile | Page UserB | no | sns=instagram,twitter,facebook,tumblr,pinterest,mysocialmedia |
| Gallery - style 1 | gallery | Page UserB | no | attachments=Image1.jpg,Image3.png,Image3.png,Image2.png,Image1.jpg;imagesel=2;showdesc=yes;width=75;imagestyle=1;photoframe=1 |
| Gallery - style 2 | gallery | Page UserB | yes | attachments=Image3.png,Image2.png,Image1.jpg,Image1.jpg;imagesel=2;showdesc=yes;width=75;imagestyle=2 |
| Gallery - style 3 | gallery | Page UserB | yes | attachments=Image3.png,Image2.png,Image3.png,Image1.jpg,Image1.jpg;imagesel=2;showdesc=no;imagestyle=3;photoframe=0|
| Folder | folder | Page UserB | no | dirname=myfolder;attachments=mahara_about.pdf,Image2.png,Image1.jpg,Image3.png,mahara.mp3 |
| Some HTML | html | Page UserB | yes | attachment=test_html.html |
| Profile Information | profileinfo | Page UserB | no | introtext =Mahara unicorn here! Nice to meet you :);profileicon=Image3.png |
| Blog/Journal | blog | Page One | no | copytype=nocopy;count=5;journaltitle=journal1 |
| Blogpost/JournalEntry| blogpost | Page One | no | copytype=nocopy;journaltitle=journal1;entrytitle=Entry Two |
| Comments | comment | Page One | | no configdata |
| Comments | comment | Page One | no | no configdata |
| Peer Assessment | peerassessment | Page One | auto | no configdata |
| Creative Commons | creativecommons| Page One | no | commercialuse=yes;license=3.0;allowmods=no |
......@@ -106,9 +108,12 @@ Background:
| Pdf | pdf | Page Three | no | attachment=mahara_about.pdf |
| Recent Forum Posts |recentforumposts| Page Three | no | groupname=Group1;maxposts=3 |
| External Video | externalvideo | Page Three | no | source=https://youtu.be/yRxFm70nOrY |
| Note/Textbox 1 | textbox | Page Three | no | notetitle=secretnote;text=ma ha ha ha ra!;tags=mahara,araham;attachments=Image3.png,Image2.png,Image1.jpg;allowcomments=yes |
| Note/textbox ref:1 | textbox | Page Three | no | existingnote=secretnote |
| Note/Textbox copy:1 | textbox | Page Three | no | existingnote=secretnote;allowcomments=yes;copynote=true;notetitle=newsecretnote |
| Profile Information | profileinfo | Page Two | no | introtext =Mahara unicorn here! Nice to meet you :);profileicon=Image1.jpg |
| Profile Information | profileinfo | Page Two | no | introtext =Mahara unicorn here! Nice to meet you :);profileicon=Image2.png |
Scenario: Login as admin to change upload settings
......@@ -131,9 +136,11 @@ Scenario: Login as admin to change upload settings
And I press "Save"
And I log out
Then I log in as "UserA" with password "Kupuh1pa!"
And I go to portfolio page "Page UserA_00"
And I go to portfolio page "Page UserA"
And I go to portfolio page "Page Grp1"
And I go to portfolio page "Page UserB_00"
And I go to portfolio page "Page One"
And I go to portfolio page "Page Two"
And I go to portfolio page "Page Three"
And I log out
And I log in as "UserB" with password "Kupuh1pa!"
Then I go to portfolio page "Page UserB"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment