0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Added tinybird tests for filtering

ref https://linear.app/tryghost/issue/ANAL-96/data-discrepancy-between-charts-when-filtering

- This adds a set of tests to describe what the data should look like when we filter on various values
- We have tests for source and browser which are pulled from different MVs
- The result files are generated using ./scripts/gen_test_results.sh, and then manually verified
- We know they are not yet fully correct
This commit is contained in:
Hannah Wolfe 2024-09-27 15:02:35 +01:00
parent 60443726c9
commit f082ba68e0
16 changed files with 37 additions and 0 deletions

View file

@ -0,0 +1 @@
tb pipe data kpis --date_from 2100-01-01 --date_to 2100-01-07 --site_uuid mock_site_uuid --format CSV --browser chrome

View file

@ -0,0 +1,7 @@
"date","visits","pageviews","bounce_rate","avg_session_sec"
"2100-01-01",1,2,0,1111
"2100-01-02",0,0,0,0
"2100-01-03",1,3,0,1115
"2100-01-04",3,7,0.3333333333333333,1716
"2100-01-05",1,3,0,493
"2100-01-06",1,1,1,0

View file

@ -0,0 +1 @@
tb pipe data top_browsers --date_from 2100-01-01 --date_to 2100-01-07 --site_uuid mock_site_uuid --format CSV --browser chrome

View file

@ -0,0 +1,2 @@
"browser","visits","pageviews"
"chrome",7,16

View file

@ -0,0 +1 @@
tb pipe data top_pages --date_from 2100-01-01 --date_to 2100-01-07 --site_uuid mock_site_uuid --format CSV --browser chrome

View file

@ -0,0 +1,4 @@
"pathname","visits","pageviews"
"/blog/hello-world/",6,7
"/about/",3,5
"/",3,4

View file

@ -0,0 +1 @@
tb pipe data top_sources --date_from 2100-01-01 --date_to 2100-01-07 --site_uuid mock_site_uuid --format CSV --browser chrome

View file

@ -0,0 +1,5 @@
"source","visits","pageviews"
"",4,4
"bing.com",1,1
"search.yahoo.com",1,1
"baidu.com",1,1

View file

@ -0,0 +1 @@
tb pipe data kpis --date_from 2100-01-01 --date_to 2100-01-07 --site_uuid mock_site_uuid --format CSV --source bing.com

View file

@ -0,0 +1,4 @@
"date","visits","pageviews","bounce_rate","avg_session_sec"
"2100-01-01",1,2,0,630
"2100-01-02",0,0,0,0
"2100-01-03",1,3,0,1115

View file

@ -0,0 +1 @@
tb pipe data top_browsers --date_from 2100-01-01 --date_to 2100-01-07 --site_uuid mock_site_uuid --format CSV --source bing.com

View file

@ -0,0 +1,3 @@
"browser","visits","pageviews"
"chrome",1,3
"ie",1,2

View file

@ -0,0 +1 @@
tb pipe data top_pages --date_from 2100-01-01 --date_to 2100-01-07 --site_uuid mock_site_uuid --format CSV --source bing.com

View file

@ -0,0 +1,2 @@
"pathname","visits","pageviews"
"/about/",2,2

View file

@ -0,0 +1 @@
tb pipe data top_sources --date_from 2100-01-01 --date_to 2100-01-07 --site_uuid mock_site_uuid --format CSV --source bing.com

View file

@ -0,0 +1,2 @@
"source","visits","pageviews"
"bing.com",2,2