Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2015-12-10 00:50:07 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-12-10 00:50:07 +0300
commitebced800c0184f5ce93663afab6b0337c3755cbb (patch)
treefb26c2506d37586ff0d38fb902d63d17701bd883 /plugins/CustomVariables/tests
parent3d26af780d8fe0e4f7c5824a88b95c4a0d0d25d7 (diff)
parentdb36ca384809ea36457a465a3b6d1ecf951b0e26 (diff)
Merge master into "3.0"
Conflicts: .travis.yml CHANGELOG.md core/Plugin/ControllerAdmin.php core/Version.php core/testMinimumPhpVersion.php plugins/API/API.php plugins/Actions/Reports/GetPageUrls.php plugins/AnonymousPiwikUsageMeasurement plugins/CoreHome/CoreHome.php plugins/CoreHome/templates/_menu.twig plugins/CoreVisualizations/javascripts/jqplotEvolutionGraph.js plugins/CustomVariables/tests/System/expected/test_CustomVariablesSystemTest__CustomVariables.getCustomVariables_day.xml plugins/Goals/Controller.php tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php tests/PHPUnit/Integration/Plugin/ManagerTest.php tests/PHPUnit/System/expected/test_FlattenReports__CustomVariables.getCustomVariables_day.xml tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_month.original.html tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getSegmentsMetadata.xml tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI__CustomVariables.getCustomVariables_range.xml tests/PHPUnit/System/expected/test_periodIsRange_dateIsLastN_MetadataAndNormalAPI_pagesegment__CustomVariables.getCustomVariables_range.xml tests/PHPUnit/System/expected/test_reportLimiting__CustomVariables.getCustomVariables_day.xml tests/PHPUnit/System/expected/test_reportLimiting_rankingQuery__CustomVariables.getCustomVariables_day.xml tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchALL_noGoalData__CustomVariables.getCustomVariables_day.xml tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchALL_noGoalData__CustomVariables.getCustomVariables_week.xml tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchVisitorType__CustomVariables.getCustomVariables_day.xml tests/PHPUnit/System/expected/test_twoVisitsWithCustomVariables_segmentMatchVisitorType__CustomVariables.getCustomVariables_week.xml tests/UI/expected-ui-screenshots tests/UI/specs/Overlay_spec.js tests/UI/specs/UIIntegration_spec.js
Diffstat (limited to 'plugins/CustomVariables/tests')
-rw-r--r--plugins/CustomVariables/tests/Integration/ModelTest.php2
-rw-r--r--plugins/CustomVariables/tests/System/expected/test_CustomVariablesSystemTest__CustomVariables.getCustomVariables_day.xml290
-rw-r--r--plugins/CustomVariables/tests/UI/.gitignore2
-rw-r--r--plugins/CustomVariables/tests/UI/CustomVariables_spec.js25
-rw-r--r--plugins/CustomVariables/tests/UI/expected-ui-screenshots/CustomVariables_link_in_menu.pngbin0 -> 6428 bytes
-rw-r--r--plugins/CustomVariables/tests/UI/expected-ui-screenshots/CustomVariables_manage.pngbin0 -> 68494 bytes
6 files changed, 221 insertions, 98 deletions
diff --git a/plugins/CustomVariables/tests/Integration/ModelTest.php b/plugins/CustomVariables/tests/Integration/ModelTest.php
index 128e5b09ef..905a5f6a1d 100644
--- a/plugins/CustomVariables/tests/Integration/ModelTest.php
+++ b/plugins/CustomVariables/tests/Integration/ModelTest.php
@@ -19,7 +19,7 @@ use Piwik\Tests\Framework\TestCase\IntegrationTestCase;
*/
class ModelTest extends IntegrationTestCase
{
- private static $cvarScopes = array('log_link_visit_action', 'log_visit', 'log_conversion');
+ private static $cvarScopes = array('page', 'visit', 'conversion');
public function setUp()
{
diff --git a/plugins/CustomVariables/tests/System/expected/test_CustomVariablesSystemTest__CustomVariables.getCustomVariables_day.xml b/plugins/CustomVariables/tests/System/expected/test_CustomVariablesSystemTest__CustomVariables.getCustomVariables_day.xml
index e504b8e8c7..766be4e97d 100644
--- a/plugins/CustomVariables/tests/System/expected/test_CustomVariablesSystemTest__CustomVariables.getCustomVariables_day.xml
+++ b/plugins/CustomVariables/tests/System/expected/test_CustomVariablesSystemTest__CustomVariables.getCustomVariables_day.xml
@@ -17,6 +17,12 @@
</goals>
<nb_conversions>1</nb_conversions>
<revenue>0</revenue>
+ <slots>
+ <row>
+ <scope>visit</scope>
+ <index>1</index>
+ </row>
+ </slots>
<segment>customVariableName==Name_VISIT_1</segment>
<subtable>
<row>
@@ -56,6 +62,12 @@
</goals>
<nb_conversions>1</nb_conversions>
<revenue>0</revenue>
+ <slots>
+ <row>
+ <scope>visit</scope>
+ <index>2</index>
+ </row>
+ </slots>
<segment>customVariableName==Name_VISIT_2</segment>
<subtable>
<row>
@@ -95,6 +107,12 @@
</goals>
<nb_conversions>1</nb_conversions>
<revenue>0</revenue>
+ <slots>
+ <row>
+ <scope>visit</scope>
+ <index>3</index>
+ </row>
+ </slots>
<segment>customVariableName==Name_VISIT_3</segment>
<subtable>
<row>
@@ -134,6 +152,12 @@
</goals>
<nb_conversions>1</nb_conversions>
<revenue>0</revenue>
+ <slots>
+ <row>
+ <scope>visit</scope>
+ <index>4</index>
+ </row>
+ </slots>
<segment>customVariableName==Name_VISIT_4</segment>
<subtable>
<row>
@@ -173,6 +197,12 @@
</goals>
<nb_conversions>1</nb_conversions>
<revenue>0</revenue>
+ <slots>
+ <row>
+ <scope>visit</scope>
+ <index>5</index>
+ </row>
+ </slots>
<segment>customVariableName==Name_VISIT_5</segment>
<subtable>
<row>
@@ -212,6 +242,12 @@
</goals>
<nb_conversions>1</nb_conversions>
<revenue>0</revenue>
+ <slots>
+ <row>
+ <scope>visit</scope>
+ <index>6</index>
+ </row>
+ </slots>
<segment>customVariableName==Name_VISIT_6</segment>
<subtable>
<row>
@@ -251,6 +287,12 @@
</goals>
<nb_conversions>1</nb_conversions>
<revenue>0</revenue>
+ <slots>
+ <row>
+ <scope>visit</scope>
+ <index>7</index>
+ </row>
+ </slots>
<segment>customVariableName==Name_VISIT_7</segment>
<subtable>
<row>
@@ -290,6 +332,12 @@
</goals>
<nb_conversions>1</nb_conversions>
<revenue>0</revenue>
+ <slots>
+ <row>
+ <scope>visit</scope>
+ <index>8</index>
+ </row>
+ </slots>
<segment>customVariableName==Name_VISIT_8</segment>
<subtable>
<row>
@@ -312,100 +360,148 @@
</row>
</subtable>
</row>
- <row>
- <label>Name_PAGE_1</label>
- <nb_actions>1</nb_actions>
- <segment>customVariableName==Name_PAGE_1</segment>
- <subtable>
- <row>
- <label>Val_PAGE1</label>
- <nb_visits>1</nb_visits>
- <nb_actions>1</nb_actions>
- </row>
- </subtable>
- </row>
- <row>
- <label>Name_PAGE_2</label>
- <nb_actions>1</nb_actions>
- <segment>customVariableName==Name_PAGE_2</segment>
- <subtable>
- <row>
- <label>Val_PAGE2</label>
- <nb_visits>1</nb_visits>
- <nb_actions>1</nb_actions>
- </row>
- </subtable>
- </row>
- <row>
- <label>Name_PAGE_3</label>
- <nb_actions>1</nb_actions>
- <segment>customVariableName==Name_PAGE_3</segment>
- <subtable>
- <row>
- <label>Val_PAGE3</label>
- <nb_visits>1</nb_visits>
- <nb_actions>1</nb_actions>
- </row>
- </subtable>
- </row>
- <row>
- <label>Name_PAGE_4</label>
- <nb_actions>1</nb_actions>
- <segment>customVariableName==Name_PAGE_4</segment>
- <subtable>
- <row>
- <label>Val_PAGE4</label>
- <nb_visits>1</nb_visits>
- <nb_actions>1</nb_actions>
- </row>
- </subtable>
- </row>
- <row>
- <label>Name_PAGE_5</label>
- <nb_actions>1</nb_actions>
- <segment>customVariableName==Name_PAGE_5</segment>
- <subtable>
- <row>
- <label>Val_PAGE5</label>
- <nb_visits>1</nb_visits>
- <nb_actions>1</nb_actions>
- </row>
- </subtable>
- </row>
- <row>
- <label>Name_PAGE_6</label>
- <nb_actions>1</nb_actions>
- <segment>customVariableName==Name_PAGE_6</segment>
- <subtable>
- <row>
- <label>Val_PAGE6</label>
- <nb_visits>1</nb_visits>
- <nb_actions>1</nb_actions>
- </row>
- </subtable>
- </row>
- <row>
- <label>Name_PAGE_7</label>
- <nb_actions>1</nb_actions>
- <segment>customVariableName==Name_PAGE_7</segment>
- <subtable>
- <row>
- <label>Val_PAGE7</label>
- <nb_visits>1</nb_visits>
- <nb_actions>1</nb_actions>
- </row>
- </subtable>
- </row>
- <row>
- <label>Name_PAGE_8</label>
- <nb_actions>1</nb_actions>
- <segment>customVariableName==Name_PAGE_8</segment>
- <subtable>
- <row>
- <label>Val_PAGE8</label>
- <nb_visits>1</nb_visits>
- <nb_actions>1</nb_actions>
- </row>
- </subtable>
- </row>
-</result>
+ <row>
+ <label>Name_PAGE_1</label>
+ <nb_actions>1</nb_actions>
+ <slots>
+ <row>
+ <scope>page</scope>
+ <index>1</index>
+ </row>
+ </slots>
+ <segment>customVariableName==Name_PAGE_1</segment>
+ <subtable>
+ <row>
+ <label>Val_PAGE1</label>
+ <nb_visits>1</nb_visits>
+ <nb_actions>1</nb_actions>
+ </row>
+ </subtable>
+ </row>
+ <row>
+ <label>Name_PAGE_2</label>
+ <nb_actions>1</nb_actions>
+ <slots>
+ <row>
+ <scope>page</scope>
+ <index>2</index>
+ </row>
+ </slots>
+ <segment>customVariableName==Name_PAGE_2</segment>
+ <subtable>
+ <row>
+ <label>Val_PAGE2</label>
+ <nb_visits>1</nb_visits>
+ <nb_actions>1</nb_actions>
+ </row>
+ </subtable>
+ </row>
+ <row>
+ <label>Name_PAGE_3</label>
+ <nb_actions>1</nb_actions>
+ <slots>
+ <row>
+ <scope>page</scope>
+ <index>3</index>
+ </row>
+ </slots>
+ <segment>customVariableName==Name_PAGE_3</segment>
+ <subtable>
+ <row>
+ <label>Val_PAGE3</label>
+ <nb_visits>1</nb_visits>
+ <nb_actions>1</nb_actions>
+ </row>
+ </subtable>
+ </row>
+ <row>
+ <label>Name_PAGE_4</label>
+ <nb_actions>1</nb_actions>
+ <slots>
+ <row>
+ <scope>page</scope>
+ <index>4</index>
+ </row>
+ </slots>
+ <segment>customVariableName==Name_PAGE_4</segment>
+ <subtable>
+ <row>
+ <label>Val_PAGE4</label>
+ <nb_visits>1</nb_visits>
+ <nb_actions>1</nb_actions>
+ </row>
+ </subtable>
+ </row>
+ <row>
+ <label>Name_PAGE_5</label>
+ <nb_actions>1</nb_actions>
+ <slots>
+ <row>
+ <scope>page</scope>
+ <index>5</index>
+ </row>
+ </slots>
+ <segment>customVariableName==Name_PAGE_5</segment>
+ <subtable>
+ <row>
+ <label>Val_PAGE5</label>
+ <nb_visits>1</nb_visits>
+ <nb_actions>1</nb_actions>
+ </row>
+ </subtable>
+ </row>
+ <row>
+ <label>Name_PAGE_6</label>
+ <nb_actions>1</nb_actions>
+ <slots>
+ <row>
+ <scope>page</scope>
+ <index>6</index>
+ </row>
+ </slots>
+ <segment>customVariableName==Name_PAGE_6</segment>
+ <subtable>
+ <row>
+ <label>Val_PAGE6</label>
+ <nb_visits>1</nb_visits>
+ <nb_actions>1</nb_actions>
+ </row>
+ </subtable>
+ </row>
+ <row>
+ <label>Name_PAGE_7</label>
+ <nb_actions>1</nb_actions>
+ <slots>
+ <row>
+ <scope>page</scope>
+ <index>7</index>
+ </row>
+ </slots>
+ <segment>customVariableName==Name_PAGE_7</segment>
+ <subtable>
+ <row>
+ <label>Val_PAGE7</label>
+ <nb_visits>1</nb_visits>
+ <nb_actions>1</nb_actions>
+ </row>
+ </subtable>
+ </row>
+ <row>
+ <label>Name_PAGE_8</label>
+ <nb_actions>1</nb_actions>
+ <slots>
+ <row>
+ <scope>page</scope>
+ <index>8</index>
+ </row>
+ </slots>
+ <segment>customVariableName==Name_PAGE_8</segment>
+ <subtable>
+ <row>
+ <label>Val_PAGE8</label>
+ <nb_visits>1</nb_visits>
+ <nb_actions>1</nb_actions>
+ </row>
+ </subtable>
+ </row>
+</result> \ No newline at end of file
diff --git a/plugins/CustomVariables/tests/UI/.gitignore b/plugins/CustomVariables/tests/UI/.gitignore
new file mode 100644
index 0000000000..f39be478e7
--- /dev/null
+++ b/plugins/CustomVariables/tests/UI/.gitignore
@@ -0,0 +1,2 @@
+/processed-ui-screenshots
+/screenshot-diffs \ No newline at end of file
diff --git a/plugins/CustomVariables/tests/UI/CustomVariables_spec.js b/plugins/CustomVariables/tests/UI/CustomVariables_spec.js
new file mode 100644
index 0000000000..1e247fca56
--- /dev/null
+++ b/plugins/CustomVariables/tests/UI/CustomVariables_spec.js
@@ -0,0 +1,25 @@
+/*!
+ * Piwik - free/libre analytics platform
+ *
+ * Screenshot integration tests.
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("CustomVariables", function () {
+ this.timeout(0);
+
+ this.fixture = "Piwik\\Plugins\\CustomVariables\\tests\\Fixtures\\VisitWithManyCustomVariables";
+
+ it('should show an overview of all used custom variables', function (done) {
+ expect.screenshot('manage').to.be.captureSelector('.pageWrap', function (page) {
+ page.load("?idSite=1&period=day&date=2010-01-03&module=CustomVariables&action=manage");
+ }, done);
+ });
+
+ it('should be visible in the menu', function (done) {
+ expect.screenshot('link_in_menu').to.be.captureSelector('li:contains(Manage)', function (page) {
+ }, done);
+ });
+}); \ No newline at end of file
diff --git a/plugins/CustomVariables/tests/UI/expected-ui-screenshots/CustomVariables_link_in_menu.png b/plugins/CustomVariables/tests/UI/expected-ui-screenshots/CustomVariables_link_in_menu.png
new file mode 100644
index 0000000000..39480bbf29
--- /dev/null
+++ b/plugins/CustomVariables/tests/UI/expected-ui-screenshots/CustomVariables_link_in_menu.png
Binary files differ
diff --git a/plugins/CustomVariables/tests/UI/expected-ui-screenshots/CustomVariables_manage.png b/plugins/CustomVariables/tests/UI/expected-ui-screenshots/CustomVariables_manage.png
new file mode 100644
index 0000000000..c03b7e3795
--- /dev/null
+++ b/plugins/CustomVariables/tests/UI/expected-ui-screenshots/CustomVariables_manage.png
Binary files differ