@cuppet/core 1.3.4 → 1.3.5
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.
- package/package.json +1 -1
- package/src/apiFunctions.js +7 -1
package/package.json
CHANGED
package/src/apiFunctions.js
CHANGED
|
@@ -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
|
-
|
|
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
|
/**
|