regressify 1.2.11 → 1.2.13
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.
|
@@ -19,7 +19,7 @@ module.exports = async (browserContext, scenario) => {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
// Add cookies to browser
|
|
22
|
-
browserContext.addCookies(cookies);
|
|
22
|
+
await browserContext.addCookies(cookies);
|
|
23
23
|
|
|
24
24
|
// console.log('Cookie state restored with:', JSON.stringify(cookies, null, 2));
|
|
25
25
|
console.log(logPrefix + 'Cookie state restored for: ' + scenario.label);
|
|
@@ -11,10 +11,11 @@ function getStorageState(stateName) {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
module.exports = async (page, scenario, viewport, isReference, browserContext) => {
|
|
14
|
+
const logPrefix = chalk.yellow(`[${scenario.index} of ${scenario.total}] `);
|
|
14
15
|
await require('./loadCookies')(browserContext, scenario);
|
|
15
16
|
|
|
16
17
|
if (scenario.restore) {
|
|
17
|
-
console.log('restore:', scenario.restore);
|
|
18
|
+
console.log(logPrefix + 'restore:', scenario.restore);
|
|
18
19
|
const states = getStorageState(scenario.restore);
|
|
19
20
|
await browserContext.storageState(states);
|
|
20
21
|
}
|