diff options
author | Stefan Giehl <stefan@piwik.org> | 2016-11-21 02:44:49 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2016-11-21 02:44:49 +0300 |
commit | b5c4385a3aa2b1a415c5ca795bd3e9811fe55dcb (patch) | |
tree | aab2453c798f1035674c9e907fb288d789f5c0b0 /tests/PHPUnit/System | |
parent | 18a05ca54966e945d92e1deb8c93b910a27a9483 (diff) |
Fix goal metric processing for device type / model / brand (#10873)
* always persist visitor property if it's dimension implements `onAnyGoalConversion` event
* small code improvements
* adds some tests to prove converted goals are processed for device type / model / brand
* update tests
Diffstat (limited to 'tests/PHPUnit/System')
4 files changed, 13 insertions, 22 deletions
diff --git a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_withCookieSupport__DevicesDetection.getModel_day.xml b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_withCookieSupport__DevicesDetection.getModel_day.xml index 0e8f519c31..da61c550e1 100644 --- a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_withCookieSupport__DevicesDetection.getModel_day.xml +++ b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_withCookieSupport__DevicesDetection.getModel_day.xml @@ -10,15 +10,15 @@ <sum_visit_length>1621</sum_visit_length> <bounce_count>1</bounce_count> <goals> - <row idgoal='2'> + <row idgoal='1'> <nb_conversions>1</nb_conversions> <nb_visits_converted>1</nb_visits_converted> - <revenue>1</revenue> + <revenue>42</revenue> </row> - <row idgoal='1'> + <row idgoal='2'> <nb_conversions>1</nb_conversions> <nb_visits_converted>1</nb_visits_converted> - <revenue>42</revenue> + <revenue>1</revenue> </row> </goals> <nb_conversions>2</nb_conversions> diff --git a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_withCookieSupport__DevicesDetection.getType_day.xml b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_withCookieSupport__DevicesDetection.getType_day.xml index 37691b2a89..e809cc9f97 100644 --- a/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_withCookieSupport__DevicesDetection.getType_day.xml +++ b/tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_withCookieSupport__DevicesDetection.getType_day.xml @@ -10,14 +10,19 @@ <sum_visit_length>1621</sum_visit_length> <bounce_count>1</bounce_count> <goals> + <row idgoal='1'> + <nb_conversions>1</nb_conversions> + <nb_visits_converted>1</nb_visits_converted> + <revenue>42</revenue> + </row> <row idgoal='2'> <nb_conversions>1</nb_conversions> <nb_visits_converted>1</nb_visits_converted> <revenue>1</revenue> </row> </goals> - <nb_conversions>1</nb_conversions> - <revenue>1</revenue> + <nb_conversions>2</nb_conversions> + <revenue>43</revenue> <segment>deviceType==desktop</segment> <logo>plugins/DevicesDetection/images/screens/normal.gif</logo> </row> @@ -81,18 +86,4 @@ <segment>deviceType==tv</segment> <logo>plugins/DevicesDetection/images/screens/tv.png</logo> </row> - <row> - <label>Unknown</label> - <goals> - <row idgoal='1'> - <nb_conversions>1</nb_conversions> - <nb_visits_converted>1</nb_visits_converted> - <revenue>42</revenue> - </row> - </goals> - <nb_conversions>1</nb_conversions> - <revenue>42</revenue> - <nb_visits>0</nb_visits> - <logo>plugins/DevicesDetection/images/screens/unknown.gif</logo> - </row> </result>
\ No newline at end of file diff --git a/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_csv__ScheduledReports.generateReport_week.original.csv b/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_csv__ScheduledReports.generateReport_week.original.csv index 488663282f..93047397fd 100644 --- a/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_csv__ScheduledReports.generateReport_week.original.csv +++ b/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_csv__ScheduledReports.generateReport_week.original.csv @@ -18,7 +18,7 @@ VisitorName - Great name!,4,12,$ 13351.11,3,00:25:32,25% Device type label,nb_visits,nb_actions,revenue,nb_actions_per_visit,avg_time_on_site,bounce_rate -Desktop,5,16,$ 250,3.2,00:22:49,20% +Desktop,5,16,$ 13361.11,3.2,00:22:49,20% Device model label,nb_visits,nb_actions,revenue,nb_actions_per_visit,avg_time_on_site,bounce_rate diff --git a/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html b/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html index f04022a9ad..ee4fef630a 100644 --- a/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html +++ b/tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html @@ -730,7 +730,7 @@ 20% </td> <td style="font-size: 13px; border-left: 1px solid rgb(217,217,217); padding: 5px 0 5px 5px;"> - $ 250 + $ 13361.11 </td> </tr> </tbody> |