Commit 221210e9 authored by Damyon Wiese's avatar Damyon Wiese Committed by Adrian Greeve
Browse files

MDL-49412 Behat: Fix behat tests for all of @mod

This is after the navigation changes for 2.9.

Part of MDL-45774.
parent 3a8b9b65
......@@ -34,7 +34,7 @@ Feature: Outcome grading
| Short name | OT |
| Scale | Test Scale |
And I press "Save changes"
And I am on homepage
And I am on site homepage
And I follow "Course 1"
And I follow "Outcomes"
And I set the field "Available standard outcomes" to "Outcome Test"
......@@ -87,7 +87,7 @@ Feature: Outcome grading
And I follow "Groups"
And I add "Student 0 (student0@asd.com)" user to "Group 1" group members
And I add "Student 1 (student1@asd.com)" user to "Group 1" group members
And I am on homepage
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
......
......@@ -18,6 +18,7 @@ Feature: In an assignment, teachers grade multiple students on one page
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
When I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
......@@ -34,6 +35,7 @@ Feature: In an assignment, teachers grade multiple students on one page
And I press "Save changes"
And I log out
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I follow "Test assignment name"
And I follow "View/grade all submissions"
......@@ -126,8 +128,8 @@ Feature: In an assignment, teachers grade multiple students on one page
And I follow "Test assignment name"
And I should see "I'm the teacher first feedback"
And I should see "60.0"
And I follow "My grades" in the user menu
And I follow "Course 1"
And I follow "Grades"
And I should see "1337"
And I log out
And I log in as "student2"
......@@ -135,8 +137,8 @@ Feature: In an assignment, teachers grade multiple students on one page
And I follow "Test assignment name"
And I should not see "I'm the teacher first feedback"
And I should not see "60.0"
And I follow "My grades" in the user menu
And I follow "Course 1"
And I follow "Grades"
And I should not see "1337"
And I log out
And I log in as "teacher1"
......@@ -165,8 +167,8 @@ Feature: In an assignment, teachers grade multiple students on one page
And I follow "Test assignment name"
And I should see "I'm the teacher first feedback"
And I should see "60.0"
And I follow "My grades" in the user menu
And I follow "Course 1"
And I follow "Grades"
And I should see "1337"
And I log out
And I log in as "student2"
......@@ -174,6 +176,6 @@ Feature: In an assignment, teachers grade multiple students on one page
And I follow "Test assignment name"
And I should not see "I'm the teacher first feedback"
And I should not see "60.0"
And I follow "My grades" in the user menu
And I follow "Course 1"
And I follow "Grades"
And I should not see "1337"
......@@ -10,6 +10,7 @@ Feature: In a book, verify log entries
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
When I add a "Book" to section "1" and I fill the form with:
......
......@@ -11,6 +11,7 @@ Feature: Add choice activity
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
And I add a "Choice" to section "1" and I fill the form with:
......
......@@ -2,7 +2,7 @@
Feature: Test the display of the choice module on my home
In order to know my status in a choice activity
As a user
I need to see it in My home.
I need to see it in My dashboard.
Background:
Given the following "users" exist:
......@@ -39,7 +39,7 @@ Feature: Test the display of the choice module on my home
@javascript
Scenario: View my home as a student before answering the choice
Given I log in as "student1"
When I click on "My home" "link" in the "Navigation" "block"
When I click on "Dashboard" "link" in the "Navigation" "block"
Then I should see "You have Choices that need attention"
And I click on ".collapsibleregioncaption" "css_element"
And I should see "Not answered yet"
......@@ -52,7 +52,7 @@ Feature: Test the display of the choice module on my home
And I should see "Your selection: Option 1"
And I should see "Your choice has been saved"
And "Save my choice" "button" should not exist
When I click on "My home" "link" in the "Navigation" "block"
When I click on "Dashboard" "link" in the "Navigation" "block"
Then I should not see "You have Choices that need attention"
And I log out
......@@ -66,7 +66,7 @@ Feature: Test the display of the choice module on my home
And "Save my choice" "button" should not exist
And I log out
When I log in as "teacher1"
And I click on "My home" "link" in the "Navigation" "block"
And I click on "Dashboard" "link" in the "Navigation" "block"
Then I should see "You have Choices that need attention"
And I click on ".collapsibleregioncaption" "css_element"
And I should see "View 1 responses"
......
......@@ -15,6 +15,7 @@ Feature: Students can choose from 4 discussion display options and their choice
| user | course | role |
| student1 | C1 | student |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
And I add a "Forum" to section "1" and I fill the form with:
......
......@@ -17,6 +17,7 @@ Feature: A user can navigate to previous and next discussions
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I navigate to "Groups" node in "Users"
And I press "Create group"
......@@ -29,7 +30,7 @@ Feature: A user can navigate to previous and next discussions
And I press "Save changes"
And I add "Student 1" user to "Group 1" group members
And I add "Student 2" user to "Group 2" group members
And I am on homepage
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
......
......@@ -15,6 +15,7 @@ Feature: A user can control their own subscription preferences for a discussion
| user | course | role |
| student1 | C1 | student |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
......@@ -134,6 +135,7 @@ Feature: A user can control their own subscription preferences for a discussion
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject two" "table_row"
And I log out
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I follow "Test forum name"
And I click on "Edit settings" "link" in the "Administration" "block"
......@@ -179,6 +181,7 @@ Feature: A user can control their own subscription preferences for a discussion
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject two" "table_row"
And I log out
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I follow "Test forum name"
And I click on "Edit settings" "link" in the "Administration" "block"
......@@ -271,7 +274,7 @@ Feature: A user can control their own subscription preferences for a discussion
And the field "Discussion subscription" matches value "I don't want to be notified of new posts in this discussion"
Scenario: A guest should not be able to subscribe to a discussion
Given I click on "Home" "link" in the "Navigation" "block"
Given I am on site homepage
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
......@@ -289,7 +292,7 @@ Feature: A user can control their own subscription preferences for a discussion
And "You are subscribed to this discussion. Click to unsubscribe." "link" should not exist
Scenario: A user who is not logged in should not be able to subscribe to a discussion
Given I click on "Home" "link" in the "Navigation" "block"
Given I am on site homepage
And I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
......
......@@ -20,7 +20,7 @@ Feature: Students can edit or delete their forum posts within a set time limit
And I follow "Site policies"
And I set the field "Maximum time to edit posts" to "1 minutes"
And I press "Save changes"
And I am on homepage
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
And I add a "Forum" to section "1" and I fill the form with:
......
......@@ -15,6 +15,7 @@ Feature: A user can control their own subscription preferences for a forum
| user | course | role |
| student1 | C1 | student |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
......
......@@ -17,6 +17,7 @@ Feature: A user can control their default discussion subscription settings
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
......
@mod @mod_forum
@mod @mod_forum @javascript
Feature: A user can view their posts and discussions
In order to ensure a user can view their posts and discussions
As a student
......@@ -31,9 +31,11 @@ Feature: A user can view their posts and discussions
| Message | How awesome is this forum discussion? |
And I reply "Forum discussion 1" post from "Test forum name" forum with:
| Message | Actually, I've seen better. |
When I navigate to "Posts" node in "My profile > Forum posts"
When I follow "My profile" in the user menu
And I follow "My forum posts"
Then I should see "How awesome is this forum discussion?"
And I should see "Actually, I've seen better."
And I navigate to "Discussions" node in "My profile > Forum posts"
And I follow "My profile" in the user menu
And I follow "My forum discussions"
And I should see "How awesome is this forum discussion?"
And I should not see "Actually, I've seen better."
......@@ -34,6 +34,7 @@ Feature: Posting to groups in a separate group discussion when restricted to gro
| G1 | G1G2 |
| G2 | G2G1 |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
And I add a "Forum" to section "1" and I fill the form with:
......
......@@ -17,6 +17,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "admin"
And I am on site homepage
And I follow "Course 1"
And I turn editing mode on
......@@ -84,7 +85,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
Scenario: Tracking forum posts forced with user tracking on
Given the following config values are set as admin:
| forum_allowforcedreadtracking | 1 |
And I follow "Home"
And I am on site homepage
And I follow "Course 1"
Given I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name |
......@@ -108,7 +109,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
Scenario: Tracking forum posts forced with user tracking off
Given the following config values are set as admin:
| forum_allowforcedreadtracking | 1 |
And I follow "Home"
And I am on site homepage
And I follow "Course 1"
Given I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name |
......@@ -132,7 +133,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
Scenario: Tracking forum posts forced (with force disabled) with user tracking on
Given the following config values are set as admin:
| forum_allowforcedreadtracking | 1 |
And I follow "Home"
And I am on site homepage
And I follow "Course 1"
Given I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name |
......@@ -164,7 +165,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
Scenario: Tracking forum posts forced (with force disabled) with user tracking off
Given the following config values are set as admin:
| forum_allowforcedreadtracking | 1 |
And I follow "Home"
And I am on site homepage
And I follow "Course 1"
Given I add a "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name |
......
......@@ -51,7 +51,8 @@ Feature: Practice mode in a lesson activity
| True | 1 |
And I press "Submit"
Then I should see "View grades"
And I navigate to "Grades" node in "Course administration"
And I follow "My grades" in the user menu
And I follow "Course 1"
And I should see "Non-practice lesson"
@javascript
......@@ -71,7 +72,8 @@ Feature: Practice mode in a lesson activity
| True | 1 |
And I press "Submit"
Then I should not see "View grades"
And I navigate to "Grades" node in "Course administration"
And I follow "My grades" in the user menu
And I follow "Course 1"
And I should not see "Practice lesson"
@javascript
......@@ -92,5 +94,6 @@ Feature: Practice mode in a lesson activity
| True | 1 |
And I press "Submit"
Then I should not see "View grades"
And I navigate to "Grades" node in "Course administration"
And I follow "My grades" in the user menu
And I follow "Course 1"
And I should not see "Practice lesson with scale"
......@@ -17,7 +17,7 @@ Feature: In a lesson activity, teacher can add embedded images in questions answ
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1"
And I navigate to "My private files" node in "My profile"
And I follow "Manage my private files"
And I upload "mod/lesson/tests/fixtures/moodle_logo.jpg" file to "Files" filemanager
And I click on "Save changes" "button"
When I am on homepage
......
Supports Markdown
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