Skip to content

Commit

Permalink
Merge pull request #69 from matomo-org/fix-builds
Browse files Browse the repository at this point in the history
Updating expected results to fix broken builds
  • Loading branch information
snake14 authored Aug 12, 2024
2 parents 6a2f496 + 196bc98 commit f2dbf76
Show file tree
Hide file tree
Showing 17 changed files with 403 additions and 1,225 deletions.
5 changes: 3 additions & 2 deletions tests/System/Commands/MigrateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,10 @@ public function testApi($api, $params)
FakeAccess::clearAccess(true);
$this->disableArchiving();

if (['Live.getLastVisitsDetails'] === $api && version_compare(Version::VERSION, '5.2.0-alpha', '<')) {
if (in_array($api, [['Live.getLastVisitsDetails'], ['Actions.getPageUrls']]) && version_compare(Version::VERSION, '5.2.0-alpha', '<')) {
$params['testSuffix'] = '5-2a';
}

$this->runApiTests($api, $params);
}

Expand All @@ -166,7 +167,7 @@ public function testApi_migrated($api, $params)

FakeAccess::clearAccess($superUser = true);

if (['Live.getLastVisitsDetails'] === $api && version_compare(Version::VERSION, '5.2.0-alpha', '<')) {
if (in_array($api, [['Live.getLastVisitsDetails'], ['Actions.getPageUrls']]) && version_compare(Version::VERSION, '5.2.0-alpha', '<')) {
$params['testSuffix'] = '5-2a';
}
try {
Expand Down
151 changes: 151 additions & 0 deletions tests/System/expected/test_5-2a__Actions.getPageUrls_day.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
<?xml version="1.0"?>
<result>
<row>
<label>sub</label>
<nb_visits>2</nb_visits>
<nb_hits>2</nb_hits>
<sum_time_spent>360</sum_time_spent>
<sum_bandwidth>0</sum_bandwidth>
<nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
<min_bandwidth/>
<max_bandwidth/>
<entry_nb_visits>1</entry_nb_visits>
<entry_nb_actions>2</entry_nb_actions>
<entry_sum_visit_length>721</entry_sum_visit_length>
<entry_bounce_count>0</entry_bounce_count>
<exit_nb_visits>1</exit_nb_visits>
<goals>
<row idgoal="1">
<nb_conversions>1</nb_conversions>
<revenue>5</revenue>
<nb_conv_pages_before>2</nb_conv_pages_before>
<nb_conversions_attrib>0.5</nb_conversions_attrib>
<nb_conversions_page_rate>1</nb_conversions_page_rate>
<nb_conversions_page_uniq>1</nb_conversions_page_uniq>
<revenue_attrib>2.5</revenue_attrib>
</row>
<row idgoal="ecommerceAbandonedCart">
<nb_conversions>1</nb_conversions>
<revenue>2541</revenue>
<nb_conversions_page_uniq>1</nb_conversions_page_uniq>
<nb_conversions_page_rate>1</nb_conversions_page_rate>
</row>
<row idgoal="ecommerceOrder">
<nb_conversions>1</nb_conversions>
<revenue>2541</revenue>
<nb_conv_pages_before>2</nb_conv_pages_before>
<nb_conversions_attrib>0.5</nb_conversions_attrib>
<nb_conversions_page_rate>1</nb_conversions_page_rate>
<nb_conversions_page_uniq>1</nb_conversions_page_uniq>
<revenue_attrib>1270.5</revenue_attrib>
</row>
</goals>
<avg_bandwidth>0</avg_bandwidth>
<avg_page_load_time>0</avg_page_load_time>
<avg_time_on_page>180</avg_time_on_page>
<bounce_rate>0%</bounce_rate>
<exit_rate>50%</exit_rate>
<segment>pageUrl=^http%253A%252F%252Fpiwik.net%252Fsub</segment>
<subtable>
<row>
<label>/page</label>
<nb_visits>2</nb_visits>
<nb_uniq_visitors>2</nb_uniq_visitors>
<nb_hits>2</nb_hits>
<sum_time_spent>360</sum_time_spent>
<sum_bandwidth>0</sum_bandwidth>
<nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
<min_bandwidth/>
<max_bandwidth/>
<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
<entry_nb_visits>1</entry_nb_visits>
<entry_nb_actions>2</entry_nb_actions>
<entry_sum_visit_length>721</entry_sum_visit_length>
<entry_bounce_count>0</entry_bounce_count>
<exit_nb_uniq_visitors>1</exit_nb_uniq_visitors>
<exit_nb_visits>1</exit_nb_visits>
<goals>
<row idgoal="1">
<nb_conversions>1</nb_conversions>
<revenue>5</revenue>
<nb_conv_pages_before>2</nb_conv_pages_before>
<nb_conversions_attrib>0.5</nb_conversions_attrib>
<nb_conversions_page_rate>0</nb_conversions_page_rate>
<nb_conversions_page_uniq>1</nb_conversions_page_uniq>
<revenue_attrib>2.5</revenue_attrib>
</row>
<row idgoal="ecommerceAbandonedCart">
<nb_conversions>1</nb_conversions>
<revenue>2541</revenue>
<nb_conversions_page_uniq>1</nb_conversions_page_uniq>
</row>
<row idgoal="ecommerceOrder">
<nb_conversions>1</nb_conversions>
<revenue>2541</revenue>
<nb_conv_pages_before>2</nb_conv_pages_before>
<nb_conversions_attrib>0.5</nb_conversions_attrib>
<nb_conversions_page_rate>0</nb_conversions_page_rate>
<nb_conversions_page_uniq>1</nb_conversions_page_uniq>
<revenue_attrib>1270.5</revenue_attrib>
</row>
</goals>
<avg_time_on_page>180</avg_time_on_page>
<bounce_rate>0%</bounce_rate>
<exit_rate>50%</exit_rate>
<url>http://example.com/sub/page</url>
<segment>pageUrl==http%253A%252F%252Fexample.com%252Fsub%252Fpage</segment>
</row>
</subtable>
</row>
<row>
<label>/index</label>
<nb_visits>1</nb_visits>
<nb_uniq_visitors>1</nb_uniq_visitors>
<nb_hits>1</nb_hits>
<sum_time_spent>360</sum_time_spent>
<sum_bandwidth>0</sum_bandwidth>
<nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
<min_bandwidth/>
<max_bandwidth/>
<entry_nb_uniq_visitors>1</entry_nb_uniq_visitors>
<entry_nb_visits>1</entry_nb_visits>
<entry_nb_actions>2</entry_nb_actions>
<entry_sum_visit_length>544</entry_sum_visit_length>
<entry_bounce_count>0</entry_bounce_count>
<goals>
<row idgoal="1">
<nb_conversions>1</nb_conversions>
<revenue>5</revenue>
<nb_conv_pages_before>2</nb_conv_pages_before>
<nb_conversions_attrib>0.5</nb_conversions_attrib>
<nb_conversions_page_rate>1</nb_conversions_page_rate>
<nb_conversions_page_uniq>1</nb_conversions_page_uniq>
<revenue_attrib>2.5</revenue_attrib>
<revenue_entry>5</revenue_entry>
<nb_conversions_entry_rate>1</nb_conversions_entry_rate>
<revenue_per_entry>5</revenue_per_entry>
<nb_conversions_entry>1</nb_conversions_entry>
</row>
<row idgoal="ecommerceOrder">
<nb_conversions>1</nb_conversions>
<revenue>2541</revenue>
<nb_conv_pages_before>2</nb_conv_pages_before>
<nb_conversions_attrib>0.5</nb_conversions_attrib>
<nb_conversions_page_rate>1</nb_conversions_page_rate>
<nb_conversions_page_uniq>1</nb_conversions_page_uniq>
<revenue_attrib>1270.5</revenue_attrib>
<revenue_entry>2541</revenue_entry>
<nb_conversions_entry_rate>1</nb_conversions_entry_rate>
<revenue_per_entry>2541</revenue_per_entry>
<nb_conversions_entry>1</nb_conversions_entry>
</row>
</goals>
<avg_bandwidth>0</avg_bandwidth>
<avg_page_load_time>0</avg_page_load_time>
<avg_time_on_page>360</avg_time_on_page>
<bounce_rate>0%</bounce_rate>
<exit_rate>0%</exit_rate>
<url>http://example.com/</url>
<segment>pageUrl==http%253A%252F%252Fexample.com%252F</segment>
</row>
</result>
151 changes: 151 additions & 0 deletions tests/System/expected/test_5-2a__Actions.getPageUrls_year.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
<?xml version="1.0"?>
<result>
<row>
<label>sub</label>
<nb_visits>2</nb_visits>
<nb_hits>2</nb_hits>
<sum_time_spent>360</sum_time_spent>
<sum_bandwidth>0</sum_bandwidth>
<nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
<min_bandwidth/>
<max_bandwidth/>
<entry_nb_visits>1</entry_nb_visits>
<entry_nb_actions>2</entry_nb_actions>
<entry_sum_visit_length>721</entry_sum_visit_length>
<entry_bounce_count>0</entry_bounce_count>
<exit_nb_visits>1</exit_nb_visits>
<goals>
<row idgoal="1">
<nb_conversions>1</nb_conversions>
<revenue>5</revenue>
<nb_conv_pages_before>2</nb_conv_pages_before>
<nb_conversions_attrib>0.5</nb_conversions_attrib>
<nb_conversions_page_rate>1</nb_conversions_page_rate>
<nb_conversions_page_uniq>1</nb_conversions_page_uniq>
<revenue_attrib>2.5</revenue_attrib>
</row>
<row idgoal="ecommerceAbandonedCart">
<nb_conversions>1</nb_conversions>
<revenue>2541</revenue>
<nb_conversions_page_uniq>1</nb_conversions_page_uniq>
<nb_conversions_page_rate>1</nb_conversions_page_rate>
</row>
<row idgoal="ecommerceOrder">
<nb_conversions>1</nb_conversions>
<revenue>2541</revenue>
<nb_conv_pages_before>2</nb_conv_pages_before>
<nb_conversions_attrib>0.5</nb_conversions_attrib>
<nb_conversions_page_rate>1</nb_conversions_page_rate>
<nb_conversions_page_uniq>1</nb_conversions_page_uniq>
<revenue_attrib>1270.5</revenue_attrib>
</row>
</goals>
<avg_bandwidth>0</avg_bandwidth>
<avg_page_load_time>0</avg_page_load_time>
<avg_time_on_page>180</avg_time_on_page>
<bounce_rate>0%</bounce_rate>
<exit_rate>50%</exit_rate>
<segment>pageUrl=^http%253A%252F%252Fpiwik.net%252Fsub</segment>
<subtable>
<row>
<label>/page</label>
<nb_visits>2</nb_visits>
<nb_hits>2</nb_hits>
<sum_time_spent>360</sum_time_spent>
<sum_bandwidth>0</sum_bandwidth>
<nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
<min_bandwidth/>
<max_bandwidth/>
<entry_nb_visits>1</entry_nb_visits>
<entry_nb_actions>2</entry_nb_actions>
<entry_sum_visit_length>721</entry_sum_visit_length>
<entry_bounce_count>0</entry_bounce_count>
<exit_nb_visits>1</exit_nb_visits>
<goals>
<row idgoal="1">
<nb_conversions>1</nb_conversions>
<revenue>5</revenue>
<nb_conv_pages_before>2</nb_conv_pages_before>
<nb_conversions_attrib>0.5</nb_conversions_attrib>
<nb_conversions_page_rate>0</nb_conversions_page_rate>
<nb_conversions_page_uniq>1</nb_conversions_page_uniq>
<revenue_attrib>2.5</revenue_attrib>
</row>
<row idgoal="ecommerceAbandonedCart">
<nb_conversions>1</nb_conversions>
<revenue>2541</revenue>
<nb_conversions_page_uniq>1</nb_conversions_page_uniq>
</row>
<row idgoal="ecommerceOrder">
<nb_conversions>1</nb_conversions>
<revenue>2541</revenue>
<nb_conv_pages_before>2</nb_conv_pages_before>
<nb_conversions_attrib>0.5</nb_conversions_attrib>
<nb_conversions_page_rate>0</nb_conversions_page_rate>
<nb_conversions_page_uniq>1</nb_conversions_page_uniq>
<revenue_attrib>1270.5</revenue_attrib>
</row>
</goals>
<sum_daily_nb_uniq_visitors>2</sum_daily_nb_uniq_visitors>
<sum_daily_entry_nb_uniq_visitors>1</sum_daily_entry_nb_uniq_visitors>
<sum_daily_exit_nb_uniq_visitors>1</sum_daily_exit_nb_uniq_visitors>
<avg_time_on_page>180</avg_time_on_page>
<bounce_rate>0%</bounce_rate>
<exit_rate>50%</exit_rate>
<url>http://example.com/sub/page</url>
<segment>pageUrl==http%253A%252F%252Fexample.com%252Fsub%252Fpage</segment>
</row>
</subtable>
</row>
<row>
<label>/index</label>
<nb_visits>1</nb_visits>
<nb_hits>1</nb_hits>
<sum_time_spent>360</sum_time_spent>
<sum_bandwidth>0</sum_bandwidth>
<nb_hits_with_bandwidth>0</nb_hits_with_bandwidth>
<min_bandwidth/>
<max_bandwidth/>
<entry_nb_visits>1</entry_nb_visits>
<entry_nb_actions>2</entry_nb_actions>
<entry_sum_visit_length>544</entry_sum_visit_length>
<entry_bounce_count>0</entry_bounce_count>
<goals>
<row idgoal="1">
<nb_conversions>1</nb_conversions>
<revenue>5</revenue>
<nb_conv_pages_before>2</nb_conv_pages_before>
<nb_conversions_attrib>0.5</nb_conversions_attrib>
<nb_conversions_page_rate>1</nb_conversions_page_rate>
<nb_conversions_page_uniq>1</nb_conversions_page_uniq>
<revenue_attrib>2.5</revenue_attrib>
<revenue_entry>5</revenue_entry>
<nb_conversions_entry_rate>1</nb_conversions_entry_rate>
<revenue_per_entry>5</revenue_per_entry>
<nb_conversions_entry>1</nb_conversions_entry>
</row>
<row idgoal="ecommerceOrder">
<nb_conversions>1</nb_conversions>
<revenue>2541</revenue>
<nb_conv_pages_before>2</nb_conv_pages_before>
<nb_conversions_attrib>0.5</nb_conversions_attrib>
<nb_conversions_page_rate>1</nb_conversions_page_rate>
<nb_conversions_page_uniq>1</nb_conversions_page_uniq>
<revenue_attrib>1270.5</revenue_attrib>
<revenue_entry>2541</revenue_entry>
<nb_conversions_entry_rate>1</nb_conversions_entry_rate>
<revenue_per_entry>2541</revenue_per_entry>
<nb_conversions_entry>1</nb_conversions_entry>
</row>
</goals>
<sum_daily_nb_uniq_visitors>1</sum_daily_nb_uniq_visitors>
<sum_daily_entry_nb_uniq_visitors>1</sum_daily_entry_nb_uniq_visitors>
<avg_bandwidth>0</avg_bandwidth>
<avg_page_load_time>0</avg_page_load_time>
<avg_time_on_page>360</avg_time_on_page>
<bounce_rate>0%</bounce_rate>
<exit_rate>0%</exit_rate>
<url>http://example.com/</url>
<segment>pageUrl==http%253A%252F%252Fexample.com%252F</segment>
</row>
</result>
Loading

0 comments on commit f2dbf76

Please sign in to comment.