artes 1.1.2 → 1.1.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "artes",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "The simplest way to automate UI and API tests using Cucumber-style steps.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -128,7 +128,13 @@ class Elements {
128
128
  static resolveVariable(template) {
129
129
  if (typeof template !== "string") return template;
130
130
  return template.replace(/{{\s*(\w+)\s*}}/g, (_, varName) => {
131
- const value = context.vars[varName];
131
+ let value = context.vars[varName];
132
+ if (typeof value === "string") {
133
+ value = value
134
+ .replace(/\n/g, "\\n")
135
+ .replace(/\r/g, "\\r")
136
+ .replace(/\t/g, "\\t");
137
+ }
132
138
  return value !== undefined ? value : `{{${varName}}}`;
133
139
  });
134
140
  }