[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @mod @mod_resource @_file_upload 2 Feature: Teacher can specify different display options for the resource 3 In order to provide more information about a file 4 As a teacher 5 I need to be able to show size, type and modified date 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | 10 | student1 | Student | 1 | student1@example.com | 11 | teacher1 | Teacher | 1 | teacher1@example.com | 12 And the following "courses" exist: 13 | fullname | shortname | category | 14 | Course 1 | C1 | 0 | 15 And the following "course enrolments" exist: 16 | user | course | role | 17 | teacher1 | C1 | editingteacher | 18 | student1 | C1 | student | 19 And I log in as "teacher1" 20 And I follow "Course 1" 21 And I turn editing mode on 22 23 @javascript 24 Scenario: Specifying no additional display options for a file resource 25 When I add a "File" to section "1" 26 And I set the following fields to these values: 27 | Name | Myfile | 28 | Show size | 0 | 29 | Show type | 0 | 30 | Show upload/modified date | 0 | 31 And I upload "mod/resource/tests/fixtures/samplefile.txt" file to "Select files" filemanager 32 And I press "Save and display" 33 Then ".resourcedetails" "css_element" should not exist 34 And I follow "Course 1" 35 And ".activity.resource .resourcelinkdetails" "css_element" should not exist 36 And I log out 37 38 @javascript 39 Scenario Outline: Specifying different display options for a file resource 40 When I add a "File" to section "1" 41 And I set the following fields to these values: 42 | Name | Myfile | 43 | Display | Open | 44 | Show size | <showsize> | 45 | Show type | <showtype> | 46 | Show upload/modified date | <showdate> | 47 And I upload "mod/resource/tests/fixtures/samplefile.txt" file to "Select files" filemanager 48 And I press "Save and display" 49 Then I <seesize> see "6 bytes" in the ".resourcedetails" "css_element" 50 And I <seetype> see "Text file" in the ".resourcedetails" "css_element" 51 And I <seedate> see "Uploaded" in the ".resourcedetails" "css_element" 52 And I follow "Course 1" 53 And I <seesize> see "6 bytes" in the ".activity.resource .resourcelinkdetails" "css_element" 54 And I <seetype> see "Text file" in the ".activity.resource .resourcelinkdetails" "css_element" 55 And I <seedate> see "Uploaded" in the ".activity.resource .resourcelinkdetails" "css_element" 56 And I log out 57 58 Examples: 59 | showsize | showtype | showdate | seesize | seetype | seedate | 60 | 1 | 0 | 0 | should | should not | should not | 61 | 0 | 1 | 0 | should not | should | should not | 62 | 0 | 0 | 1 | should not | should not | should | 63 | 1 | 1 | 0 | should | should | should not | 64 | 1 | 0 | 1 | should | should not | should | 65 | 0 | 1 | 1 | should not | should | should | 66 | 1 | 1 | 1 | should | should | should |
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |