(config)
| 411 | } |
| 412 | |
| 413 | function loadCookiesFromFile(config) { |
| 414 | for (const name in config.users) { |
| 415 | const fileName = path.join(store.outputDir, `${name}_session.json`) |
| 416 | if (!fileExists(fileName)) continue |
| 417 | const data = fs.readFileSync(fileName).toString() |
| 418 | try { |
| 419 | store[`${name}_session`] = JSON.parse(data) |
| 420 | } catch (err) { |
| 421 | throw new Error(`Could not load session from ${fileName}\n${err}`) |
| 422 | } |
| 423 | output.debug(`Loaded user session for ${name}`) |
| 424 | } |
| 425 | } |
| 426 | |
| 427 | function isPlaywrightSession() { |
| 428 | return !!container.helpers('Playwright') |
no test coverage detected