Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions tests/System/APITest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public function test_getTranslatableTypes($api)
$this->clearCaches();
}

$apiOutputIsMissingMetricTypes = version_compare(Version::VERSION, '5.2.0-b6', '<');
$testSuffix = 'API.getReportMetadata' == $api && $apiOutputIsMissingMetricTypes ? '_Old' : '';
$apiOutputIsMissingMetricChanges = version_compare(Version::VERSION, '5.2.0-b6', '<');
$testSuffix = 'API.getReportMetadata' == $api && $apiOutputIsMissingMetricChanges ? '_Old' : '';
$testSuffix = in_array($api, ['API.getReportPagesMetadata', 'API.getWidgetMetadata']) && version_compare(Version::VERSION, '5.0.0-rc5', '<=') ? '_Old' : $testSuffix;

$this->runAnyApiTest($api, '', $params, array('testSuffix' => $testSuffix, 'xmlFieldsToRemove' => array('imageGraphUrl', 'imageGraphEvolutionUrl')));
Expand All @@ -96,8 +96,6 @@ public function test_getTranslatableTypes_withCustomReports($api)
return;
}

$apiOutputIsMissingMetricTypes = version_compare(Version::VERSION, '4.13.4-b1', '<');

$this->clearCaches();
$this->makeSureToLoadCustomReports();

Expand All @@ -107,7 +105,7 @@ public function test_getTranslatableTypes_withCustomReports($api)
'period' => 'day',
);

$testSuffix = 'withCustomReports' . ('API.getReportMetadata' == $api && $apiOutputIsMissingMetricTypes ? '_Old' : '');
$testSuffix = 'withCustomReports';
$this->runAnyApiTest($api, '', $params, array('testSuffix' => $testSuffix, 'xmlFieldsToRemove' => array('imageGraphUrl', 'imageGraphEvolutionUrl')));
}

Expand Down
14 changes: 13 additions & 1 deletion tests/System/expected/test___API.getReportMetadata_.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2862,7 +2862,6 @@
<nb_actions_per_visit>Actions per Visit</nb_actions_per_visit>
<avg_time_on_site>Avg. Time on Website</avg_time_on_site>
<bounce_rate>Bounce Rate</bounce_rate>
<conversion_rate>Conversion Rate</conversion_rate>
</processedMetrics>
<metricTypes>
<nb_visits>number</nb_visits>
Expand All @@ -2875,6 +2874,19 @@
<conversion_rate>percent</conversion_rate>
</metricTypes>
<actionToLoadSubTables>getUrlsForSocial</actionToLoadSubTables>
<metricsGoal>
<nb_conversions>Conversions</nb_conversions>
<revenue>Revenue</revenue>
</metricsGoal>
<processedMetricsGoal>
<revenue_per_visit>Revenue per Visit</revenue_per_visit>
</processedMetricsGoal>
<metricTypesGoal>
<revenue_per_visit>money</revenue_per_visit>
<nb_conversions>number</nb_conversions>
<conversion_rate>percent</conversion_rate>
<revenue>money</revenue>
</metricTypesGoal>


<uniqueId>Referrers_getSocials</uniqueId>
Expand Down
69 changes: 67 additions & 2 deletions tests/System/expected/test___API.getReportPagesMetadata_.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2720,6 +2720,38 @@
<viewDataTable>tableGoals</viewDataTable>
<isReport>1</isReport>
</row>
<row>
<name>Social Networks</name>
<category>
<id>Goals by Referrers</id>
<name>Goals by Referrers</name>
<order>99</order>
<icon />
<help />
<widget />
</category>
<subcategory>
<id>Goals by Referrers</id>
<name>Goals by Referrers</name>
<order>99</order>
<help />
</subcategory>
<module>Referrers</module>
<action>getSocials</action>
<order>5</order>
<parameters>
<forceView>1</forceView>
<viewDataTable>tableGoals</viewDataTable>
<module>Referrers</module>
<action>getSocials</action>
<documentationForGoalsPage>1</documentationForGoalsPage>
<idGoal>0</idGoal>
</parameters>
<uniqueId>widgetReferrersgetSocialsforceView1viewDataTabletableGoalsdocumentationForGoalsPage1idGoal0</uniqueId>
<isWide>0</isWide>
<viewDataTable>tableGoals</viewDataTable>
<isReport>1</isReport>
</row>
<row>
<name>Campaigns</name>
<category>
Expand All @@ -2738,7 +2770,7 @@
</subcategory>
<module>Referrers</module>
<action>getCampaigns</action>
<order>5</order>
<order>6</order>
<parameters>
<forceView>1</forceView>
<viewDataTable>tableGoals</viewDataTable>
Expand Down Expand Up @@ -3798,6 +3830,39 @@
<viewDataTable>tableGoals</viewDataTable>
<isReport>1</isReport>
</row>
<row>
<name>Social Networks</name>
<category>
<id>Sales by Referrers</id>
<name>Sales by Referrers</name>
<order>99</order>
<icon />
<help />
<widget />
</category>
<subcategory>
<id>Sales by Referrers</id>
<name>Sales by Referrers</name>
<order>99</order>
<help />
</subcategory>
<module>Referrers</module>
<action>getSocials</action>
<order>5</order>
<parameters>
<forceView>1</forceView>
<viewDataTable>tableGoals</viewDataTable>
<module>Referrers</module>
<action>getSocials</action>
<documentationForGoalsPage>1</documentationForGoalsPage>
<idGoal>ecommerceOrder</idGoal>
<segmented_visitor_log_segment_suffix>visitEcommerceStatus==ordered</segmented_visitor_log_segment_suffix>
</parameters>
<uniqueId>widgetReferrersgetSocialsforceView1viewDataTabletableGoalsdocumentationForGoalsPage1idGoalecommerceOrdersegmented_visitor_log_segment_suffixvisitEcommerceStatus3D3Dordered</uniqueId>
<isWide>0</isWide>
<viewDataTable>tableGoals</viewDataTable>
<isReport>1</isReport>
</row>
<row>
<name>Campaigns</name>
<category>
Expand All @@ -3816,7 +3881,7 @@
</subcategory>
<module>Referrers</module>
<action>getCampaigns</action>
<order>5</order>
<order>6</order>
<parameters>
<forceView>1</forceView>
<viewDataTable>tableGoals</viewDataTable>
Expand Down
63 changes: 34 additions & 29 deletions tests/System/expected/test___API.getWidgetMetadata_.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2696,7 +2696,7 @@
</subcategory>
<module>Referrers</module>
<action>getCampaigns</action>
<order>5</order>
<order>6</order>
<parameters>
<forceView>1</forceView>
<viewDataTable>tableGoals</viewDataTable>
Expand Down Expand Up @@ -2810,6 +2810,39 @@
<viewDataTable>tableGoals</viewDataTable>
<isReport>1</isReport>
</row>
<row>
<name>Sales by Referrers: Social Networks</name>
<category>
<id>Goals_Ecommerce</id>
<name>Ecommerce</name>
<order>20</order>
<icon>icon-reporting-ecommerce</icon>
<help />
<widget />
</category>
<subcategory>
<id>Ecommerce_Sales</id>
<name>Sales</name>
<order>15</order>
<help>&lt;p&gt;This section contains an extensive collection of reports to help you analyse the different conditions that most commonly lead to sales, such as the traffic and campaign sources, user time and location and devices used to access them.&lt;/p&gt;&lt;p&gt;You can also learn exactly how revenue is associated with each dimension, such as specific traffic types or tracked campaigns.&lt;/p&gt;</help>
</subcategory>
<module>Referrers</module>
<action>getSocials</action>
<order>5</order>
<parameters>
<forceView>1</forceView>
<viewDataTable>tableGoals</viewDataTable>
<module>Referrers</module>
<action>getSocials</action>
<documentationForGoalsPage>1</documentationForGoalsPage>
<idGoal>ecommerceOrder</idGoal>
<segmented_visitor_log_segment_suffix>visitEcommerceStatus==ordered</segmented_visitor_log_segment_suffix>
</parameters>
<uniqueId>widgetReferrersgetSocialsforceView1viewDataTabletableGoalsdocumentationForGoalsPage1idGoalecommerceOrdersegmented_visitor_log_segment_suffixvisitEcommerceStatus3D3Dordered</uniqueId>
<isWide>0</isWide>
<viewDataTable>tableGoals</viewDataTable>
<isReport>1</isReport>
</row>
<row>
<name>Sales by Referrers: Websites</name>
<category>
Expand Down Expand Up @@ -3127,32 +3160,4 @@
</row>
</widgets>
</row>
<row>
<name>Pie graph</name>
<category>
<id>ExampleUI_UiFramework</id>
<name>UI Framework</name>
<order>90</order>
<icon />
<help />
<widget />
</category>
<subcategory>
<id>Pie graph</id>
<name>Pie graph</name>
<order>99</order>
<help />
</subcategory>
<module>ExampleUI</module>
<action>getPlanetRatios</action>
<order>212</order>
<parameters>
<module>ExampleUI</module>
<action>getPlanetRatios</action>
</parameters>
<uniqueId>widgetExampleUIgetPlanetRatios</uniqueId>
<isWide>0</isWide>
<viewDataTable>graphPie</viewDataTable>
<isReport>1</isReport>
</row>
</result>