@dev-blinq/cucumber_client 1.0.1485-dev → 1.0.1486-dev

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.
@@ -1,3 +1,7 @@
1
+ import dotenv from "dotenv";
2
+ // Load .env into process.env
3
+ dotenv.config();
4
+
1
5
  import {
2
6
  After,
3
7
  setDefaultTimeout,
@@ -81,15 +81,24 @@ async function browserNavigateForward() {
81
81
  Then("Browser navigate forward", browserNavigateForward);
82
82
 
83
83
  /**
84
- * Use browser session "<path>"
85
- * @param {string} filePath the file path to use for the browser session files
84
+ * Store browser session "<path>"
85
+ * @param {string} filePath the file path or empty to store in the test data file
86
86
  * @protect
87
87
  */
88
- async function useBrowserSession(filePath) {
89
- await context.web.restoreSaveState(filePath, this);
88
+ async function storeBrowserSession(filePath) {
89
+ await context.web.saveStoreState(filePath, this);
90
90
  }
91
- When("Use browser session {string}", useBrowserSession);
91
+ When("Store browser session {string}", storeBrowserSession);
92
92
 
93
+ /**
94
+ * Reset browser session with session file "<path>"
95
+ * @param {string} filePath the file path or empty
96
+ * @protect
97
+ */
98
+ async function resetBrowserSession(filePath) {
99
+ await context.web.restoreSaveState(filePath, this);
100
+ }
101
+ When("Reset browser session {string}", resetBrowserSession);
93
102
 
94
103
  /**
95
104
  * Identify the text "<textAnchor>", climb "<climb>" levels in the page, validate text "<textToVerify>" can be found in the context
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-blinq/cucumber_client",
3
- "version": "1.0.1485-dev",
3
+ "version": "1.0.1486-dev",
4
4
  "description": " ",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",