mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
MDL-38788 behat: New tests with Javascript disabled
Add a block and add an activity/resource tests. The add an activity with JS disabled test includes MDLQA-2446 automation.
This commit is contained in:
parent
eff79d5378
commit
c94a0d1890
@ -4,8 +4,7 @@ Feature: Add blocks
|
||||
As a teacher
|
||||
I need to add blocks to pages
|
||||
|
||||
@javascript
|
||||
Scenario: Add a block to a course
|
||||
Background:
|
||||
Given the following "users" exists:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Student | 1 | student1@asd.com |
|
||||
@ -21,4 +20,9 @@ Feature: Add blocks
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
When I add the "Blog menu" block
|
||||
Then I should see "View all of my entries"
|
||||
Then I should see "View my entries about this course"
|
||||
|
||||
@javascript
|
||||
Scenario: Add a block to a course with Javascript enabled
|
||||
|
||||
Scenario: Add a block to a course with Javascript disabled
|
||||
|
@ -4,8 +4,7 @@ Feature: Add activities to courses
|
||||
As a teacher
|
||||
I need to add activites to a course
|
||||
|
||||
@javascript
|
||||
Scenario: Add an activity to the course
|
||||
Background:
|
||||
Given the following "users" exists:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Student | 1 | student1@asd.com |
|
||||
@ -19,8 +18,11 @@ Feature: Add activities to courses
|
||||
| student2 | C1 | student |
|
||||
And I log in as "admin"
|
||||
And I follow "Course 1"
|
||||
When I turn editing mode on
|
||||
And I add a "Database" to section "3" and I fill the form with:
|
||||
And I turn editing mode on
|
||||
|
||||
@javascript
|
||||
Scenario: Add an activity to a course
|
||||
When I add a "Database" to section "3" and I fill the form with:
|
||||
| Name | Test name |
|
||||
| Description | Test database description |
|
||||
| Required entries | 9 |
|
||||
@ -35,21 +37,29 @@ Feature: Add activities to courses
|
||||
|
||||
@javascript
|
||||
Scenario: Add an activity without the required fields
|
||||
Given the following "users" exists:
|
||||
| username | firstname | lastname | email |
|
||||
| student1 | Student | 1 | student1@asd.com |
|
||||
| student2 | Student | 2 | student2@asd.com |
|
||||
And the following "courses" exists:
|
||||
| fullname | shortname | format |
|
||||
| Course 1 | C1 | topics |
|
||||
And the following "course enrolments" exists:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
| student2 | C1 | student |
|
||||
And I log in as "admin"
|
||||
And I follow "Course 1"
|
||||
When I turn editing mode on
|
||||
And I add a "Database" to section "3" and I fill the form with:
|
||||
When I add a "Database" to section "3" and I fill the form with:
|
||||
| Name | Test name |
|
||||
Then I should see "Adding a new"
|
||||
And I should see "Required"
|
||||
|
||||
Scenario: Add an activity to a course with Javascript disabled
|
||||
Then I should see "Add a resource to section 'Topic 1'"
|
||||
And I should see "Add an activity to section 'Topic 1'"
|
||||
And I should see "Add a resource to section 'Topic 2'"
|
||||
And I should see "Add an activity to section 'Topic 2'"
|
||||
And I should see "Add a resource to section 'Topic 3'"
|
||||
And I should see "Add an activity to section 'Topic 3'"
|
||||
And I add a "Label" to section "2"
|
||||
And I should see "Adding a new Label to Topic 2"
|
||||
And I fill the moodle form with:
|
||||
| Label text | I'm a label |
|
||||
And I press "Save and return to course"
|
||||
And I add a "Database" to section "3"
|
||||
And I should see "Adding a new Database to Topic 3"
|
||||
And I fill the moodle form with:
|
||||
| Name | Test database name |
|
||||
| Description | Test database description |
|
||||
And I press "Save and return to course"
|
||||
And I should not see "Adding a new"
|
||||
And I should see "Test database name"
|
||||
And I should see "I'm a label"
|
||||
|
Loading…
x
Reference in New Issue
Block a user