diff --git a/tests/integration/Main.test.php b/tests/integration/Main.test.php index 338d5cac8281bdbae8e57c6fbd87c8bcaf7214c3..64897cb20f85e808fb3218a525275392bbfef0b0 100644 --- a/tests/integration/Main.test.php +++ b/tests/integration/Main.test.php @@ -226,6 +226,7 @@ class Test_Piwik_Integration_Main extends Test_Integration $segment = 'visitConvertedGoalId!='.$idGoalStandard; $this->callGetApiCompareOutput(__FUNCTION__ . '_SegmentDidNotConvertGoalId1', 'xml', $idSite, $dateTime, $periods = array('day'), $setDateLastN = false, $language = false, $segment); + // Test segment visitorType $segment = 'visitorType==new'; $this->callGetApiCompareOutput(__FUNCTION__ . '_SegmentNewVisitors', 'xml', $idSite, $dateTime, $periods = array('week'), $setDateLastN = false, $language = false, $segment); $segment = 'visitorType==returning'; @@ -233,6 +234,10 @@ class Test_Piwik_Integration_Main extends Test_Integration $segment = 'visitorType==returningCustomer'; $this->callGetApiCompareOutput(__FUNCTION__ . '_SegmentReturningCustomers', 'xml', $idSite, $dateTime, $periods = array('week'), $setDateLastN = false, $language = false, $segment); + // Test segment pageTitle + $segment = 'pageTitle==incredible%20title!'; + $this->callGetApiCompareOutput(__FUNCTION__ . '_SegmentPageTitleMatch', 'xml', $idSite, $dateTime, $periods = array('day'), $setDateLastN = false, $language = false, $segment); + // test Live! output is OK also for the visit that just bought something (other visits leave an abandoned cart) $this->setApiToCall(array('Live.getLastVisitsDetails')); $this->callGetApiCompareOutput(__FUNCTION__ . '_LiveEcommerceStatusOrdered', 'xml', $idSite, Piwik_Date::factory($dateTime)->addHour( 30.65 )->getDatetime(), $periods = array('day')); @@ -922,6 +927,7 @@ class Test_Piwik_Integration_Main extends Test_Integration 'visitorId!=33c31e01394bdc63', // testing both filter on Actions table and visit table 'visitorId!=33c31e01394bdc63;daysSinceFirstVisit!=50', + //'pageUrl!=http://unknown/not/viewed', ); $dates = array( 'last7', diff --git a/tests/integration/expected/test_ecommerceOrderWithItems_SegmentPageTitleMatch__VisitsSummary.get_day.xml b/tests/integration/expected/test_ecommerceOrderWithItems_SegmentPageTitleMatch__VisitsSummary.get_day.xml new file mode 100644 index 0000000000000000000000000000000000000000..aad67141533cc95dd3e7c6c9a34cf7791cf4a7c9 --- /dev/null +++ b/tests/integration/expected/test_ecommerceOrderWithItems_SegmentPageTitleMatch__VisitsSummary.get_day.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8" ?> +<result> + <nb_visits>1</nb_visits> + <nb_uniq_visitors>1</nb_uniq_visitors> + <nb_actions>3</nb_actions> + <nb_visits_converted>1</nb_visits_converted> + <bounce_count>0</bounce_count> + <sum_visit_length>720</sum_visit_length> + <max_actions>3</max_actions> + <bounce_rate>0%</bounce_rate> + <nb_actions_per_visit>3</nb_actions_per_visit> + <avg_time_on_site>720</avg_time_on_site> +</result> \ No newline at end of file