generic.feature 2.89 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
49
50
51
52
53
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"
  Then I should see the link "lancer le cron manuellement"

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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
  When I am logged in as "Test user"
  Then I should see the link "Se déconnecter"

Scenario: Error messages
  Given I am on "/user"
  When I press "Se connecter"
  Then I should see the error message "Le champ Mot de passe est requis."
  And I should not see the error message "Désolé, nom d'utilisateur ou mot de passe non reconnu."
  And I should see the following error messages:
  | error messages |
  | Le champ Nom d'utilisateur est requis. |
  | Le champ Mot de passe est requis. |
  And I should not see the following error messages:
  | error messages |
  | Désolé, nom d'utilisateur ou mot de passe non reconnu. |

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."