Skip to content

Commit 45f1f0b

Browse files
committed
Scaffold first cucumber feature
This cucumber feature sketches the first idea of a cucumber test, not implemented of course.
1 parent bb714bf commit 45f1f0b

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

features/importPost.feature

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Feature: Import a post from an organization and publish it in Human Connection
2+
As an organization like e.g. "Democracy"
3+
I would like to publish a post under the organization's credentials
4+
In order to create awareness in Human Connection for my organization
5+
6+
7+
Background:
8+
Given there is an organization in Human Connection with these credentials:
9+
| Email | Password |
10+
| organization@example.com | 1234 |
11+
12+
Scenario: Get a JWT token
13+
When I send a POST request to "/authentication" with:
14+
"""
15+
{
16+
"email": "[email protected]",
17+
"password": "1234",
18+
"strategy": "local"
19+
}
20+
"""
21+
Then there is an access token in the response:
22+
"""
23+
{
24+
accessToken: [...]
25+
}
26+
"""
27+
28+
Scenario: Publish a post
29+
Given I am authenticated
30+
When I send a POST request to "/contributions" with:
31+
"""
32+
{
33+
"title": "Cool title",
34+
"content": "<p>A nice content</p>",
35+
"contentExcerpt": "Nice",
36+
"type": 'post',
37+
"language": 'de',
38+
"categoryIds: ['5ac7768f8d655d2ee6d48fe4']
39+
}
40+
"""
41+
Then a new post should be created

0 commit comments

Comments
 (0)