ghost 6.8.0 → 6.9.0
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/components/tryghost-i18n-6.9.0.tgz +0 -0
- package/core/built/admin/assets/activitypub/activitypub.js +2 -2
- package/core/built/admin/assets/activitypub/{index-BbINZU9U.mjs → index-B29oZuTp.mjs} +2 -2
- package/core/built/admin/assets/activitypub/{index-C3M839De.mjs → index-C19nEXqT.mjs} +7998 -7923
- package/core/built/admin/assets/admin-x-settings/{CodeEditorView-Dh1am4P6.mjs → CodeEditorView-BNKxdfRt.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +1 -1
- package/core/built/admin/assets/admin-x-settings/{index-DqbTDHzA.mjs → index-B-_a183c.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-Hwd1HJ0-.mjs → index-CjRGpMVv.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-SxxA3jSX.mjs → index-Q0XmL0KU.mjs} +5 -5
- package/core/built/admin/assets/admin-x-settings/{modals-yhgQVHax.mjs → modals-omgXN6i-.mjs} +31 -27
- package/core/built/admin/assets/{chunk.524.0bee64e8bac52bb41823.js → chunk.524.774a2df444e2ffde4942.js} +7 -7
- package/core/built/admin/assets/{chunk.582.83c6478c40d90ef19d6b.js → chunk.582.ca4f05f3c39fda05b54c.js} +8 -8
- package/core/built/admin/assets/{ghost-7556359b8bd4ec08a6c23890b04bb56e.js → ghost-94d0fbb20e8e880fa9ba144cf26ab050.js} +27 -27
- package/core/built/admin/assets/ghost-dark-6c9cfa9c364e28c57e5983f68ec6f2fc.css +1 -0
- package/core/built/admin/assets/ghost-f724c1d53f5402f78a2d8cf8beb7c716.css +1 -0
- package/core/built/admin/assets/posts/posts.js +1 -1
- package/core/built/admin/assets/stats/stats.js +1 -1
- package/core/built/admin/index.html +4 -4
- package/core/frontend/public/robots.txt +1 -0
- package/core/frontend/web/middleware/index.js +0 -1
- package/core/frontend/web/routers/serve-favicon.js +56 -0
- package/core/frontend/web/site.js +2 -1
- package/core/server/data/tinybird/endpoints/api_kpis.pipe +0 -3
- package/core/server/data/tinybird/endpoints/api_top_locations.pipe +0 -3
- package/core/server/data/tinybird/endpoints/api_top_pages.pipe +0 -5
- package/core/server/data/tinybird/pipes/filtered_sessions.pipe +0 -3
- package/core/server/data/tinybird/scripts/analytics-generator.js +106 -2
- package/core/server/data/tinybird/tests/api_kpis.yaml +0 -36
- package/core/server/data/tinybird/tests/api_top_locations.yaml +2 -31
- package/core/server/data/tinybird/tests/api_top_pages.yaml +1 -30
- package/core/server/data/tinybird/tests/api_top_sources.yaml +2 -41
- package/core/server/data/tinybird/tests/api_top_utm_campaigns.yaml +3 -33
- package/core/server/data/tinybird/tests/api_top_utm_contents.yaml +3 -39
- package/core/server/data/tinybird/tests/api_top_utm_mediums.yaml +3 -34
- package/core/server/data/tinybird/tests/api_top_utm_sources.yaml +3 -43
- package/core/server/data/tinybird/tests/api_top_utm_terms.yaml +3 -36
- package/core/server/services/email-address/EmailAddressService.js +4 -1
- package/core/server/services/email-address/EmailAddressService.ts +5 -1
- package/core/server/services/email-analytics/EmailAnalyticsService.js +70 -16
- package/core/server/services/email-analytics/EmailAnalyticsServiceWrapper.js +6 -0
- package/core/server/services/email-analytics/jobs/update-member-email-analytics/index.js +4 -3
- package/core/server/services/email-analytics/lib/queries.js +84 -0
- package/core/server/services/email-service/EmailEventProcessor.js +113 -13
- package/core/server/services/email-service/EmailEventStorage.js +191 -26
- package/core/server/services/email-service/EmailRenderer.js +10 -3
- package/core/server/services/email-service/SendingService.js +1 -1
- package/core/server/services/lib/MailgunClient.js +2 -1
- package/core/server/services/member-welcome-emails/jobs/index.js +2 -2
- package/core/server/services/members/members-api/repositories/MemberRepository.js +2 -1
- package/core/server/services/tinybird/TinybirdService.js +0 -3
- package/core/server/web/admin/app.js +3 -1
- package/core/server/web/admin/controller.js +2 -1
- package/core/shared/config/defaults.json +2 -1
- package/core/shared/config/helpers.js +13 -0
- package/core/shared/url-utils.js +4 -2
- package/package.json +7 -7
- package/tsconfig.tsbuildinfo +1 -1
- package/yarn.lock +162 -109
- package/components/tryghost-i18n-6.8.0.tgz +0 -0
- package/core/built/admin/assets/ghost-ca67b9eb701b867ae2a2fdd76cebdc17.css +0 -1
- package/core/built/admin/assets/ghost-dark-a5c3c5101d50a0af1f7b828ee387846d.css +0 -1
- package/core/frontend/web/middleware/serve-favicon.js +0 -72
- package/core/server/data/tinybird/endpoints/api_top_browsers.pipe +0 -54
- package/core/server/data/tinybird/endpoints/api_top_devices.pipe +0 -53
- package/core/server/data/tinybird/endpoints/api_top_os.pipe +0 -53
- package/core/server/data/tinybird/tests/api_top_browsers.yaml +0 -98
- package/core/server/data/tinybird/tests/api_top_devices.yaml +0 -75
- package/core/server/data/tinybird/tests/api_top_os.yaml +0 -80
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
const fs = require('fs-extra');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const crypto = require('crypto');
|
|
4
|
-
const config = require('../../../shared/config');
|
|
5
|
-
const {blogIcon} = require('../../../server/lib/image');
|
|
6
|
-
const urlUtils = require('../../../shared/url-utils');
|
|
7
|
-
const settingsCache = require('../../../shared/settings-cache');
|
|
8
|
-
|
|
9
|
-
let content;
|
|
10
|
-
|
|
11
|
-
const buildContentResponse = (ext, buf) => {
|
|
12
|
-
content = {
|
|
13
|
-
headers: {
|
|
14
|
-
'Content-Type': `image/${ext}`,
|
|
15
|
-
'Content-Length': buf.length,
|
|
16
|
-
ETag: `"${crypto.createHash('md5').update(buf, 'utf8').digest('hex')}"`,
|
|
17
|
-
'Cache-Control': `public, max-age=${config.get('caching:favicon:maxAge')}`
|
|
18
|
-
},
|
|
19
|
-
body: buf
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
return content;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
// ### serveFavicon Middleware
|
|
26
|
-
// Handles requests to favicon.png and favicon.ico
|
|
27
|
-
function serveFavicon() {
|
|
28
|
-
let filePath;
|
|
29
|
-
|
|
30
|
-
return function serveFaviconMiddleware(req, res, next) {
|
|
31
|
-
if (req.path.match(/^\/favicon\.(ico|png|jpe?g)/i)) {
|
|
32
|
-
// CASE: favicon is default
|
|
33
|
-
// confusing: if you upload an icon, it's same logic as storing images
|
|
34
|
-
// we store as /content/images, because this is the url path images get requested via the browser
|
|
35
|
-
// we are using an express route to skip /content/images and the result is a image path
|
|
36
|
-
// based on config.getContentPath('images') + req.path
|
|
37
|
-
// in this case we don't use path rewrite, that's why we have to make it manually
|
|
38
|
-
filePath = blogIcon.getIconPath();
|
|
39
|
-
|
|
40
|
-
let originalExtension = path.extname(filePath).toLowerCase();
|
|
41
|
-
const requestedExtension = path.extname(req.path).toLowerCase();
|
|
42
|
-
|
|
43
|
-
// CASE: custom favicon exists, load it from local file storage
|
|
44
|
-
if (settingsCache.get('icon')) {
|
|
45
|
-
// Always redirect to the icon path, which is never favicon.xxx
|
|
46
|
-
return res.redirect(302, blogIcon.getIconUrl());
|
|
47
|
-
} else {
|
|
48
|
-
originalExtension = path.extname(filePath).toLowerCase();
|
|
49
|
-
|
|
50
|
-
// CASE: always redirect to .ico for default icon
|
|
51
|
-
if (originalExtension !== requestedExtension) {
|
|
52
|
-
return res.redirect(302, urlUtils.urlFor({relativeUrl: '/favicon.ico'}));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
fs.readFile(filePath, (err, buf) => {
|
|
56
|
-
if (err) {
|
|
57
|
-
return next(err);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
content = buildContentResponse('x-icon', buf);
|
|
61
|
-
|
|
62
|
-
res.writeHead(200, content.headers);
|
|
63
|
-
res.end(content.body);
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
} else {
|
|
67
|
-
return next();
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
module.exports = serveFavicon;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
TOKEN "stats_page" READ
|
|
2
|
-
TOKEN "axis" READ
|
|
3
|
-
|
|
4
|
-
NODE _top_browsers_0
|
|
5
|
-
SQL >
|
|
6
|
-
|
|
7
|
-
%
|
|
8
|
-
select
|
|
9
|
-
browser,
|
|
10
|
-
uniqExact(session_id) as visits
|
|
11
|
-
from _mv_hits h
|
|
12
|
-
inner join filtered_sessions fs
|
|
13
|
-
on fs.session_id = h.session_id
|
|
14
|
-
where
|
|
15
|
-
site_uuid = {{String(site_uuid, 'mock_site_uuid', description="Tenant ID", required=True)}}
|
|
16
|
-
{% if defined(date_from) %}
|
|
17
|
-
and toDate(toTimezone(timestamp, {{String(timezone, 'Etc/UTC', description="Site timezone", required=True)}}))
|
|
18
|
-
>=
|
|
19
|
-
{{ Date(date_from, description="Starting day for filtering a date range", required=False) }}
|
|
20
|
-
{% else %}
|
|
21
|
-
and toDate(toTimezone(timestamp, {{String(timezone, 'Etc/UTC', description="Site timezone", required=True)}}))
|
|
22
|
-
>=
|
|
23
|
-
timestampAdd(today(), interval -7 day)
|
|
24
|
-
{% end %}
|
|
25
|
-
{% if defined(date_to) %}
|
|
26
|
-
and toDate(toTimezone(timestamp, {{String(timezone, 'Etc/UTC', description="Site timezone", required=True)}}))
|
|
27
|
-
<=
|
|
28
|
-
{{ Date(date_to, description="Finishing day for filtering a date range", required=False) }}
|
|
29
|
-
{% else %}
|
|
30
|
-
and toDate(toTimezone(timestamp, {{String(timezone, 'Etc/UTC', description="Site timezone", required=True)}}))
|
|
31
|
-
<=
|
|
32
|
-
today()
|
|
33
|
-
{% end %}
|
|
34
|
-
{% if defined(member_status) %}
|
|
35
|
-
and member_status IN (
|
|
36
|
-
select arrayJoin(
|
|
37
|
-
{{ Array(member_status, "'undefined', 'free', 'paid'", description="Member status to filter on", required=False) }}
|
|
38
|
-
|| if('paid' IN {{ Array(member_status) }}, ['comped'], [])
|
|
39
|
-
)
|
|
40
|
-
)
|
|
41
|
-
{% end %}
|
|
42
|
-
{% if defined(device) %} and device = {{ String(device, description="Device to filter on", required=False) }} {% end %}
|
|
43
|
-
{% if defined(browser) %} and browser = {{ String(browser, description="Browser to filter on", required=False) }} {% end %}
|
|
44
|
-
{% if defined(os) %} and os = {{ String(os, description="Operating system to filter on", required=False) }} {% end %}
|
|
45
|
-
-- added source filter back
|
|
46
|
-
{% if defined(source) %} and source = {{ String(source, description="Source to filter on", required=False) }} {% end %}
|
|
47
|
-
{% if defined(location) %} and location = {{ String(location, description="Location to filter on", required=False) }} {% end %}
|
|
48
|
-
{% if defined(pathname) %} and pathname = {{ String(pathname, description="Pathname to filter on", required=False) }} {% end %}
|
|
49
|
-
{% if defined(post_uuid) %} and post_uuid = {{ String(post_uuid, description="Post UUID to filter on", required=False) }} {% end %}
|
|
50
|
-
group by browser
|
|
51
|
-
order by visits desc
|
|
52
|
-
limit {{ Int32(skip, 0) }},{{ Int32(limit, 50) }}
|
|
53
|
-
|
|
54
|
-
TYPE ENDPOINT
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
TOKEN "stats_page" READ
|
|
2
|
-
TOKEN "axis" READ
|
|
3
|
-
|
|
4
|
-
NODE _top_devices_0
|
|
5
|
-
SQL >
|
|
6
|
-
|
|
7
|
-
%
|
|
8
|
-
select
|
|
9
|
-
device,
|
|
10
|
-
uniqExact(session_id) as visits
|
|
11
|
-
from _mv_hits h
|
|
12
|
-
inner join filtered_sessions fs
|
|
13
|
-
on fs.session_id = h.session_id
|
|
14
|
-
where
|
|
15
|
-
site_uuid = {{String(site_uuid, 'mock_site_uuid', description="Tenant ID", required=True)}}
|
|
16
|
-
{% if defined(date_from) %}
|
|
17
|
-
and toDate(toTimezone(timestamp, {{String(timezone, 'Etc/UTC', description="Site timezone", required=True)}}))
|
|
18
|
-
>=
|
|
19
|
-
{{ Date(date_from, description="Starting day for filtering a date range", required=False) }}
|
|
20
|
-
{% else %}
|
|
21
|
-
and toDate(toTimezone(timestamp, {{String(timezone, 'Etc/UTC', description="Site timezone", required=True)}}))
|
|
22
|
-
>=
|
|
23
|
-
timestampAdd(today(), interval -7 day)
|
|
24
|
-
{% end %}
|
|
25
|
-
{% if defined(date_to) %}
|
|
26
|
-
and toDate(toTimezone(timestamp, {{String(timezone, 'Etc/UTC', description="Site timezone", required=True)}}))
|
|
27
|
-
<=
|
|
28
|
-
{{ Date(date_to, description="Finishing day for filtering a date range", required=False) }}
|
|
29
|
-
{% else %}
|
|
30
|
-
and toDate(toTimezone(timestamp, {{String(timezone, 'Etc/UTC', description="Site timezone", required=True)}}))
|
|
31
|
-
<=
|
|
32
|
-
today()
|
|
33
|
-
{% end %}
|
|
34
|
-
{% if defined(member_status) %}
|
|
35
|
-
and member_status IN (
|
|
36
|
-
select arrayJoin(
|
|
37
|
-
{{ Array(member_status, "'undefined', 'free', 'paid'", description="Member status to filter on", required=False) }}
|
|
38
|
-
|| if('paid' IN {{ Array(member_status) }}, ['comped'], [])
|
|
39
|
-
)
|
|
40
|
-
)
|
|
41
|
-
{% end %}
|
|
42
|
-
{% if defined(device) %} and device = {{ String(device, description="Device to filter on", required=False) }} {% end %}
|
|
43
|
-
{% if defined(browser) %} and browser = {{ String(browser, description="Browser to filter on", required=False) }} {% end %}
|
|
44
|
-
{% if defined(os) %} and os = {{ String(os, description="Operating system to filter on", required=False) }} {% end %}
|
|
45
|
-
{% if defined(source) %} and source = {{ String(source, description="Source to filter on", required=False) }} {% end %}
|
|
46
|
-
{% if defined(location) %} and location = {{ String(location, description="Location to filter on", required=False) }} {% end %}
|
|
47
|
-
{% if defined(pathname) %} and pathname = {{ String(pathname, description="Pathname to filter on", required=False) }} {% end %}
|
|
48
|
-
{% if defined(post_uuid) %} and post_uuid = {{ String(post_uuid, description="Post UUID to filter on", required=False) }} {% end %}
|
|
49
|
-
group by device
|
|
50
|
-
order by visits desc
|
|
51
|
-
limit {{ Int32(skip, 0) }},{{ Int32(limit, 50) }}
|
|
52
|
-
|
|
53
|
-
TYPE ENDPOINT
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
TOKEN "stats_page" READ
|
|
2
|
-
TOKEN "axis" READ
|
|
3
|
-
|
|
4
|
-
NODE _top_os_0
|
|
5
|
-
SQL >
|
|
6
|
-
|
|
7
|
-
%
|
|
8
|
-
select
|
|
9
|
-
os,
|
|
10
|
-
uniqExact(session_id) as visits
|
|
11
|
-
from _mv_hits h
|
|
12
|
-
inner join filtered_sessions fs
|
|
13
|
-
on fs.session_id = h.session_id
|
|
14
|
-
where
|
|
15
|
-
site_uuid = {{String(site_uuid, 'mock_site_uuid', description="Tenant ID", required=True)}}
|
|
16
|
-
{% if defined(date_from) %}
|
|
17
|
-
and toDate(toTimezone(timestamp, {{String(timezone, 'Etc/UTC', description="Site timezone", required=True)}}))
|
|
18
|
-
>=
|
|
19
|
-
{{ Date(date_from, description="Starting day for filtering a date range", required=False) }}
|
|
20
|
-
{% else %}
|
|
21
|
-
and toDate(toTimezone(timestamp, {{String(timezone, 'Etc/UTC', description="Site timezone", required=True)}}))
|
|
22
|
-
>=
|
|
23
|
-
timestampAdd(today(), interval -1 year)
|
|
24
|
-
{% end %}
|
|
25
|
-
{% if defined(date_to) %}
|
|
26
|
-
and toDate(toTimezone(timestamp, {{String(timezone, 'Etc/UTC', description="Site timezone", required=True)}}))
|
|
27
|
-
<=
|
|
28
|
-
{{ Date(date_to, description="Finishing day for filtering a date range", required=False) }}
|
|
29
|
-
{% else %}
|
|
30
|
-
and toDate(toTimezone(timestamp, {{String(timezone, 'Etc/UTC', description="Site timezone", required=True)}}))
|
|
31
|
-
<=
|
|
32
|
-
today()
|
|
33
|
-
{% end %}
|
|
34
|
-
{% if defined(member_status) %}
|
|
35
|
-
and member_status IN (
|
|
36
|
-
select arrayJoin(
|
|
37
|
-
{{ Array(member_status, "'undefined', 'free', 'paid'", description="Member status to filter on", required=False) }}
|
|
38
|
-
|| if('paid' IN {{ Array(member_status) }}, ['comped'], [])
|
|
39
|
-
)
|
|
40
|
-
)
|
|
41
|
-
{% end %}
|
|
42
|
-
{% if defined(device) %} and device = {{ String(device, description="Device to filter on", required=False) }} {% end %}
|
|
43
|
-
{% if defined(browser) %} and browser = {{ String(browser, description="Browser to filter on", required=False) }} {% end %}
|
|
44
|
-
{% if defined(os) %} and os = {{ String(os, description="Operating system to filter on", required=False) }} {% end %}
|
|
45
|
-
{% if defined(source) %} and source = {{ String(source, description="Source to filter on", required=False) }} {% end %}
|
|
46
|
-
{% if defined(location) %} and location = {{ String(location, description="Location to filter on", required=False) }} {% end %}
|
|
47
|
-
{% if defined(pathname) %} and pathname = {{ String(pathname, description="Pathname to filter on", required=False) }} {% end %}
|
|
48
|
-
{% if defined(post_uuid) %} and post_uuid = {{ String(post_uuid, description="Post UUID to filter on", required=False) }} {% end %}
|
|
49
|
-
group by os
|
|
50
|
-
order by visits desc
|
|
51
|
-
limit {{ Int32(skip, 0) }},{{ Int32(limit, 50) }}
|
|
52
|
-
|
|
53
|
-
TYPE ENDPOINT
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
- name: Date range
|
|
3
|
-
description: All fixture data
|
|
4
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC
|
|
5
|
-
expected_result: |
|
|
6
|
-
{"browser":"chrome","visits":7}
|
|
7
|
-
{"browser":"firefox","visits":5}
|
|
8
|
-
{"browser":"ie","visits":2}
|
|
9
|
-
{"browser":"safari","visits":1}
|
|
10
|
-
{"browser":"Unknown","visits":1}
|
|
11
|
-
|
|
12
|
-
- name: Filtered by browser - Chrome
|
|
13
|
-
description: Filtered by browser - Chrome
|
|
14
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&browser=chrome
|
|
15
|
-
expected_result: |
|
|
16
|
-
{"browser":"chrome","visits":7}
|
|
17
|
-
|
|
18
|
-
- name: Filtered by device - desktop
|
|
19
|
-
description: Filtered by device - desktop
|
|
20
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&device=desktop
|
|
21
|
-
expected_result: |
|
|
22
|
-
{"browser":"chrome","visits":7}
|
|
23
|
-
{"browser":"firefox","visits":5}
|
|
24
|
-
{"browser":"ie","visits":2}
|
|
25
|
-
{"browser":"safari","visits":1}
|
|
26
|
-
|
|
27
|
-
- name: Filtered by location - UK
|
|
28
|
-
description: Filtered by location - UK
|
|
29
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&location=GB
|
|
30
|
-
expected_result: |
|
|
31
|
-
{"browser":"chrome","visits":5}
|
|
32
|
-
{"browser":"firefox","visits":1}
|
|
33
|
-
{"browser":"Unknown","visits":1}
|
|
34
|
-
{"browser":"ie","visits":1}
|
|
35
|
-
|
|
36
|
-
- name: Filtered by OS - Windows
|
|
37
|
-
description: Filtered by OS - Windows
|
|
38
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&os=windows
|
|
39
|
-
expected_result: |
|
|
40
|
-
{"browser":"chrome","visits":7}
|
|
41
|
-
{"browser":"firefox","visits":5}
|
|
42
|
-
{"browser":"ie","visits":2}
|
|
43
|
-
|
|
44
|
-
- name: Filtered by pathname - /about/
|
|
45
|
-
description: Filtered by pathname - /about/
|
|
46
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&pathname=%2Fabout%2F
|
|
47
|
-
expected_result: |
|
|
48
|
-
{"browser":"chrome","visits":3}
|
|
49
|
-
{"browser":"firefox","visits":2}
|
|
50
|
-
{"browser":"ie","visits":2}
|
|
51
|
-
{"browser":"safari","visits":1}
|
|
52
|
-
|
|
53
|
-
- name: Filtered by post_uuid - 06b1b0c9-fb53-4a15-a060-3db3fde7b1fc (/about/)
|
|
54
|
-
description: Filtered by post_uuid - 06b1b0c9-fb53-4a15-a060-3db3fde7b1fc (/about/)
|
|
55
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&post_uuid=06b1b0c9-fb53-4a15-a060-3db3fde7b1fc
|
|
56
|
-
expected_result: |
|
|
57
|
-
{"browser":"chrome","visits":3}
|
|
58
|
-
{"browser":"firefox","visits":2}
|
|
59
|
-
{"browser":"ie","visits":2}
|
|
60
|
-
{"browser":"safari","visits":1}
|
|
61
|
-
|
|
62
|
-
- name: Filtered by source - bing.com
|
|
63
|
-
description: Filtered by source - bing.com
|
|
64
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&source=bing.com
|
|
65
|
-
expected_result: |
|
|
66
|
-
{"browser":"chrome","visits":1}
|
|
67
|
-
{"browser":"ie","visits":1}
|
|
68
|
-
|
|
69
|
-
- name: Filtered by member status - paid
|
|
70
|
-
description: Filtered by member status - paid
|
|
71
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&member_status=paid
|
|
72
|
-
expected_result: |
|
|
73
|
-
{"browser":"firefox","visits":2}
|
|
74
|
-
{"browser":"chrome","visits":2}
|
|
75
|
-
{"browser":"ie","visits":1}
|
|
76
|
-
|
|
77
|
-
- name: Filtered by member status - undefined
|
|
78
|
-
description: Filtered by member status - undefined
|
|
79
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&member_status=undefined
|
|
80
|
-
expected_result: |
|
|
81
|
-
{"browser":"chrome","visits":3}
|
|
82
|
-
{"browser":"firefox","visits":2}
|
|
83
|
-
{"browser":"Unknown","visits":1}
|
|
84
|
-
|
|
85
|
-
- name: Filtered by timezone - America/Los_Angeles
|
|
86
|
-
description: Filtered by timezone - America/Los_Angeles
|
|
87
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=America/Los_Angeles
|
|
88
|
-
expected_result: |
|
|
89
|
-
{"browser":"chrome","visits":6}
|
|
90
|
-
{"browser":"firefox","visits":5}
|
|
91
|
-
{"browser":"safari","visits":1}
|
|
92
|
-
{"browser":"ie","visits":1}
|
|
93
|
-
|
|
94
|
-
- name: Test with multiple filters combined
|
|
95
|
-
description: Test with multiple filters combined
|
|
96
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&device=desktop&browser=firefox
|
|
97
|
-
expected_result: |
|
|
98
|
-
{"browser":"firefox","visits":5}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
- name: Date range
|
|
3
|
-
description: All fixture data
|
|
4
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC
|
|
5
|
-
expected_result: |
|
|
6
|
-
{"device":"desktop","visits":15}
|
|
7
|
-
{"device":"bot","visits":1}
|
|
8
|
-
|
|
9
|
-
- name: Filtered by browser - Chrome
|
|
10
|
-
description: Filtered by browser - Chrome
|
|
11
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&browser=chrome
|
|
12
|
-
expected_result: |
|
|
13
|
-
{"device":"desktop","visits":7}
|
|
14
|
-
|
|
15
|
-
- name: Filtered by device - desktop
|
|
16
|
-
description: Filtered by device - desktop
|
|
17
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&device=desktop
|
|
18
|
-
expected_result: |
|
|
19
|
-
{"device":"desktop","visits":15}
|
|
20
|
-
|
|
21
|
-
- name: Filtered by location - UK
|
|
22
|
-
description: Filtered by location - UK
|
|
23
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&location=GB
|
|
24
|
-
expected_result: |
|
|
25
|
-
{"device":"desktop","visits":7}
|
|
26
|
-
{"device":"bot","visits":1}
|
|
27
|
-
|
|
28
|
-
- name: Filtered by OS - Windows
|
|
29
|
-
description: Filtered by OS - Windows
|
|
30
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&os=windows
|
|
31
|
-
expected_result: |
|
|
32
|
-
{"device":"desktop","visits":14}
|
|
33
|
-
|
|
34
|
-
- name: Filtered by pathname - /about/
|
|
35
|
-
description: Filtered by pathname - /about/
|
|
36
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&pathname=%2Fabout%2F
|
|
37
|
-
expected_result: |
|
|
38
|
-
{"device":"desktop","visits":8}
|
|
39
|
-
|
|
40
|
-
- name: Filtered by post_uuid - 06b1b0c9-fb53-4a15-a060-3db3fde7b1fc (/about/)
|
|
41
|
-
description: Filtered by post_uuid - 06b1b0c9-fb53-4a15-a060-3db3fde7b1fc (/about/)
|
|
42
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&post_uuid=06b1b0c9-fb53-4a15-a060-3db3fde7b1fc
|
|
43
|
-
expected_result: |
|
|
44
|
-
{"device":"desktop","visits":8}
|
|
45
|
-
|
|
46
|
-
- name: Filtered by source - bing.com
|
|
47
|
-
description: Filtered by source - bing.com
|
|
48
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&source=bing.com
|
|
49
|
-
expected_result: |
|
|
50
|
-
{"device":"desktop","visits":2}
|
|
51
|
-
|
|
52
|
-
- name: Filtered by member status - paid
|
|
53
|
-
description: Filtered by member status - paid
|
|
54
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&member_status=paid
|
|
55
|
-
expected_result: |
|
|
56
|
-
{"device":"desktop","visits":5}
|
|
57
|
-
|
|
58
|
-
- name: Filtered by member status - undefined
|
|
59
|
-
description: Filtered by member status - undefined
|
|
60
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&member_status=undefined
|
|
61
|
-
expected_result: |
|
|
62
|
-
{"device":"desktop","visits":5}
|
|
63
|
-
{"device":"bot","visits":1}
|
|
64
|
-
|
|
65
|
-
- name: Filtered by timezone - America/Los_Angeles
|
|
66
|
-
description: Filtered by timezone - America/Los_Angeles
|
|
67
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=America/Los_Angeles
|
|
68
|
-
expected_result: |
|
|
69
|
-
{"device":"desktop","visits":13}
|
|
70
|
-
|
|
71
|
-
- name: Test with multiple filters combined
|
|
72
|
-
description: Test with multiple filters combined
|
|
73
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&device=desktop&browser=firefox
|
|
74
|
-
expected_result: |
|
|
75
|
-
{"device":"desktop","visits":5}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
- name: Date range
|
|
3
|
-
description: All fixture data
|
|
4
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC
|
|
5
|
-
expected_result: |
|
|
6
|
-
{"os":"windows","visits":14}
|
|
7
|
-
{"os":"Unknown","visits":1}
|
|
8
|
-
{"os":"macos","visits":1}
|
|
9
|
-
|
|
10
|
-
- name: Filtered by browser - Chrome
|
|
11
|
-
description: Filtered by browser - Chrome
|
|
12
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&browser=chrome
|
|
13
|
-
expected_result: |
|
|
14
|
-
{"os":"windows","visits":7}
|
|
15
|
-
|
|
16
|
-
- name: Filtered by device - desktop
|
|
17
|
-
description: Filtered by device - desktop
|
|
18
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&device=desktop
|
|
19
|
-
expected_result: |
|
|
20
|
-
{"os":"windows","visits":14}
|
|
21
|
-
{"os":"macos","visits":1}
|
|
22
|
-
|
|
23
|
-
- name: Filtered by location - UK
|
|
24
|
-
description: Filtered by location - UK
|
|
25
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&location=GB
|
|
26
|
-
expected_result: |
|
|
27
|
-
{"os":"windows","visits":7}
|
|
28
|
-
{"os":"Unknown","visits":1}
|
|
29
|
-
|
|
30
|
-
- name: Filtered by OS - Windows
|
|
31
|
-
description: Filtered by OS - Windows
|
|
32
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&os=windows
|
|
33
|
-
expected_result: |
|
|
34
|
-
{"os":"windows","visits":14}
|
|
35
|
-
|
|
36
|
-
- name: Filtered by pathname - /about/
|
|
37
|
-
description: Filtered by pathname - /about/
|
|
38
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&pathname=%2Fabout%2F
|
|
39
|
-
expected_result: |
|
|
40
|
-
{"os":"windows","visits":7}
|
|
41
|
-
{"os":"macos","visits":1}
|
|
42
|
-
|
|
43
|
-
- name: Filtered by post_uuid - 06b1b0c9-fb53-4a15-a060-3db3fde7b1fc (/about/)
|
|
44
|
-
description: Filtered by post_uuid - 06b1b0c9-fb53-4a15-a060-3db3fde7b1fc (/about/)
|
|
45
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&post_uuid=06b1b0c9-fb53-4a15-a060-3db3fde7b1fc
|
|
46
|
-
expected_result: |
|
|
47
|
-
{"os":"windows","visits":7}
|
|
48
|
-
{"os":"macos","visits":1}
|
|
49
|
-
|
|
50
|
-
- name: Filtered by source - bing.com
|
|
51
|
-
description: Filtered by source - bing.com
|
|
52
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&source=bing.com
|
|
53
|
-
expected_result: |
|
|
54
|
-
{"os":"windows","visits":2}
|
|
55
|
-
|
|
56
|
-
- name: Filtered by member status - paid
|
|
57
|
-
description: Filtered by member status - paid
|
|
58
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&member_status=paid
|
|
59
|
-
expected_result: |
|
|
60
|
-
{"os":"windows","visits":5}
|
|
61
|
-
|
|
62
|
-
- name: Filtered by member status - undefined
|
|
63
|
-
description: Filtered by member status - undefined
|
|
64
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&member_status=undefined
|
|
65
|
-
expected_result: |
|
|
66
|
-
{"os":"windows","visits":5}
|
|
67
|
-
{"os":"Unknown","visits":1}
|
|
68
|
-
|
|
69
|
-
- name: Filtered by timezone - America/Los_Angeles
|
|
70
|
-
description: Filtered by timezone - America/Los_Angeles
|
|
71
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=America/Los_Angeles
|
|
72
|
-
expected_result: |
|
|
73
|
-
{"os":"windows","visits":12}
|
|
74
|
-
{"os":"macos","visits":1}
|
|
75
|
-
|
|
76
|
-
- name: Test with multiple filters combined
|
|
77
|
-
description: Test with multiple filters combined
|
|
78
|
-
parameters: site_uuid=mock_site_uuid&date_from=2100-01-01&date_to=2100-01-07&timezone=Etc/UTC&device=desktop&browser=firefox
|
|
79
|
-
expected_result: |
|
|
80
|
-
{"os":"windows","visits":5}
|