@google-psat/report 0.9.0-3 → 0.10.1-1
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/dist/dashboard/components/cookiesWithIssues/index.js +43 -0
- package/dist/dashboard/components/header/index.js +26 -0
- package/dist/dashboard/components/siteMapReport/cookies.js +73 -0
- package/dist/dashboard/components/siteMapReport/index.js +31 -0
- package/dist/dashboard/components/siteMapReport/layout.js +140 -0
- package/dist/dashboard/components/siteMapReport/sidebarData.js +46 -0
- package/dist/dashboard/components/siteMapReport/sitemapCookiesWithIssues.js +9 -0
- package/dist/dashboard/components/siteReport/components/layout.js +145 -0
- package/dist/dashboard/components/siteReport/index.js +33 -0
- package/dist/dashboard/components/siteReport/stateProviders/contentStore/index.js +55 -0
- package/dist/dashboard/components/siteReport/tabs/cookies/cookiesLandingContainer/cookieLanding/blockedCookiesSection.js +82 -0
- package/dist/dashboard/components/siteReport/tabs/cookies/cookiesLandingContainer/cookieLanding/cookiesSection.js +38 -0
- package/dist/dashboard/components/siteReport/tabs/cookies/cookiesLandingContainer/cookieLanding/exemptedCookiesSection.js +63 -0
- package/dist/dashboard/components/siteReport/tabs/cookies/cookiesLandingContainer/cookieLanding/framesSection.js +38 -0
- package/dist/dashboard/components/siteReport/tabs/cookies/cookiesLandingContainer/cookieLanding/index.js +17 -0
- package/dist/dashboard/components/siteReport/tabs/cookies/cookiesLandingContainer/cookieLanding/knownBreakages.js +53 -0
- package/dist/dashboard/components/siteReport/tabs/cookies/cookiesLandingContainer/cookieLanding/landing.js +110 -0
- package/dist/dashboard/components/siteReport/tabs/cookies/cookiesLandingContainer/index.js +58 -0
- package/dist/dashboard/components/siteReport/tabs/cookies/cookiesListing/index.js +47 -0
- package/dist/dashboard/components/siteReport/tabs/cookies/index.js +56 -0
- package/dist/dashboard/components/siteReport/tabs/index.js +54 -0
- package/dist/dashboard/components/siteReport/tabs/siteCookiesWithIssues/index.js +29 -0
- package/dist/dashboard/components/siteReport/tabs/technologies/index.js +91 -0
- package/dist/dashboard/components/utils/NamePrefixIconSelector.js +67 -0
- package/dist/dashboard/components/utils/extractCookies.js +36 -0
- package/dist/dashboard/components/utils/extractReportData.js +56 -0
- package/dist/dashboard/components/utils/reportDownloader/generateSiteMapReportandDownload.js +44 -0
- package/dist/dashboard/components/utils/reportDownloader/generateSiteReportandDownload.js +52 -0
- package/dist/dashboard/components/utils/reportDownloader/index.js +17 -0
- package/dist/dashboard/components/utils/reportDownloader/utils.js +148 -0
- package/dist/dashboard/components/utils/reshapeCookies.js +102 -0
- package/dist/dashboard/components/utils/tests/data.mock.js +176 -0
- package/dist/dashboard/components/utils/tests/extractCookies.js +84 -0
- package/dist/dashboard/components/utils/tests/extractReportData.js +64 -0
- package/dist/dashboard/components/utils/tests/reshapeCookies.js +89 -0
- package/dist/dashboard/hooks/useCookieListing/index.js +412 -0
- package/dist/dashboard/index.js +19 -0
- package/dist/index.js +16 -0
- package/dist-types/dashboard/components/cookiesWithIssues/index.d.ts +8 -0
- package/dist-types/dashboard/components/header/index.d.ts +6 -0
- package/dist-types/dashboard/components/siteMapReport/cookies.d.ts +15 -0
- package/dist-types/dashboard/components/siteMapReport/index.d.ts +11 -0
- package/dist-types/dashboard/components/siteMapReport/layout.d.ts +18 -0
- package/dist-types/dashboard/components/siteMapReport/sidebarData.d.ts +3 -0
- package/dist-types/dashboard/components/siteMapReport/sitemapCookiesWithIssues.d.ts +10 -0
- package/dist-types/dashboard/components/siteReport/components/layout.d.ts +13 -0
- package/dist-types/dashboard/components/siteReport/index.d.ts +17 -0
- package/dist-types/dashboard/components/siteReport/stateProviders/contentStore/index.d.ts +32 -0
- package/dist-types/dashboard/components/siteReport/tabs/cookies/cookiesLandingContainer/cookieLanding/blockedCookiesSection.d.ts +8 -0
- package/dist-types/dashboard/components/siteReport/tabs/cookies/cookiesLandingContainer/cookieLanding/cookiesSection.d.ts +7 -0
- package/dist-types/dashboard/components/siteReport/tabs/cookies/cookiesLandingContainer/cookieLanding/exemptedCookiesSection.d.ts +7 -0
- package/dist-types/dashboard/components/siteReport/tabs/cookies/cookiesLandingContainer/cookieLanding/framesSection.d.ts +9 -0
- package/dist-types/dashboard/components/siteReport/tabs/cookies/cookiesLandingContainer/cookieLanding/index.d.ts +2 -0
- package/dist-types/dashboard/components/siteReport/tabs/cookies/cookiesLandingContainer/cookieLanding/knownBreakages.d.ts +9 -0
- package/dist-types/dashboard/components/siteReport/tabs/cookies/cookiesLandingContainer/cookieLanding/landing.d.ts +15 -0
- package/dist-types/dashboard/components/siteReport/tabs/cookies/cookiesLandingContainer/index.d.ts +23 -0
- package/dist-types/dashboard/components/siteReport/tabs/cookies/cookiesListing/index.d.ts +9 -0
- package/dist-types/dashboard/components/siteReport/tabs/cookies/index.d.ts +9 -0
- package/dist-types/dashboard/components/siteReport/tabs/index.d.ts +3 -0
- package/dist-types/dashboard/components/siteReport/tabs/siteCookiesWithIssues/index.d.ts +5 -0
- package/dist-types/dashboard/components/siteReport/tabs/technologies/index.d.ts +5 -0
- package/dist-types/dashboard/components/utils/NamePrefixIconSelector.d.ts +3 -0
- package/dist-types/dashboard/components/utils/extractCookies.d.ts +6 -0
- package/dist-types/dashboard/components/utils/extractReportData.d.ts +11 -0
- package/dist-types/dashboard/components/utils/reportDownloader/generateSiteMapReportandDownload.d.ts +4 -0
- package/dist-types/dashboard/components/utils/reportDownloader/generateSiteReportandDownload.d.ts +4 -0
- package/dist-types/dashboard/components/utils/reportDownloader/index.d.ts +2 -0
- package/dist-types/dashboard/components/utils/reportDownloader/utils.d.ts +9 -0
- package/dist-types/dashboard/components/utils/reshapeCookies.d.ts +8 -0
- package/dist-types/dashboard/components/utils/tests/data.mock.d.ts +6 -0
- package/dist-types/dashboard/components/utils/tests/extractCookies.d.ts +1 -0
- package/dist-types/dashboard/components/utils/tests/extractReportData.d.ts +1 -0
- package/dist-types/dashboard/components/utils/tests/reshapeCookies.d.ts +1 -0
- package/dist-types/dashboard/hooks/useCookieListing/index.d.ts +10 -0
- package/dist-types/dashboard/index.d.ts +4 -0
- package/dist-types/index.d.ts +1 -0
- package/package.json +11 -5
- package/public/index.html +1 -0
- package/tsconfig.json +19 -3
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 Google LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* External dependencies
|
|
18
|
+
*/
|
|
19
|
+
import {} from '@google-psat/common';
|
|
20
|
+
export const tempSinglePageData = {
|
|
21
|
+
pageUrl: 'https://edition.cnn.com/sitemaps/sitemap-section.xml',
|
|
22
|
+
libraryMatches: {},
|
|
23
|
+
cookieData: {
|
|
24
|
+
'https://edition.cnn.com': {
|
|
25
|
+
frameCookies: {
|
|
26
|
+
'countryCode:.cnn.com:/': {
|
|
27
|
+
parsedCookie: {
|
|
28
|
+
name: 'countryCode',
|
|
29
|
+
domain: '.cnn.com',
|
|
30
|
+
path: '/',
|
|
31
|
+
value: 'IN',
|
|
32
|
+
samesite: 'None',
|
|
33
|
+
expires: 'Session',
|
|
34
|
+
httponly: false,
|
|
35
|
+
secure: true,
|
|
36
|
+
partitionKey: '',
|
|
37
|
+
},
|
|
38
|
+
analytics: {
|
|
39
|
+
platform: 'Unknown',
|
|
40
|
+
category: 'Uncategorized',
|
|
41
|
+
GDPR: '',
|
|
42
|
+
description: '',
|
|
43
|
+
},
|
|
44
|
+
url: '',
|
|
45
|
+
isBlocked: false,
|
|
46
|
+
isFirstParty: true,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
technologyData: [
|
|
52
|
+
{
|
|
53
|
+
slug: 'varnish',
|
|
54
|
+
name: 'Varnish',
|
|
55
|
+
description: 'Varnish is a reverse caching proxy.',
|
|
56
|
+
confidence: 100,
|
|
57
|
+
version: null,
|
|
58
|
+
icon: 'Varnish.svg',
|
|
59
|
+
website: 'https://www.varnish-cache.org',
|
|
60
|
+
cpe: 'cpe:2.3:a:varnish-software:varnish_cache:*:*:*:*:*:*:*:*',
|
|
61
|
+
categories: [
|
|
62
|
+
{
|
|
63
|
+
id: 23,
|
|
64
|
+
slug: 'caching',
|
|
65
|
+
name: 'Caching',
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
};
|
|
71
|
+
export const tempMultiPageData = [
|
|
72
|
+
{
|
|
73
|
+
libraryMatches: {},
|
|
74
|
+
pageUrl: 'https://www.cnn.com/index.html',
|
|
75
|
+
technologyData: [
|
|
76
|
+
{
|
|
77
|
+
slug: 'varnish',
|
|
78
|
+
name: 'Varnish',
|
|
79
|
+
description: 'Varnish is a reverse caching proxy.',
|
|
80
|
+
confidence: 100,
|
|
81
|
+
version: null,
|
|
82
|
+
icon: 'Varnish.svg',
|
|
83
|
+
website: 'https://www.varnish-cache.org',
|
|
84
|
+
cpe: 'cpe:2.3:a:varnish-software:varnish_cache:*:*:*:*:*:*:*:*',
|
|
85
|
+
categories: [
|
|
86
|
+
{
|
|
87
|
+
id: 23,
|
|
88
|
+
slug: 'caching',
|
|
89
|
+
name: 'Caching',
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
cookieData: {
|
|
95
|
+
'https://edition.cnn.com': {
|
|
96
|
+
frameCookies: {
|
|
97
|
+
'countryCode:.cnn.com:/': {
|
|
98
|
+
parsedCookie: {
|
|
99
|
+
name: 'countryCode',
|
|
100
|
+
domain: '.cnn.com',
|
|
101
|
+
path: '/',
|
|
102
|
+
value: 'IN',
|
|
103
|
+
samesite: 'None',
|
|
104
|
+
expires: 'Session',
|
|
105
|
+
httponly: false,
|
|
106
|
+
secure: true,
|
|
107
|
+
partitionKey: '',
|
|
108
|
+
},
|
|
109
|
+
analytics: {
|
|
110
|
+
platform: 'Unknown',
|
|
111
|
+
category: 'Uncategorized',
|
|
112
|
+
GDPR: '',
|
|
113
|
+
description: '',
|
|
114
|
+
},
|
|
115
|
+
url: '',
|
|
116
|
+
isBlocked: false,
|
|
117
|
+
blockedReasons: ['ThirdPartyPhaseout'],
|
|
118
|
+
isFirstParty: true,
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
libraryMatches: {},
|
|
126
|
+
pageUrl: 'https://edition.cnn.com/index.html',
|
|
127
|
+
technologyData: [
|
|
128
|
+
{
|
|
129
|
+
slug: 'varnish',
|
|
130
|
+
name: 'Varnish',
|
|
131
|
+
description: 'Varnish is a reverse caching proxy.',
|
|
132
|
+
confidence: 100,
|
|
133
|
+
version: null,
|
|
134
|
+
icon: 'Varnish.svg',
|
|
135
|
+
website: 'https://www.varnish-cache.org',
|
|
136
|
+
cpe: 'cpe:2.3:a:varnish-software:varnish_cache:*:*:*:*:*:*:*:*',
|
|
137
|
+
categories: [
|
|
138
|
+
{
|
|
139
|
+
id: 23,
|
|
140
|
+
slug: 'caching',
|
|
141
|
+
name: 'Caching',
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
cookieData: {
|
|
147
|
+
'https://edition.cnn.com': {
|
|
148
|
+
frameCookies: {
|
|
149
|
+
'countryCode:.cnn.com:/': {
|
|
150
|
+
parsedCookie: {
|
|
151
|
+
name: 'countryCode',
|
|
152
|
+
domain: '.cnn.com',
|
|
153
|
+
path: '/',
|
|
154
|
+
value: 'IN',
|
|
155
|
+
samesite: 'None',
|
|
156
|
+
expires: 'Session',
|
|
157
|
+
httponly: false,
|
|
158
|
+
secure: true,
|
|
159
|
+
partitionKey: '',
|
|
160
|
+
},
|
|
161
|
+
analytics: {
|
|
162
|
+
platform: 'Unknown',
|
|
163
|
+
category: 'Uncategorized',
|
|
164
|
+
GDPR: '',
|
|
165
|
+
description: '',
|
|
166
|
+
},
|
|
167
|
+
url: '',
|
|
168
|
+
isBlocked: false,
|
|
169
|
+
blockedReasons: ['ThirdPartyPhaseout'],
|
|
170
|
+
isFirstParty: true,
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
];
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 Google LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Internal dependencies
|
|
18
|
+
*/
|
|
19
|
+
import extractCookies from '../extractCookies';
|
|
20
|
+
import { tempSinglePageData } from './data.mock';
|
|
21
|
+
describe('extractCookies', () => {
|
|
22
|
+
it('should return an empty object if no cookies are present', () => {
|
|
23
|
+
expect(extractCookies({}, '')).toEqual({});
|
|
24
|
+
});
|
|
25
|
+
it('should return an object with the cookies', () => {
|
|
26
|
+
let isLandingPage = true;
|
|
27
|
+
const pageUrl = 'https://edition.cnn.com';
|
|
28
|
+
expect(extractCookies(tempSinglePageData.cookieData, pageUrl, isLandingPage)).toEqual({
|
|
29
|
+
'https://edition.cnn.com': {
|
|
30
|
+
'countryCode:.cnn.com:/': {
|
|
31
|
+
parsedCookie: {
|
|
32
|
+
name: 'countryCode',
|
|
33
|
+
domain: '.cnn.com',
|
|
34
|
+
path: '/',
|
|
35
|
+
value: 'IN',
|
|
36
|
+
samesite: 'None',
|
|
37
|
+
expires: 'Session',
|
|
38
|
+
httponly: false,
|
|
39
|
+
secure: true,
|
|
40
|
+
partitionKey: '',
|
|
41
|
+
},
|
|
42
|
+
analytics: {
|
|
43
|
+
platform: 'Unknown',
|
|
44
|
+
category: 'Uncategorized',
|
|
45
|
+
GDPR: '',
|
|
46
|
+
description: '',
|
|
47
|
+
},
|
|
48
|
+
url: '',
|
|
49
|
+
pageUrl,
|
|
50
|
+
isBlocked: false,
|
|
51
|
+
isFirstParty: true,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
isLandingPage = false;
|
|
56
|
+
expect(extractCookies(tempSinglePageData.cookieData, pageUrl, isLandingPage)).toEqual({
|
|
57
|
+
'https://edition.cnn.com': {
|
|
58
|
+
['countryCode:.cnn.com:/' + pageUrl]: {
|
|
59
|
+
parsedCookie: {
|
|
60
|
+
name: 'countryCode',
|
|
61
|
+
domain: '.cnn.com',
|
|
62
|
+
path: '/',
|
|
63
|
+
value: 'IN',
|
|
64
|
+
samesite: 'None',
|
|
65
|
+
expires: 'Session',
|
|
66
|
+
httponly: false,
|
|
67
|
+
secure: true,
|
|
68
|
+
partitionKey: '',
|
|
69
|
+
},
|
|
70
|
+
analytics: {
|
|
71
|
+
platform: 'Unknown',
|
|
72
|
+
category: 'Uncategorized',
|
|
73
|
+
GDPR: '',
|
|
74
|
+
description: '',
|
|
75
|
+
},
|
|
76
|
+
url: '',
|
|
77
|
+
pageUrl,
|
|
78
|
+
isBlocked: false,
|
|
79
|
+
isFirstParty: true,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 Google LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Internal dependencies
|
|
18
|
+
*/
|
|
19
|
+
import extractReportData from '../extractReportData';
|
|
20
|
+
import { tempMultiPageData } from './data.mock';
|
|
21
|
+
describe('extractReportData', () => {
|
|
22
|
+
it('should return an empty object if no cookies are present', () => {
|
|
23
|
+
expect(extractReportData([])).toEqual({
|
|
24
|
+
landingPageCookies: {},
|
|
25
|
+
consolidatedLibraryMatches: {},
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
it('should return an object with the cookies', () => {
|
|
29
|
+
expect(extractReportData(tempMultiPageData)).toEqual({
|
|
30
|
+
landingPageCookies: {
|
|
31
|
+
'https://edition.cnn.com': {
|
|
32
|
+
['countryCode:.cnn.com:/']: {
|
|
33
|
+
parsedCookie: {
|
|
34
|
+
name: 'countryCode',
|
|
35
|
+
domain: '.cnn.com',
|
|
36
|
+
path: '/',
|
|
37
|
+
value: 'IN',
|
|
38
|
+
samesite: 'None',
|
|
39
|
+
expires: 'Session',
|
|
40
|
+
httponly: false,
|
|
41
|
+
secure: true,
|
|
42
|
+
partitionKey: '',
|
|
43
|
+
},
|
|
44
|
+
analytics: {
|
|
45
|
+
platform: 'Unknown',
|
|
46
|
+
category: 'Uncategorized',
|
|
47
|
+
GDPR: '',
|
|
48
|
+
description: '',
|
|
49
|
+
},
|
|
50
|
+
url: '',
|
|
51
|
+
pageUrl: 'https://edition.cnn.com/index.html',
|
|
52
|
+
isBlocked: false,
|
|
53
|
+
blockedReasons: ['ThirdPartyPhaseout'],
|
|
54
|
+
isFirstParty: true,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
consolidatedLibraryMatches: {
|
|
59
|
+
'https://edition.cnn.com/index.html': {},
|
|
60
|
+
'https://www.cnn.com/index.html': {},
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2023 Google LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Internal dependencies
|
|
18
|
+
*/
|
|
19
|
+
import reshapeCookies from '../reshapeCookies';
|
|
20
|
+
describe('reshapeCookies', () => {
|
|
21
|
+
it('should return an empty object if no cookies are present', () => {
|
|
22
|
+
expect(reshapeCookies({})).toEqual({});
|
|
23
|
+
});
|
|
24
|
+
it('should return an object with the cookies', () => {
|
|
25
|
+
const cookies = {
|
|
26
|
+
'https://edition.cnn.com': {
|
|
27
|
+
'countryCode:.cnn.com:/': {
|
|
28
|
+
parsedCookie: {
|
|
29
|
+
name: 'countryCode',
|
|
30
|
+
domain: '.cnn.com',
|
|
31
|
+
path: '/',
|
|
32
|
+
value: 'IN',
|
|
33
|
+
samesite: 'None',
|
|
34
|
+
expires: 'Session',
|
|
35
|
+
httponly: false,
|
|
36
|
+
secure: true,
|
|
37
|
+
partitionKey: '',
|
|
38
|
+
},
|
|
39
|
+
analytics: {
|
|
40
|
+
platform: 'Unknown',
|
|
41
|
+
category: 'Uncategorized',
|
|
42
|
+
GDPR: '',
|
|
43
|
+
description: '',
|
|
44
|
+
},
|
|
45
|
+
url: 'https://www.cnn.com/index.html',
|
|
46
|
+
isBlocked: false,
|
|
47
|
+
blockedReasons: [],
|
|
48
|
+
blockingStatus: undefined,
|
|
49
|
+
networkEvents: undefined,
|
|
50
|
+
isFirstParty: true,
|
|
51
|
+
pageUrl: 'https://www.cnn.com/index.html',
|
|
52
|
+
frameUrls: { sadf: 'https://edition.cnn.com' },
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
expect(reshapeCookies(cookies)).toEqual({
|
|
57
|
+
'countryCode:.cnn.com:/': {
|
|
58
|
+
parsedCookie: {
|
|
59
|
+
name: 'countryCode',
|
|
60
|
+
value: 'IN',
|
|
61
|
+
domain: '.cnn.com',
|
|
62
|
+
path: '/',
|
|
63
|
+
expires: 'Session',
|
|
64
|
+
httponly: false,
|
|
65
|
+
secure: true,
|
|
66
|
+
samesite: 'None',
|
|
67
|
+
partitionKey: '',
|
|
68
|
+
},
|
|
69
|
+
analytics: {
|
|
70
|
+
platform: 'Unknown',
|
|
71
|
+
category: 'Uncategorized',
|
|
72
|
+
description: '',
|
|
73
|
+
GDPR: '',
|
|
74
|
+
},
|
|
75
|
+
blockingStatus: undefined,
|
|
76
|
+
networkEvents: undefined,
|
|
77
|
+
isFirstParty: true,
|
|
78
|
+
url: 'https://www.cnn.com/index.html',
|
|
79
|
+
frameUrls: ['https://edition.cnn.com'],
|
|
80
|
+
frameIdList: ['https://edition.cnn.com'],
|
|
81
|
+
isBlocked: false,
|
|
82
|
+
blockedReasons: [],
|
|
83
|
+
headerType: 'response',
|
|
84
|
+
exemptionReason: undefined,
|
|
85
|
+
pageUrl: 'https://www.cnn.com/index.html',
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
});
|