Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
6efe391
Initial setup for Project
sphinix27 Sep 28, 2017
7f2aa39
Adding Json Spec
sphinix27 Sep 28, 2017
8d7b34c
Merge pull request #1 from AT-04/feature/Notifier-API-001-Initial-Pro…
Oct 2, 2017
e13bbb3
Adding conversion to JSON
sphinix27 Oct 2, 2017
4653a74
ENV.YML and After Configuration
Oct 2, 2017
4fbcd02
Merge pull request #2 from AT-04/feature/Notifier-API-002-Response-Ma…
yuryver Oct 2, 2017
346e173
Merge pull request #3 from AT-04/Notifier_API_003_Env.Yml_and_After_C…
yuryver Oct 2, 2017
c3b2924
base for conect to database
Oct 2, 2017
089077b
Merge pull request #4 from AT-04/feature/Notifier-API-004-Adding-Data…
OvidioMiranda Oct 2, 2017
e61aa99
improve yml file
Oct 2, 2017
dc69543
Merge remote-tracking branch 'origin/develop' into Notifier_API_003_E…
Oct 2, 2017
e9d4668
Merge pull request #5 from AT-04/Notifier_API_003_Env.Yml_and_After_C…
OvidioMiranda Oct 2, 2017
9788fa5
Adding Request Manager
OvidioMiranda Oct 2, 2017
7f2fd7f
Solving merge conflicts
OvidioMiranda Oct 2, 2017
d0af5c2
Adding structure
OvidioMiranda Oct 2, 2017
0758724
Merge pull request #6 from AT-04/feature/Notifier-API-005-Request-Man…
sphinix27 Oct 2, 2017
4326b32
Refactoring Api Request and adding new features
sphinix27 Oct 2, 2017
12ed3a5
Adding Smoke Tests
Oct 2, 2017
aa59f38
advanced enpoint builder
Oct 3, 2017
9f89528
Merge pull request #7 from AT-04/feature/Notifier_API_006_Smoke
sphinix27 Oct 3, 2017
ccd22b7
Improving the response manager
sphinix27 Oct 3, 2017
a430837
Merging changes of develop
sphinix27 Oct 3, 2017
845c13d
build enpoint
Oct 3, 2017
1384efa
complete builder endpoint
Oct 3, 2017
e0837cd
Merge pull request #9 from AT-04/feature/Notifier-API-007-Channels-CRUD
Oct 3, 2017
66a6e83
complete builder endpoint
Oct 3, 2017
6a8a7de
merge with deve
Oct 3, 2017
c7d6efd
Merge pull request #8 from AT-04/feature/Notifier-API-009-Endpoint-bu…
sphinix27 Oct 3, 2017
c371053
Implementing get channels
sphinix27 Oct 3, 2017
f23494b
Updating get channels crud
sphinix27 Oct 3, 2017
718e307
Merge pull request #10 from AT-04/feature/Notifier-API-007-Channels-CRUD
OvidioMiranda Oct 3, 2017
a2a8b28
Adding Put channel crud
sphinix27 Oct 3, 2017
d7d3320
Adding delete channel crud, Hooks for delete channels
sphinix27 Oct 3, 2017
93a6cf9
Merge pull request #11 from AT-04/feature/Notifier-API-007-Channels-CRUD
Oct 3, 2017
54ae0cc
post resend notification
Oct 3, 2017
07a4d4c
post reesnd notification
Oct 3, 2017
9b8a1ec
corrections resend notification
Oct 3, 2017
3e895b3
Merge pull request #12 from AT-04/feature/Notifier-API-011-Resend-not…
sphinix27 Oct 3, 2017
eccc96d
Adding templates CRUD
Oct 3, 2017
fcef43f
Resolving conflicts
Oct 3, 2017
0202ba6
Merge pull request #13 from AT-04/feature/Notifer_API_008_Templates_CRUD
sphinix27 Oct 3, 2017
8300e3e
Increasing crud coverage
sphinix27 Oct 3, 2017
3db99a8
Merge pull request #14 from AT-04/feature/Notifier-API-012-Channels-F…
Oct 3, 2017
dcf9b59
Adding GET-POST Notifications
OvidioMiranda Oct 4, 2017
440ab44
Merge remote-tracking branch 'origin/develop' into feature/Notifier-A…
OvidioMiranda Oct 4, 2017
0f6105e
Merge pull request #15 from AT-04/feature/Notifier-API-010-Notificati…
yuryver Oct 4, 2017
695301a
Improvement of the step waiting until the change of a parameter
OvidioMiranda Oct 4, 2017
04b166a
dinamic paramethers
Oct 4, 2017
6532994
Merge pull request #16 from AT-04/feature/Notifier-API-010-Notificati…
yuryver Oct 4, 2017
00f0324
corrections conflicts
Oct 4, 2017
007db7a
Improving Response Manager, adding more functional tests
sphinix27 Oct 4, 2017
d37ee1c
Merge pull request #18 from AT-04/feature/Notifier-API-012-Channels-F…
OvidioMiranda Oct 4, 2017
fc83723
Refactor of the step waiting until the change of a parameter
OvidioMiranda Oct 4, 2017
515fd97
Delete spaces
OvidioMiranda Oct 4, 2017
6b060c8
Solving conflicts
OvidioMiranda Oct 4, 2017
2d3eb53
Merge pull request #19 from AT-04/feature/Notifier-API-010-Notificati…
yuryver Oct 5, 2017
0ba5f67
implement dynamic enpoint and wait time
Oct 5, 2017
7a248d8
corrections dynamic enpoint
Oct 5, 2017
6dc4207
Merge pull request #21 from AT-04/feature/Notifier-API-011-Resend-not…
OvidioMiranda Oct 5, 2017
a9c4a0a
Refactor code - Post notifications
OvidioMiranda Oct 5, 2017
62ffb4c
Code Fix - Post notifications CRUD
OvidioMiranda Oct 5, 2017
b47bffd
Resolving Conflicts
OvidioMiranda Oct 5, 2017
fa0ccf0
Merge pull request #22 from AT-04/feature/Notifier-API-010-Notificati…
yuryver Oct 5, 2017
b43b9ba
corrections resend notification
Oct 5, 2017
8eb6aa5
corrections name
Oct 5, 2017
59b4508
Merge pull request #23 from AT-04/feature/Notifier-API-011-Resend-not…
OvidioMiranda Oct 5, 2017
1eba5ee
Increasing Functional Post Channels
sphinix27 Oct 5, 2017
678ee5b
Merging with changes in develop branch
sphinix27 Oct 5, 2017
516b058
Solving empty errors
sphinix27 Oct 5, 2017
4c6bd86
Merge pull request #24 from AT-04/feature/Notifier-API-012-Channels-F…
OvidioMiranda Oct 5, 2017
e84ade2
Improved Get notifications
OvidioMiranda Oct 5, 2017
81da7ba
advanced functional testing templates
Oct 5, 2017
a9808d2
merge with develop
Oct 5, 2017
f1e14d4
Code fix
OvidioMiranda Oct 5, 2017
6ac83af
Adding negatives features for Notifications
OvidioMiranda Oct 6, 2017
6b6d3eb
Improved negative test for Notifications
OvidioMiranda Oct 6, 2017
df872a9
Improved CRUD
OvidioMiranda Oct 6, 2017
5a89cde
Delete unnecessary puts
OvidioMiranda Oct 6, 2017
b840683
Merge pull request #25 from AT-04/feature/Notifier-API-010-Notificati…
sphinix27 Oct 6, 2017
288828e
Adding get, post and put functional test for channels
sphinix27 Oct 6, 2017
7ddff63
Merge remote-tracking branch 'origin/develop' into feature/Notifier-A…
sphinix27 Oct 6, 2017
9a0ed53
Merge pull request #26 from AT-04/feature/Notifier-API-012-Channels-F…
OvidioMiranda Oct 6, 2017
31f6f73
functional templates
Oct 6, 2017
cf06e7f
corrections merge
Oct 6, 2017
48a1564
adding generated reports
Oct 6, 2017
cec6d3a
Merge remote-tracking branch 'origin/develop' into feature/Notifier_A…
Oct 6, 2017
2e720d1
Merge pull request #27 from AT-04/feature/Notifier_API_013_Reports
sphinix27 Oct 6, 2017
eee0453
Fixing missing steps
sphinix27 Oct 6, 2017
afb0e7a
Merge pull request #29 from AT-04/feature/Notifier-API-012-Channels-F…
Oct 6, 2017
5152bce
corrections rubocop
Oct 6, 2017
d2b7cb6
Merge pull request #28 from AT-04/feature/Notifier-API-014-templates-…
sphinix27 Oct 6, 2017
90833ce
adding tags
Oct 6, 2017
c41a303
Merge remote-tracking branch 'origin/develop' into feature/Notifier_A…
Oct 6, 2017
4cbde95
Merge pull request #30 from AT-04/feature/Notifier_API_013_Reports
sphinix27 Oct 6, 2017
3ce33c0
adding negatives functional channels features
Oct 7, 2017
598d0e0
adding tags
Oct 7, 2017
f40923a
Merge pull request #31 from AT-04/feature/Notifier_API_016_delete_cha…
OvidioMiranda Oct 7, 2017
a0a7f88
corrections functional testing for templates
Oct 7, 2017
80045bc
Merge pull request #32 from AT-04/feature/Notifier-API-014-templates-…
Oct 7, 2017
a3aea3d
delete duplicates
Oct 7, 2017
fa1ed5f
Merge pull request #33 from AT-04/feature/Notifier-API-014-templates-…
OvidioMiranda Oct 7, 2017
c51c6b0
Code Fix- CRUD Notificatcion
OvidioMiranda Oct 7, 2017
110acbc
Merge remote-tracking branch 'origin/develop' into feature/Notifier-A…
OvidioMiranda Oct 7, 2017
ed48273
adding negatives
Oct 7, 2017
f6db00e
Merge remote-tracking branch 'origin/develop' into feature/Notifier_A…
Oct 7, 2017
83fa016
adding negative features
Oct 7, 2017
af6154b
Adding Scenario Notifications for Slack
OvidioMiranda Oct 7, 2017
ec36433
Adding Scenario Notifications for Slack - Multple recipients
OvidioMiranda Oct 7, 2017
8ff8f93
Adding Negative Test-Notification-Send notification without parameters
OvidioMiranda Oct 8, 2017
92bc107
Adding Negative Test-Notification-Send notification invalid endpoint
OvidioMiranda Oct 8, 2017
e26ba7d
Adding Negative Test -Notification-Send with nonexistent priority
OvidioMiranda Oct 9, 2017
4d4a158
Merge pull request #34 from AT-04/feature/Notifier-API-015-Notificati…
sphinix27 Oct 9, 2017
062dcef
Adding Negative Test -Get Notification
OvidioMiranda Oct 9, 2017
d6ad6fb
improve negatives features
Oct 9, 2017
a4fcaa9
Merge remote-tracking branch 'origin/develop' into feature/Notifier_A…
Oct 9, 2017
2a060d5
complete notification with template and dynamic builder body
Oct 9, 2017
12c06c5
corrections conflicts
Oct 9, 2017
48aaeab
Merge pull request #36 from AT-04/feature/Notifier-API-018-functional…
Oct 9, 2017
55754c1
adding negatives templates features
Oct 9, 2017
64ad80b
Merge remote-tracking branch 'origin/develop' into feature/Notifier_A…
Oct 9, 2017
253968e
adding negative features with params
Oct 9, 2017
d03e922
adding generator of words
Oct 9, 2017
97688e6
Adding Negative Test - Resend Notifications
OvidioMiranda Oct 9, 2017
4dc942c
adding post templates
Oct 9, 2017
723293a
Merge pull request #37 from AT-04/feature/Notifier_API-017_Templates_…
OvidioMiranda Oct 9, 2017
45eda17
Changing a state
OvidioMiranda Oct 9, 2017
3f18de9
Merge remote-tracking branch 'origin/develop' into feature/Notifier-A…
OvidioMiranda Oct 9, 2017
0dd7843
fix a feature and adding tags
Oct 9, 2017
ff14836
Merge pull request #38 from AT-04/feature/Notifier_API-017_Templates_…
OvidioMiranda Oct 9, 2017
aaddb9e
Updating
OvidioMiranda Oct 9, 2017
cf52c71
Merge pull request #39 from AT-04/feature/Notifier-API-015-Notificati…
Oct 9, 2017
e5a0a7d
adding negative post feature
Oct 9, 2017
bea57a2
Merge remote-tracking branch 'origin/develop' into feature/Notifier_A…
Oct 9, 2017
a0b6f65
adding templates features
Oct 10, 2017
c524596
adding negative features
Oct 10, 2017
8719f00
Adding Negative Test -Get Notification with invalid id and invalid pa…
OvidioMiranda Oct 10, 2017
adc00fb
Refactoring response manager and features
sphinix27 Oct 10, 2017
23398e1
Adding Negative Test Notifications-Incorrect request
OvidioMiranda Oct 10, 2017
92cc652
Merging with develop
sphinix27 Oct 10, 2017
f07f580
Adding get templates crud
sphinix27 Oct 10, 2017
34e6051
Merge pull request #40 from AT-04/feature/Notifier-API-015-Notificati…
sphinix27 Oct 10, 2017
531d259
Merge remote-tracking branch 'origin' into feature/Notifier-API-019-A…
sphinix27 Oct 10, 2017
c06c8cc
adding negative post features
Oct 10, 2017
2234adb
Merge remote-tracking branch 'origin/develop' into feature/Notifier_A…
Oct 10, 2017
5bb3e5e
Merge pull request #41 from AT-04/feature/Notifier-API-019-Adding_mor…
Oct 10, 2017
60bcb17
fix some features
Oct 10, 2017
9c7b2fe
delete methods
Oct 10, 2017
dd5104e
adding negative post feature
Oct 10, 2017
28ec183
adding negative feature
Oct 10, 2017
5840ec6
merging with develop
Oct 10, 2017
cc72d30
Merge pull request #42 from AT-04/feature/Notifier_API-017_Templates_…
sphinix27 Oct 10, 2017
e7e2caf
Adding Negative Test Notifications
OvidioMiranda Oct 10, 2017
9f475fb
Merge remote-tracking branch 'origin/develop' into feature/Notifier-A…
OvidioMiranda Oct 10, 2017
34bb9de
Code Fix - Negative Test
OvidioMiranda Oct 10, 2017
8b5fa29
Fixing Feature Post Channel
OvidioMiranda Oct 10, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
*.gem
*.rbc
/.config
Expand Down
13 changes: 13 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
inherit_from: .rubocop_todo.yml

Layout/EndOfLine:
EnforcedStyle: lf

Style/GlobalVars:
Description: 'Do not introduce global variables.'
StyleGuide: '#instance-vars'
Reference: 'http://www.zenspider.com/Languages/Ruby/QuickRef.html'
Enabled: false

Metrics/LineLength:
Max: 130
7 changes: 7 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2017-09-28 18:58:27 -0400 using RuboCop version 0.50.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
15 changes: 15 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

source 'https://rubygems.org'

git_source(:github) { 'https://github.com/sphinix27/notifier_api_test' }

gem 'cucumber'
gem 'json'
gem 'json_spec'
gem 'pg'
gem 'rake'
gem 'report_builder'
gem 'rest-client'
gem 'rspec'
gem 'rubocop', '~> 0.50.0', require: false
91 changes: 91 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
GEM
remote: https://rubygems.org/
specs:
ast (2.3.0)
builder (3.2.3)
cucumber (2.4.0)
builder (>= 2.1.2)
cucumber-core (~> 1.5.0)
cucumber-wire (~> 0.0.1)
diff-lcs (>= 1.1.3)
gherkin (~> 4.0)
multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.1.2)
cucumber-core (1.5.0)
gherkin (~> 4.0)
cucumber-wire (0.0.1)
diff-lcs (1.3)
domain_name (0.5.20170404)
unf (>= 0.0.5, < 1.0.0)
ffi (1.9.18-x64-mingw32)
gherkin (4.1.3)
http-cookie (1.0.3)
domain_name (~> 0.5)
json (2.0.2)
json_spec (1.1.5)
multi_json (~> 1.0)
rspec (>= 2.0, < 4.0)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
multi_json (1.12.2)
multi_test (0.1.2)
netrc (0.11.0)
parallel (1.12.0)
parser (2.4.0.0)
ast (~> 2.2)
pg (0.21.0-x64-mingw32)
powerpack (0.1.1)
rainbow (2.2.2)
rake
rake (12.1.0)
report_builder (0.1.6)
builder (~> 3.2, >= 3.2.2)
json (>= 1.8.1)
rest-client (2.0.2-x64-mingw32)
ffi (~> 1.9)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rspec (3.6.0)
rspec-core (~> 3.6.0)
rspec-expectations (~> 3.6.0)
rspec-mocks (~> 3.6.0)
rspec-core (3.6.0)
rspec-support (~> 3.6.0)
rspec-expectations (3.6.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.6.0)
rspec-mocks (3.6.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.6.0)
rspec-support (3.6.0)
rubocop (0.50.0)
parallel (~> 1.10)
parser (>= 2.3.3.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 3.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.9.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.4-x64-mingw32)
unicode-display_width (1.3.0)

PLATFORMS
x64-mingw32

DEPENDENCIES
cucumber
json
json_spec
pg
rake
report_builder
rest-client
rspec
rubocop (~> 0.50.0)

BUNDLED WITH
1.15.4
21 changes: 21 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
require 'rubygems'
require 'cucumber'
require 'cucumber/rake/task'
require 'report_builder'

desc 'This task built the json report '
task :rjson, [:tag] do |t, args|
sh "cucumber -t @#{args.tag} -f json -o reports/#{args.tag}/report.json"
end

desc 'This task built the html report '
task :rhtml, [:tag] do |t, args|
ReportBuilder.configure do |config|
config.json_path = "reports/#{args.tag}/"
config.report_path = "reports/#{args.tag}/report"
config.report_types = [:html]
config.report_title = 'Notifier Report Results'
config.include_images = false
end
ReportBuilder.build_report
end
22 changes: 22 additions & 0 deletions features/crud/delete_channel.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@all @crud
Feature: CRUD for channels

Background:
Given I make a 'POST' request to '/channels' endpoint
When I set the body as:
"""
{
"name": "AT04-Slack-Demo",
"type": "SLACK",
"configuration": {
"url": "https://hooks.slack.com/services/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"
}
}
"""
And I execute the request to the endpoint
Then I expect a '200' status code
And I save the 'id' of 'channels'
Scenario: Delete channel by id
Given I make a 'DELETE' request to '/channels/$id' endpoint
When I execute the request to the endpoint
Then I expect a '200' status code
22 changes: 22 additions & 0 deletions features/crud/delete_template.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@all @crud
Feature: delete template

Background:
Scenario: create a new template
Given I make a 'POST' request to '/templates' endpoint
When I set the body as:
"""
{
"name": "Template for delete",
"contentTemplate": "This should be at least 20 chars"
}
"""
When I execute the request to the endpoint
Then I expect a '201' status code
And I save the 'id' of 'templates'

Scenario: delete a specific template
Given I make a 'Delete' request to '/templates/$id' endpoint
When I execute the request to the endpoint
Then I expect a '200' status code
And I expect that the GET response it is empty
30 changes: 30 additions & 0 deletions features/crud/get_all_channels.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
@all @crud
Feature: Get all channels

Background:
Given I make a 'POST' request to '/channels' endpoint
When I set the body as:
"""
{
"name": "AT04-Web-Hook-Demo",
"type": "WEB_HOOK",
"configuration": {
"url": "https://hooks.slack.com/services/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"
}
}
"""
And I execute the request to the endpoint
Then I expect a '200' status code
And I save the 'id' of 'channels'
@delete_channel
Scenario: Get all channels
Given I make a 'GET' request to '/channels' endpoint
When I execute the request to the endpoint
Then I expect a '200' status code
And I build the response for "channels" with
"""
{
"onFail": null
}
"""
And The response body should contain the builded response
30 changes: 30 additions & 0 deletions features/crud/get_channels.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
@all @crud
Feature: CRUD for channels

Background:
Given I make a 'POST' request to '/channels' endpoint
When I set the body as:
"""
{
"name": "AT04-Slack-Demo",
"type": "SLACK",
"configuration": {
"url": "https://hooks.slack.com/services/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"
}
}
"""
And I execute the request to the endpoint
Then I expect a '200' status code
And I save the 'id' of 'channels'
@delete_channel
Scenario: Get channel by id
Given I make a 'GET' request to '/channels/$id' endpoint
When I execute the request to the endpoint
Then I expect a '200' status code
And I build the response for "channel" with
"""
{
"onFail": null
}
"""
And The response body is the same as builded
44 changes: 44 additions & 0 deletions features/crud/get_notification.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
@all @crud
Feature: GET request for notification endpoint

Background: Send a notification
Given I create a 'channel' with status code '200' and body as:
"""
{
"name": "AT04-Slack-Demo-for-Notifications",
"type": "SLACK",
"configuration": {
"url": "https://hooks.slack.com/services/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"
}
}
"""
And I save the 'id' of 'channels'
Then I make a 'POST' request to '/notifications' endpoint
When I set the body with id:
"""
{
"channelId": $channels_id,
"priority": "HIGH",
"recipients": ["#general"],
"subject": "Test API",
"content": "A testing message from notifier."
}
"""
When I execute the request to the endpoint
Then I expect a '200' status code
And I save the 'id' of 'notification'

@delete_channel
Scenario: Get notification by id
Given I make a 'GET' request to '/notifications/$id' endpoint
When I execute the request to the endpoint
Then I expect a '200' status code
And I build the response for "notification_status_history" with
"""
{
"attachments": {},
"templateId": null

}
"""
And The response body is the same as builded
24 changes: 24 additions & 0 deletions features/crud/get_template.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@all @crud
Feature: get specific template

Background:
Given I make a 'POST' request to '/templates' endpoint
When I set the body as:
"""
{
"name": "Template 1",
"contentTemplate": "This should be at least 20 chars"
}
"""
When I execute the request to the endpoint
Then I expect a '201' status code
And I save the 'id' of 'templates'
And I capture the response to the endpoint


Scenario: Get a specific template
Given I make a 'GET' request to '/templates/$id' endpoint
When I execute the request to the endpoint
Then I expect POST response is the same as GET response


25 changes: 25 additions & 0 deletions features/crud/get_templates.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@all @crud
Feature: get templates

Background:
Background:
Given I create a 'template' with status code '201' and body as:
"""
{
"name": "Template 1",
"contentTemplate": "This should be at least 20 chars"
}
"""
And I save the 'id' of 'templates'
@delete_channel
Scenario: Get all templates
Given I make a 'GET' request to '/templates' endpoint
When I execute the request to the endpoint
Then I expect a '200' status code
And I build the response for "templates" with
"""
{
"onFail": null
}
"""
And The response body should contain the builded response
25 changes: 25 additions & 0 deletions features/crud/post_channel.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@all @crud
Feature: Post request for channels endpoint
@delete_channel
Scenario: Create a new channel
Given I make a 'POST' request to '/channels' endpoint
And I set the body as:
"""
{
"name": "AT04-Slack-Demo1",
"type": "SLACK",
"configuration": {
"url": "https://hooks.slack.com/services/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"
}
}
"""
When I execute the request to the endpoint
Then I expect a '200' status code
And I save the 'id' of 'channels'
And I build the response for "channel" with
"""
{
"onFail": null
}
"""
And The response body is the same as builded
Loading