From 0b0aedf5b29bd1782d136d98719b2b8011f82008 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Tue, 15 Dec 2020 11:53:42 +0100 Subject: [PATCH] test(e2e): combine scenarios 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. --- features/DeviceMessages.feature | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/features/DeviceMessages.feature b/features/DeviceMessages.feature index 3e5c2da3..7bfc36cd 100644 --- a/features/DeviceMessages.feature +++ b/features/DeviceMessages.feature @@ -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: @@ -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} } } @@ -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 """ @@ -42,10 +41,10 @@ Feature: Device: Messages """ [ { - "value": 1 + "value": {button1} }, { - "value": 0 + "value": {button2} } ] """