Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
test(e2e): combine scenarios
Browse files Browse the repository at this point in the history
This way if the publishing fails because of #759
the second scenario will never succeed.
So they are combined in order for the message publishing
to be retried as well.
  • Loading branch information
coderbyheart committed Dec 15, 2020
1 parent 465e5dd commit a760664
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions features/DeviceMessages.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Feature: Device: Messages

Devices can publish arbitrary messages on a special topic
Devices can publish arbitrary messages on the /messages topic

Background:

Expand All @@ -9,11 +9,13 @@ Feature: Device: Messages
Scenario: Devices publishes that a button was pressed

Given I store "$millis()" into "ts"
And I store "$floor($random() * 1024)" into "button1"
And I store "$floor($random() * 1024)" into "button2"
Then the cat tracker publishes this message to the topic {cat:id}/messages
"""
{
"btn": {
"v": 1,
"v": {button1},
"ts": {ts}
}
}
Expand All @@ -23,14 +25,11 @@ Feature: Device: Messages
"""
{
"btn": {
"v": 0,
"v": {button2},
"ts": {ts}
}
}
"""

Scenario: Query the message data

Given I am authenticated with Cognito
When I run this Timestream query
"""
Expand All @@ -42,10 +41,10 @@ Feature: Device: Messages
"""
[
{
"value": 1
"value": {button1}
},
{
"value": 0
"value": {button2}
}
]
"""

0 comments on commit a760664

Please sign in to comment.