generic.feature 2.67 KB
Newer Older
1
2
3
@api @generic
Feature: Generic site features and global health

4
@basic
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Scenario: The homepage must load properly
  Given I am on the homepage
  Then I should get a "200" HTTP response

Scenario: Accessing to admin menu toolbar
  Given I am logged in as a user with the "administrator" role
  When I am on the homepage
  Then I should see an "div#admin-menu-wrapper" element

Scenario: The cache can be cleared
  Given the cache has been cleared
  When I am on the homepage
  Then I should get a "200" HTTP response

Scenario: An administrator can administer the modules
  Given I am logged in as a user with the "administrator" role
  When I am on "/admin/modules"
  Then I should get a "200" HTTP response

Scenario: An anonymous user can not access to admin pages
  Given I am an anonymous user
  When I am on "/admin"
  Then I should get a "403" HTTP response

Scenario: An administrator can create users
  Given users:
  | name     | mail            | status |
  | Joe User | joe@example.com | 1      |
  And I am logged in as a user with the "administrator" role
  When I visit "admin/people"
  Then I should see the link "Joe User"

Scenario: An administrator can create users with roles
  Given users:
  | name     | mail            | roles         |
  | Joe User | joe@example.com | administrator |
  And I am logged in as a user with the "administrator" role
  When I visit "admin/people"
  Then I should see the text "administrator" in the "Joe User" row

Scenario: Run cron
  Given I am logged in as a user with the "administrator" role
  When I run cron
  And am on "admin/reports/status"
Emmanuel Milou's avatar
Emmanuel Milou committed
49
  Then I should see the link "run cron manually"
50
51
52
53

Scenario: Login as a user created during this scenario
  Given users:
  | name      | status     | roles |
Emmanuel Milou's avatar
Emmanuel Milou committed
54
  | Test user | 1          | authenticated user |
55
  When I am logged in as "Test user"
Emmanuel Milou's avatar
Emmanuel Milou committed
56
  Then I should see the link "Log out"
57
58
59

Scenario: Error messages
  Given I am on "/user"
Emmanuel Milou's avatar
Emmanuel Milou committed
60
  When I press "Log in"
61
  Then I should see the following error messages:
62
  | error messages |
63
64
  | Username field is required. |
  | Password field is required. |
65
66
  And I should not see the following error messages:
  | error messages |
67
  | Sorry, unrecognized username or password. |
68
69
70
71
72
73
74
75
76
77
78
79

Scenario: drush command with text matching: drush output correct status
  Given I run drush "st"
  Then drush output should contain "Drupal version"
  Then drush output should contain "Site URI"
  Then drush output should contain "Database driver"
  Then drush output should contain "Successful"
  Then drush output should not contain "NonExistantWord"

Scenario: drush command with arguments: re-enable system
  Given I run drush "en" "system -y"
  Then drush output should contain "system is already enabled."