Fixes #3904:
* new segment 'siteSearchKeyword' Fixes #3903, #3905: * adding few fields in the Live API output to accomodate getSuggestedValuesForSegment * renamed other fields for consistency with segment names Fixes #3906: * new API: getSuggestedValuesForSegment which returns top suggested values for a particular segment. It uses the Live.getLastVisitsDetails API to fetch the most recently used values, and will show the most used values first * Adding tests for everything. The test case actually generates data for all segments so that VisitsSummary.get returns some data for each of the 47 segments being tested returns some data. How it works: * generate extended data in fixture * Tests (1) call getSuggestedValuesForSegment for each segment, check there is some data returned for each segment * get the first suggested value from the list, * Tests (2) call VisitsSummary.get with this segment value, eg. countryCode==ru. * I worked this way for all 47 segments until all tests had some data ==> now we know that all segments have been tested and that the auto suggest works for all segments. TDD FTW!
Affichage de
- core/API/DocumentationGenerator.php 2 ajouts, 0 suppressioncore/API/DocumentationGenerator.php
- core/API/Request.php 1 ajout, 1 suppressioncore/API/Request.php
- core/DataTable.php 20 ajouts, 0 suppressioncore/DataTable.php
- core/DataTable/Filter/ColumnDelete.php 20 ajouts, 2 suppressionscore/DataTable/Filter/ColumnDelete.php
- core/Segment.php 1 ajout, 16 suppressionscore/Segment.php
- lang/en.php 1 ajout, 0 suppressionlang/en.php
- libs/PiwikTracker/PiwikTracker.php 1 ajout, 1 suppressionlibs/PiwikTracker/PiwikTracker.php
- plugins/API/API.php 64 ajouts, 2 suppressionsplugins/API/API.php
- plugins/Actions/Actions.php 41 ajouts, 13 suppressionsplugins/Actions/Actions.php
- plugins/CoreUpdater/CoreUpdater.php 2 ajouts, 1 suppressionplugins/CoreUpdater/CoreUpdater.php
- plugins/Live/API.php 117 ajouts, 13 suppressionsplugins/Live/API.php
- plugins/Live/Visitor.php 37 ajouts, 1 suppressionplugins/Live/Visitor.php
- plugins/Transitions/API.php 6 ajouts, 6 suppressionsplugins/Transitions/API.php
- plugins/UserCountry/UserCountry.php 6 ajouts, 7 suppressionsplugins/UserCountry/UserCountry.php
- plugins/UserSettings/UserSettings.php 2 ajouts, 2 suppressionsplugins/UserSettings/UserSettings.php
- tests/PHPUnit/Core/PluginsFunctions/WidgetsListTest.php 3 ajouts, 3 suppressionstests/PHPUnit/Core/PluginsFunctions/WidgetsListTest.php
- tests/PHPUnit/Core/SegmentTest.php 3 ajouts, 3 suppressionstests/PHPUnit/Core/SegmentTest.php
- tests/PHPUnit/DatabaseTestCase.php 3 ajouts, 8 suppressionstests/PHPUnit/DatabaseTestCase.php
- tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php 42 ajouts, 3 suppressionstests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php
- tests/PHPUnit/Integration/AutoSuggestAPITest.php 132 ajouts, 0 suppressiontests/PHPUnit/Integration/AutoSuggestAPITest.php
Chargement en cours
Veuillez vous inscrire ou vous se connecter pour commenter