@cuppet/core 1.3.4 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -87,7 +87,7 @@ When(
87
87
  */
88
88
  When(
89
89
  'I generate date in {string} format for {string} days from now with UTC offset {int} hours and store it in {string}',
90
- async function (format, offset, days, variable) {
90
+ async function (format, days, offset, variable) {
91
91
  const utcOffset = offset * 60;
92
92
  await dataStorage.generateAndSaveDateWithCustomFormatAndTz(format, variable, days, utcOffset);
93
93
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuppet/core",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
4
4
  "description": "Core testing framework components for Cuppet - BDD framework based on Cucumber and Puppeteer",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -200,13 +200,19 @@ module.exports = {
200
200
 
201
201
  /**
202
202
  * Validate value of property from the http response.
203
+ * Automatically converts expectedValue from Gherkin string to match the actual type (string, number, boolean, null).
203
204
  * @param property
204
205
  * @param expectedValue
205
206
  * @returns {Promise<void>}
206
207
  */
207
208
  propertyHasValue: async function (property, expectedValue) {
208
209
  const actualValue = await helper.getPropertyValue(this.response.data, property);
209
- assert.strictEqual(actualValue, expectedValue, `Property "${property}" does not have the expected value`);
210
+ const castedExpectedValue = helper.castPrimitiveType(expectedValue);
211
+ assert.strictEqual(
212
+ actualValue,
213
+ castedExpectedValue,
214
+ `Property "${property}" does not have the expected value. Expected: ${castedExpectedValue} , Actual: ${actualValue}`
215
+ );
210
216
  },
211
217
 
212
218
  /**