@cuppet/core 1.3.6 → 1.3.7
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.
|
@@ -26,7 +26,7 @@ Then('the property {string} should be an {string}', async function (property, ty
|
|
|
26
26
|
await apiSteps.propertyIs(property, type);
|
|
27
27
|
});
|
|
28
28
|
Then('the response should have property {string} with value {string}', async function (property, value) {
|
|
29
|
-
const checkedValue = await dataStorage.
|
|
29
|
+
const checkedValue = await dataStorage.checkForSavedVariable(value);
|
|
30
30
|
await apiSteps.propertyHasValue(property, checkedValue);
|
|
31
31
|
});
|
|
32
32
|
When('I store {string} to {string} variable', async function (property, variable) {
|
package/package.json
CHANGED
package/src/dataStorage.js
CHANGED
|
@@ -283,10 +283,7 @@ module.exports = {
|
|
|
283
283
|
* @returns {Promise<void>}
|
|
284
284
|
*/
|
|
285
285
|
generateAndSaveDateWithCustomFormat: async function (format, variable, days = 0) {
|
|
286
|
-
const date = moment()
|
|
287
|
-
.add(days >= 0 ? days : -days, 'days')
|
|
288
|
-
.format(format);
|
|
289
|
-
|
|
286
|
+
const date = moment().add(days, 'days').format(format);
|
|
290
287
|
await this.iStoreVariableWithValueToTheJsonFile(date, variable);
|
|
291
288
|
},
|
|
292
289
|
|
|
@@ -300,10 +297,7 @@ module.exports = {
|
|
|
300
297
|
* @returns {Promise<void>}
|
|
301
298
|
*/
|
|
302
299
|
generateAndSaveDateWithCustomFormatAndTz: async function (format, variable, days = 0, offset = 0) {
|
|
303
|
-
const date = moment()
|
|
304
|
-
.utcOffset(offset)
|
|
305
|
-
.add(days >= 0 ? days : -days, 'days')
|
|
306
|
-
.format(format);
|
|
300
|
+
const date = moment().utcOffset(offset).add(days, 'days').format(format);
|
|
307
301
|
await this.iStoreVariableWithValueToTheJsonFile(date, variable);
|
|
308
302
|
},
|
|
309
303
|
};
|