MDL-68661 core_lang: Roll back addresourceoractivity

This commit is contained in:
Mathew May 2020-05-18 13:25:45 +08:00
parent e146a2ca74
commit 7f86455237
5 changed files with 58 additions and 58 deletions

View File

@ -16,4 +16,4 @@ Feature: Add URL to main menu block
| External URL | http://www.google.com | | External URL | http://www.google.com |
| id_display | In pop-up | | id_display | In pop-up |
Then "google" "link" should exist in the "Main menu" "block" Then "google" "link" should exist in the "Main menu" "block"
And "Add an activity" "button" should exist in the "Main menu" "block" And "Add an activity or resource" "button" should exist in the "Main menu" "block"

View File

@ -18,13 +18,13 @@ Feature: Display and choose from the available activities in course
And I am on "Course" course homepage with editing mode on And I am on "Course" course homepage with editing mode on
Scenario: The available activities are displayed to the teacher in the activity chooser Scenario: The available activities are displayed to the teacher in the activity chooser
Given I click on "Add an activity" "button" in the "Topic 1" "section" Given I click on "Add an activity or resource" "button" in the "Topic 1" "section"
Then I should see "Add an activity" in the ".modal-title" "css_element" Then I should see "Add an activity or resource" in the ".modal-title" "css_element"
And I should see "Assignment" in the ".modal-body" "css_element" And I should see "Assignment" in the ".modal-body" "css_element"
Scenario: The teacher can choose to add an activity from the activity items in the activity chooser Scenario: The teacher can choose to add an activity from the activity items in the activity chooser
Given I click on "Add an activity" "button" in the "Topic 3" "section" Given I click on "Add an activity or resource" "button" in the "Topic 3" "section"
When I click on "Add a new Assignment" "link" in the "Add an activity" "dialogue" When I click on "Add a new Assignment" "link" in the "Add an activity or resource" "dialogue"
Then I should see "Adding a new Assignment" Then I should see "Adding a new Assignment"
And I set the following fields to these values: And I set the following fields to these values:
| Assignment name | Test Assignment Topic 3 | | Assignment name | Test Assignment Topic 3 |
@ -32,19 +32,19 @@ Feature: Display and choose from the available activities in course
Then I should see "Test Assignment Topic 3" in the "Topic 3" "section" Then I should see "Test Assignment Topic 3" in the "Topic 3" "section"
Scenario: The teacher can choose to add an activity from the activity summary in the activity chooser Scenario: The teacher can choose to add an activity from the activity summary in the activity chooser
Given I click on "Add an activity" "button" in the "Topic 1" "section" Given I click on "Add an activity or resource" "button" in the "Topic 1" "section"
When I click on "Information about the Assignment activity" "button" in the "Add an activity" "dialogue" When I click on "Information about the Assignment activity" "button" in the "Add an activity or resource" "dialogue"
When I click on "Add a new Assignment" "link" in the "help" "core_course > Activity chooser screen" When I click on "Add a new Assignment" "link" in the "help" "core_course > Activity chooser screen"
Then I should see "Adding a new Assignment" Then I should see "Adding a new Assignment"
Scenario: Show summary Scenario: Show summary
Given I click on "Add an activity" "button" in the "Topic 1" "section" Given I click on "Add an activity or resource" "button" in the "Topic 1" "section"
When I click on "Information about the Assignment activity" "button" in the "Add an activity" "dialogue" When I click on "Information about the Assignment activity" "button" in the "Add an activity or resource" "dialogue"
Then I should see "Assignment" in the "help" "core_course > Activity chooser screen" Then I should see "Assignment" in the "help" "core_course > Activity chooser screen"
And I should see "The assignment activity module enables a teacher to communicate tasks, collect work and provide grades and feedback." And I should see "The assignment activity module enables a teacher to communicate tasks, collect work and provide grades and feedback."
Scenario: Hide summary Scenario: Hide summary
Given I click on "Add an activity" "button" in the "Topic 1" "section" Given I click on "Add an activity or resource" "button" in the "Topic 1" "section"
When I click on "Information about the Assignment activity" "button" in the "modules" "core_course > Activity chooser screen" When I click on "Information about the Assignment activity" "button" in the "modules" "core_course > Activity chooser screen"
And I should see "The assignment activity module enables a teacher to communicate tasks, collect work and provide grades and feedback." in the "help" "core_course > Activity chooser screen" And I should see "The assignment activity module enables a teacher to communicate tasks, collect work and provide grades and feedback." in the "help" "core_course > Activity chooser screen"
And I should see "Back" in the "help" "core_course > Activity chooser screen" And I should see "Back" in the "help" "core_course > Activity chooser screen"
@ -52,7 +52,7 @@ Feature: Display and choose from the available activities in course
Then "modules" "core_course > Activity chooser screen" should exist Then "modules" "core_course > Activity chooser screen" should exist
And "help" "core_course > Activity chooser screen" should not exist And "help" "core_course > Activity chooser screen" should not exist
And "Back" "button" should not exist in the "modules" "core_course > Activity chooser screen" And "Back" "button" should not exist in the "modules" "core_course > Activity chooser screen"
And I should not see "The assignment activity module enables a teacher to communicate tasks, collect work and provide grades and feedback." in the "Add an activity" "dialogue" And I should not see "The assignment activity module enables a teacher to communicate tasks, collect work and provide grades and feedback." in the "Add an activity or resource" "dialogue"
Scenario: View recommended activities Scenario: View recommended activities
When I log out When I log out
@ -65,96 +65,96 @@ Feature: Display and choose from the available activities in course
And I log in as "teacher" And I log in as "teacher"
And I am on "Course" course homepage with editing mode on And I am on "Course" course homepage with editing mode on
And I open the activity chooser And I open the activity chooser
Then I should see "Recommended" in the "Add an activity" "dialogue" Then I should see "Recommended" in the "Add an activity or resource" "dialogue"
And I click on "Recommended" "link" in the "Add an activity" "dialogue" And I click on "Recommended" "link" in the "Add an activity or resource" "dialogue"
And I should see "Book" in the "recommended" "core_course > Activity chooser tab" And I should see "Book" in the "recommended" "core_course > Activity chooser tab"
Scenario: Favourite a module in the activity chooser Scenario: Favourite a module in the activity chooser
Given I open the activity chooser Given I open the activity chooser
And I should not see "Starred" in the "Add an activity" "dialogue" And I should not see "Starred" in the "Add an activity or resource" "dialogue"
And I click on "Star Assignment activity" "button" in the "Add an activity" "dialogue" And I click on "Star Assignment activity" "button" in the "Add an activity or resource" "dialogue"
And I should see "Starred" in the "Add an activity" "dialogue" And I should see "Starred" in the "Add an activity or resource" "dialogue"
When I click on "Starred" "link" in the "Add an activity" "dialogue" When I click on "Starred" "link" in the "Add an activity or resource" "dialogue"
Then I should see "Assignment" in the "favourites" "core_course > Activity chooser tab" Then I should see "Assignment" in the "favourites" "core_course > Activity chooser tab"
And I click on "Information about the Assignment activity" "button" in the "favourites" "core_course > Activity chooser tab" And I click on "Information about the Assignment activity" "button" in the "favourites" "core_course > Activity chooser tab"
And I should see "The assignment activity module enables a teacher to communicate tasks, collect work and provide grades and feedback." And I should see "The assignment activity module enables a teacher to communicate tasks, collect work and provide grades and feedback."
Scenario: Add a favourite module and check it exists when reopening the chooser Scenario: Add a favourite module and check it exists when reopening the chooser
Given I open the activity chooser Given I open the activity chooser
And I click on "Star Assignment activity" "button" in the "Add an activity" "dialogue" And I click on "Star Assignment activity" "button" in the "Add an activity or resource" "dialogue"
And I click on "Star Forum activity" "button" in the "Add an activity" "dialogue" And I click on "Star Forum activity" "button" in the "Add an activity or resource" "dialogue"
And I should see "Starred" in the "Add an activity" "dialogue" And I should see "Starred" in the "Add an activity or resource" "dialogue"
And I click on "Close" "button" in the "Add an activity" "dialogue" And I click on "Close" "button" in the "Add an activity or resource" "dialogue"
When I click on "Add an activity" "button" in the "Topic 3" "section" When I click on "Add an activity or resource" "button" in the "Topic 3" "section"
And I click on "Starred" "link" in the "Add an activity" "dialogue" And I click on "Starred" "link" in the "Add an activity or resource" "dialogue"
Then I should see "Forum" in the "favourites" "core_course > Activity chooser tab" Then I should see "Forum" in the "favourites" "core_course > Activity chooser tab"
Scenario: Add a favourite and then remove it whilst checking the tabs work as expected Scenario: Add a favourite and then remove it whilst checking the tabs work as expected
Given I open the activity chooser Given I open the activity chooser
And I click on "Star Assignment activity" "button" in the "Add an activity" "dialogue" And I click on "Star Assignment activity" "button" in the "Add an activity or resource" "dialogue"
And I click on "Starred" "link" in the "Add an activity" "dialogue" And I click on "Starred" "link" in the "Add an activity or resource" "dialogue"
And I click on "Star Assignment activity" "button" in the "Add an activity" "dialogue" And I click on "Star Assignment activity" "button" in the "Add an activity or resource" "dialogue"
Then I should not see "Starred" in the "Add an activity" "dialogue" Then I should not see "Starred" in the "Add an activity or resource" "dialogue"
Scenario: The teacher can search for an activity by it's name Scenario: The teacher can search for an activity by it's name
Given I click on "Add an activity" "button" in the "Topic 1" "section" Given I click on "Add an activity or resource" "button" in the "Topic 1" "section"
When I set the field "search" to "Lesson" When I set the field "search" to "Lesson"
Then I should see "1 results found" in the "Add an activity" "dialogue" Then I should see "1 results found" in the "Add an activity or resource" "dialogue"
And I should see "Lesson" in the "Add an activity" "dialogue" And I should see "Lesson" in the "Add an activity or resource" "dialogue"
Scenario: The teacher can search for an activity by it's description Scenario: The teacher can search for an activity by it's description
Given I open the activity chooser Given I open the activity chooser
When I set the field "search" to "The lesson activity module enables a teacher to deliver content" When I set the field "search" to "The lesson activity module enables a teacher to deliver content"
Then I should see "1 results found" in the "Add an activity" "dialogue" Then I should see "1 results found" in the "Add an activity or resource" "dialogue"
And I should see "Lesson" in the "Add an activity" "dialogue" And I should see "Lesson" in the "Add an activity or resource" "dialogue"
Scenario: Search results are not returned if the search query does not match any activity name or description Scenario: Search results are not returned if the search query does not match any activity name or description
Given I click on "Add an activity" "button" in the "Topic 1" "section" Given I click on "Add an activity or resource" "button" in the "Topic 1" "section"
When I set the field "search" to "Random search query" When I set the field "search" to "Random search query"
Then I should see "0 results found" in the "Add an activity" "dialogue" Then I should see "0 results found" in the "Add an activity or resource" "dialogue"
And ".option" "css_element" should not exist in the ".searchresultitemscontainer" "css_element" And ".option" "css_element" should not exist in the ".searchresultitemscontainer" "css_element"
Scenario: Teacher can return to the default activity chooser state by manually removing the search query Scenario: Teacher can return to the default activity chooser state by manually removing the search query
Given I click on "Add an activity" "button" in the "Topic 1" "section" Given I click on "Add an activity or resource" "button" in the "Topic 1" "section"
And I set the field "search" to "Lesson" And I set the field "search" to "Lesson"
And I should see "1 results found" in the "Add an activity" "dialogue" And I should see "1 results found" in the "Add an activity or resource" "dialogue"
And I should see "Lesson" in the "Add an activity" "dialogue" And I should see "Lesson" in the "Add an activity or resource" "dialogue"
When I set the field "search" to "" When I set the field "search" to ""
And I should not see "1 results found" in the "Add an activity" "dialogue" And I should not see "1 results found" in the "Add an activity or resource" "dialogue"
Then ".searchresultscontainer" "css_element" should not exist Then ".searchresultscontainer" "css_element" should not exist
And ".optionscontainer" "css_element" should exist And ".optionscontainer" "css_element" should exist
Scenario: Teacher can not see a "clear" button if a search query is not entered in the activity chooser search bar Scenario: Teacher can not see a "clear" button if a search query is not entered in the activity chooser search bar
When I click on "Add an activity" "button" in the "Topic 1" "section" When I click on "Add an activity or resource" "button" in the "Topic 1" "section"
Then "Clear search input" "button" should not exist Then "Clear search input" "button" should not exist
Scenario: Teacher can see a "clear" button after entering a search query in the activity chooser search bar Scenario: Teacher can see a "clear" button after entering a search query in the activity chooser search bar
Given I click on "Add an activity" "button" in the "Topic 1" "section" Given I click on "Add an activity or resource" "button" in the "Topic 1" "section"
When I set the field "search" to "Search query" When I set the field "search" to "Search query"
Then "Clear search input" "button" should not exist Then "Clear search input" "button" should not exist
Scenario: Teacher can not see a "clear" button if the search query is removed in the activity chooser search bar Scenario: Teacher can not see a "clear" button if the search query is removed in the activity chooser search bar
Given I click on "Add an activity" "button" in the "Topic 1" "section" Given I click on "Add an activity or resource" "button" in the "Topic 1" "section"
And I set the field "search" to "Search query" And I set the field "search" to "Search query"
And "Clear search input" "button" should exist And "Clear search input" "button" should exist
When I set the field "search" to "" When I set the field "search" to ""
Then "Clear search input" "button" should not exist Then "Clear search input" "button" should not exist
Scenario: Teacher can instantly remove the search query from the activity search bar by clicking on the "clear" button Scenario: Teacher can instantly remove the search query from the activity search bar by clicking on the "clear" button
Given I click on "Add an activity" "button" in the "Topic 1" "section" Given I click on "Add an activity or resource" "button" in the "Topic 1" "section"
And I set the field "search" to "Search query" And I set the field "search" to "Search query"
And I should see "results found" in the "Add an activity" "dialogue" And I should see "results found" in the "Add an activity or resource" "dialogue"
When I click on "Clear search input" "button" When I click on "Clear search input" "button"
Then I should not see "Search query" Then I should not see "Search query"
And ".searchresultscontainer" "css_element" should not exist And ".searchresultscontainer" "css_element" should not exist
And ".optionscontainer" "css_element" should exist And ".optionscontainer" "css_element" should exist
Scenario: Teacher gets the base case for the Activity Chooser tab mode Scenario: Teacher gets the base case for the Activity Chooser tab mode
Given I click on "Add an activity" "button" in the "Topic 1" "section" Given I click on "Add an activity or resource" "button" in the "Topic 1" "section"
And I should see "Activities" in the "Add an activity" "dialogue" And I should see "Activities" in the "Add an activity or resource" "dialogue"
When I click on "Activities" "link" in the "Add an activity" "dialogue" When I click on "Activities" "link" in the "Add an activity or resource" "dialogue"
Then I should not see "Book" in the "activity" "core_course > Activity chooser tab" Then I should not see "Book" in the "activity" "core_course > Activity chooser tab"
And I click on "Resources" "link" in the "Add an activity" "dialogue" And I click on "Resources" "link" in the "Add an activity or resource" "dialogue"
And I should not see "Assignment" in the "resources" "core_course > Activity chooser tab" And I should not see "Assignment" in the "resources" "core_course > Activity chooser tab"
Scenario: Teacher gets the simple case for the Activity Chooser tab mode Scenario: Teacher gets the simple case for the Activity Chooser tab mode
@ -167,9 +167,9 @@ Feature: Display and choose from the available activities in course
And I log out And I log out
And I log in as "teacher" And I log in as "teacher"
And I am on "Course" course homepage with editing mode on And I am on "Course" course homepage with editing mode on
And I click on "Add an activity" "button" in the "Topic 1" "section" And I click on "Add an activity or resource" "button" in the "Topic 1" "section"
Then I should not see "Activities" in the "Add an activity" "dialogue" Then I should not see "Activities" in the "Add an activity or resource" "dialogue"
And I should not see "Resources" in the "Add an activity" "dialogue" And I should not see "Resources" in the "Add an activity or resource" "dialogue"
Scenario: Teacher gets the final case for the Activity Chooser tab mode Scenario: Teacher gets the final case for the Activity Chooser tab mode
Given I log out Given I log out
@ -181,7 +181,7 @@ Feature: Display and choose from the available activities in course
And I log out And I log out
And I log in as "teacher" And I log in as "teacher"
And I am on "Course" course homepage with editing mode on And I am on "Course" course homepage with editing mode on
And I click on "Add an activity" "button" in the "Topic 1" "section" And I click on "Add an activity or resource" "button" in the "Topic 1" "section"
Then I should not see "All" in the "Add an activity" "dialogue" Then I should not see "All" in the "Add an activity or resource" "dialogue"
And I should see "Activities" in the "Add an activity" "dialogue" And I should see "Activities" in the "Add an activity or resource" "dialogue"
And I should see "Resources" in the "Add an activity" "dialogue" And I should see "Resources" in the "Add an activity or resource" "dialogue"

View File

@ -39,5 +39,5 @@ Feature: Restrict activities availability
And I log out And I log out
And I log in as "teacher1" And I log in as "teacher1"
When I am on "Course 1" course homepage with editing mode on When I am on "Course 1" course homepage with editing mode on
Then the "Add an activity to section 'Topic 1'" select box should not contain "Chat" Then the "Add a resource to section 'Topic 1'" select box should not contain "Chat"
Then the "Add an activity to section 'Topic 1'" select box should not contain "Glossary" Then the "Add an activity to section 'Topic 1'" select box should not contain "Glossary"

View File

@ -70,7 +70,7 @@ $string['addnewuser'] = 'Add a new user';
$string['addnousersrecip'] = 'Add users who haven\'t accessed this {$a} to recipient list'; $string['addnousersrecip'] = 'Add users who haven\'t accessed this {$a} to recipient list';
$string['addpagehere'] = 'Add text here'; $string['addpagehere'] = 'Add text here';
$string['addresource'] = 'Add a resource...'; $string['addresource'] = 'Add a resource...';
$string['addresourceoractivity'] = 'Add an activity'; $string['addresourceoractivity'] = 'Add an activity or resource';
$string['addresourcetosection'] = 'Add a resource to section \'{$a}\''; $string['addresourcetosection'] = 'Add a resource to section \'{$a}\'';
$string['address'] = 'Address'; $string['address'] = 'Address';
$string['addsections'] = 'Add sections'; $string['addsections'] = 'Add sections';

View File

@ -18,9 +18,9 @@ Feature: As a user, "Course preferences" allows me to set my course preference(s
Given the field "enableactivitychooser" matches value "1" Given the field "enableactivitychooser" matches value "1"
# See that the "activity chooser" is actually shown by default in course page. # See that the "activity chooser" is actually shown by default in course page.
When I am on "Course 1" course homepage When I am on "Course 1" course homepage
And I should not see "Add an activity" in the "Topic 1" "section" And I should not see "Add an activity or resource" in the "Topic 1" "section"
And I turn editing mode on And I turn editing mode on
Then I should see "Add an activity" in the "Topic 1" "section" Then I should see "Add an activity or resource" in the "Topic 1" "section"
And I should not see "Add a resource..." in the "Topic 1" "section" And I should not see "Add a resource..." in the "Topic 1" "section"
@javascript @javascript