source: moodle/trunk/fuentes/admin/tool/behat/tests/behat/basic_actions.feature @ 136

Last change on this file since 136 was 136, checked in by mabarracus, 4 years ago

Ported code to xenial

File size: 2.2 KB
Line 
1@tool @tool_behat
2Feature: Page contents assertions
3  In order to write good tests
4  As a tests writer
5  I need to check the page contents
6
7  @javascript
8  Scenario: Basic contents assertions
9    Given I log in as "admin"
10    And I am on homepage
11    And I expand "Users" node
12    And I follow "Groups"
13    And I press "Create group"
14    And I set the following fields to these values:
15      | Group name | I'm the name |
16      | Group description | I'm the description |
17    And I press "Save changes"
18    When I follow "Overview"
19    And I wait until the page is ready
20    And I wait "2" seconds
21    And I hover "#region-main .generaltable td span" "css_element"
22    Then I should see "I'm the description"
23    And "Grouping" "select" in the "region-main" "region" should be visible
24    And "Group" "select" should be visible
25    And "Messaging" "link" in the "Administration" "block" should not be visible
26    And "Change password" "link" should not be visible
27    And I should see "Filter groups by"
28    And I should not see "Filter groupssss by"
29    And I should see "Group members" in the "#region-main table th.c1" "css_element"
30    And I should not see "Group membersssss" in the "#region-main table th.c1" "css_element"
31    And I follow "Groups"
32    And the "#groupeditform #showcreateorphangroupform" "css_element" should be enabled
33    And the "#groupeditform #showeditgroupsettingsform" "css_element" should be disabled
34
35  @javascript
36  Scenario: Locators inside specific DOM nodes using CSS selectors
37    Given the following "courses" exist:
38      | fullname | shortname | category |
39      | Course 1 | C1 | 0 |
40    And I log in as "admin"
41    And I follow "Course 1"
42    When I dock "Administration" block
43    Then I should not see "Question bank" in the ".block-region" "css_element"
44    And I click on "//div[@id='dock']/descendant::h2[normalize-space(.)='Administration']" "xpath_element"
45
46  @javascript
47  Scenario: Locators inside specific DOM nodes using XPath
48    Given the following "courses" exist:
49      | fullname | shortname | category |
50      | Course 1 | C1 | 0 |
51    And I log in as "admin"
52    When I dock "Administration" block
53    Then I should not see "Turn editing on" in the ".block-region" "css_element"
Note: See TracBrowser for help on using the repository browser.