@qavajs/cypress 2.5.0 → 2.6.0

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/CHANGELOG.md CHANGED
@@ -10,6 +10,9 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
10
10
  :pencil: - chore
11
11
  :microscope: - experimental
12
12
 
13
+ ## [2.6.0]
14
+ - :rocket: added `I save value of...` step
15
+
13
16
  ## [2.5.0]
14
17
  - :rocket: added http steps
15
18
 
package/lib/memory.js CHANGED
@@ -3,9 +3,9 @@ import { dataTable2Object } from './utils';
3
3
 
4
4
  /**
5
5
  * Save text of element to memory
6
- * @param {string} alias - element to get value
6
+ * @param {string} alias - element to get text
7
7
  * @param {string} key - key to store value
8
- * @example I save text of '#1 of Search Results' as 'firstSearchResult'
8
+ * @example I save text of 'Search Result' as 'firstSearchResult'
9
9
  */
10
10
  When('I save text of {locator} as {value}', function (locator, key) {
11
11
  locator.then(e => {
@@ -13,6 +13,19 @@ When('I save text of {locator} as {value}', function (locator, key) {
13
13
  });
14
14
  });
15
15
 
16
+ /**
17
+ * Save value of element to memory
18
+ * @param {string} alias - element to get value
19
+ * @param {string} key - key to store value
20
+ * @example I save value of 'Search Input' as 'searchInput'
21
+ */
22
+ When('I save value of {locator} as {value}', function (locator, key) {
23
+ locator.then(e => {
24
+ key.set(e.val());
25
+ });
26
+ });
27
+
28
+
16
29
  /**
17
30
  * Save property of element to memory
18
31
  * @param {string} property - property to store
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qavajs/cypress",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "qavajs for cypress runner",
5
5
  "main": "index.js",
6
6
  "scripts": {