Skip to content

Commit ab68b28

Browse files
committed
feat: cookie
1 parent 8f7af32 commit ab68b28

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

.engine_scripts/playwright/loadCookies.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,12 @@ module.exports = async (browserContext, scenario) => {
2525
let domains = typeof c.domain === 'string' ? [c.domain] : c.domain;
2626

2727
[].forEach.call(domains, (domain) => {
28-
const cookie = { ...c };
29-
if (domain.startsWith('http://') || domain.startsWith('https://')) {
30-
cookie.url = domain;
31-
} else {
32-
cookie.url = 'https://' + domain;
33-
}
28+
const cookie = { ...c, domain };
3429

3530
if (!cookie.expirationDate) {
3631
cookie.expirationDate = Date.now() / 1000 + 31536000; // 1 year from now
3732
}
3833

39-
cookie.domain = undefined;
40-
delete cookie.domain;
41-
4234
cookies.push(cookie);
4335
});
4436
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "regressify",
3-
"version": "1.8.4",
3+
"version": "1.8.5",
44
"description": "Visual regression tests support",
55
"main": "src/index.ts",
66
"type": "module",

0 commit comments

Comments
 (0)