Security update for permissions_by_term
[yaffs-website] / vendor / drupal / drupal-extension / doc / _static / snippets / api.feature
1 @api
2   Scenario: Create a node
3     Given I am logged in as a user with the "administrator" role
4     When I am viewing an "article" content with the title "My article"
5     Then I should see the heading "My article"
6
7   Scenario: Run cron
8     Given I am logged in as a user with the "administrator" role
9     When I run cron
10     And am on "admin/reports/dblog"
11     Then I should see the link "Cron run completed"
12
13   Scenario: Create many nodes
14     Given "page" content:
15     | title    |
16     | Page one |
17     | Page two |
18     And "article" content:
19     | title          |
20     | First article  |
21     | Second article |
22     And I am logged in as a user with the "administrator" role
23     When I go to "admin/content"
24     Then I should see "Page one"
25     And I should see "Page two"
26     And I should see "First article"
27     And I should see "Second article"
28
29   Scenario: Create nodes with fields
30     Given "article" content:
31     | title                     | promote | body             |
32     | First article with fields |       1 | PLACEHOLDER BODY |
33     When I am on the homepage
34     And follow "First article with fields"
35     Then I should see the text "PLACEHOLDER BODY"
36
37   Scenario: Create and view a node with fields
38     Given I am viewing an "Article" content:
39     | title | My article with fields! |
40     | body  | A placeholder           |
41     Then I should see the heading "My article with fields!"
42     And I should see the text "A placeholder"
43
44   Scenario: Create users
45     Given users:
46     | name     | mail            | status |
47     | Joe User | joe@example.com | 1      |
48     And I am logged in as a user with the "administrator" role
49     When I visit "admin/people"
50     Then I should see the link "Joe User"
51
52   Scenario: Login as a user created during this scenario
53     Given users:
54     | name      | status |
55     | Test user |      1 |
56     When I am logged in as "Test user"
57     Then I should see the link "Log out"
58
59   Scenario: Create a term
60     Given I am logged in as a user with the "administrator" role
61     When I am viewing a "tags" term with the name "My tag"
62     Then I should see the heading "My tag"
63
64   Scenario: Create many terms
65     Given "tags" terms:
66     | name    |
67     | Tag one |
68     | Tag two |
69     And I am logged in as a user with the "administrator" role
70     When I go to "admin/structure/taxonomy/tags"
71     Then I should see "Tag one"
72     And I should see "Tag two"
73
74   Scenario: Create nodes with specific authorship
75     Given users:
76     | name     | mail            | status |
77     | Joe User | joe@example.com | 1      |
78     And "article" content:
79     | title          | author   | body             | promote |
80     | Article by Joe | Joe User | PLACEHOLDER BODY | 1       |
81     When I am logged in as a user with the "administrator" role
82     And I am on the homepage
83     And I follow "Article by Joe"
84     Then I should see the link "Joe User"
85
86   Scenario: Create an article with multiple term references
87     Given "tags" terms:
88     | name      |
89     | Tag one   |
90     | Tag two   |
91     | Tag three |
92     | Tag four  |
93     And "article" content:
94     | title             | field_tags                   |
95     | My first article  | Tag one                      |
96     | My second article | Tag two, Tag three           |
97     | My third article  | Tag two, Tag three, Tag four |