first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
@@ -0,0 +1,72 @@
@mod @mod_folder @core_completion
Feature: View activity completion information in the folder activity
In order to have visibility of folder completion requirements
As a student
I need to be able to view my folder completion progress
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| student1 | Vinnie | Student1 | student1@example.com |
| teacher1 | Darrell | Teacher1 | teacher1@example.com |
And the following "courses" exist:
| fullname | shortname | enablecompletion | showcompletionconditions |
| Course 1 | C1 | 1 | 1 |
| Course 2 | C2 | 1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| teacher1 | C1 | editingteacher |
| student1 | C2 | student |
Scenario: View automatic completion items
Given the following "activity" exists:
| activity | folder |
| course | C1 |
| idnumber | mh1 |
| name | Music history |
| section | 1 |
| completion | 2 |
| completionview | 1 |
# Teacher view.
And I am on the "Music history" "folder activity" page logged in as teacher1
And "Music history" should have the "View" completion condition
And I log out
# Student view.
When I am on the "Music history" "folder activity" page logged in as student1
Then the "View" completion condition of "Music history" is displayed as "done"
@javascript
Scenario: Use manual completion
Given the following "activity" exists:
| activity | folder |
| course | C1 |
| idnumber | mh1 |
| name | Music history |
| section | 1 |
| completion | 1 |
And I am on the "Music history" "folder activity" page logged in as teacher1
# Teacher view.
And the manual completion button for "Music history" should be disabled
And I log out
# Student view.
When I am on the "Music history" "folder activity" page logged in as student1
Then the manual completion button of "Music history" is displayed as "Mark as done"
And I toggle the manual completion state of "Music history"
And the manual completion button of "Music history" is displayed as "Done"
@javascript
Scenario: The manual completion button will be shown on the course page for Inline on a course page display mode
Given the following "activity" exists:
| activity | folder |
| course | C2 |
| idnumber | mh2 |
| name | Music history |
| section | 1 |
| completion | 1 |
| display | 1 |
When I am on the "Course 2" course page logged in as student1
Then the manual completion button for "Music history" should exist
And the manual completion button of "Music history" is displayed as "Mark as done"
And I toggle the manual completion state of "Music history"
And the manual completion button of "Music history" is displayed as "Done"
@@ -0,0 +1,48 @@
@mod @mod_resource @_file_upload
Feature: Details of uploaded file in the resource can be changed
In order to change details of an uploaded file in a folder resource
As a teacher
I should be able to upload a file
Background:
Given the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | t1@example.com |
And the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "activities" exist:
| activity | course | name |
| folder | C1 | Folder1 |
@javascript
Scenario: Uploaded file details can be changed
Given I am on the "Folder1" "folder activity" page logged in as teacher1
And I click on "Edit" "button"
# Upload a file in folder resource
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
And I press "Save changes"
And I click on "Edit" "button"
And I click on "empty.txt" "link"
# Initially, file details are set to default values
And the following fields match these values:
| Name | empty.txt |
| Author | Teacher 1 |
| licence | Licence not specified |
# Update the file details for testing
When I set the following fields to these values:
| Name | empty_file.txt |
| Author | Teacher 1 |
| licence | All rights reserved |
And I press "Update"
And I press "Save changes"
# Confirm that file details have been updated correctly
And I click on "Edit" "button"
And I click on "empty_file.txt" "link"
Then the following fields match these values:
| Name | empty_file.txt |
| Author | Teacher 1 |
| licence | All rights reserved |
@@ -0,0 +1,43 @@
@mod @mod_folder @block @block_recent_activity
Feature: Files added in folder activity are visible in the recent activity block
In order to view and download folder activity from recent activity block
As a teacher
I should be able to create folder activity with contents
Background:
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "blocks" exist:
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| recent_activity | Course | C1 | course-view-* | side-pre |
And the following "activities" exist:
| activity | course | name |
| folder | C1 | Folder 1 |
@_file_upload @javascript
Scenario: Files added in folder activity are visible in recent activity block
Given I am on the "Folder 1" "folder activity" page logged in as admin
And I click on "Edit" "button"
# Upload different file types in folder resource
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
And I upload "lib/tests/fixtures/gd-logo.png" file to "Files" filemanager
And I press "Save changes"
# Confirm folder activity and files within the folder are visible in Recent activity block
When I am on the "Course 1" course page
Then I should see "Folder 1" in the "Recent activity" "block"
And I should see "empty.txt" in the "Recent activity" "block"
And I should see "gd-logo.png" in the "Recent activity" "block"
And I click on "Full report of recent activity..." "link"
# Confirm files within folder activity are visible in the full report
And "Folder 1" "link" should exist
And "empty.txt" "link" should exist
And "gd-logo.png" "link" should exist
And "//img[@alt='empty.txt']" "xpath_element" should exist
And "//img[contains(@src, 'preview=tinyicon')]" "xpath_element" should exist
# Confirm files are downloadable
And following "empty.txt" should download a file that:
| Has mimetype | text/plain |
| Contains text | empty file for testing purposes |
And following "gd-logo.png" should download a file that:
| Has mimetype | image/png |