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:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2011-03-04 06:23:24 +0300
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2011-03-04 06:23:24 +0300
commit3481590622ffcd838b0dbe21d48dfbf2be0c36a8 (patch)
tree03b652374e064bd64ab996de06db21648c56695b
parent7903da8f0c2727a287e580e7d43414eb97a792f9 (diff)
parent4282725c37293d51f998c611a4795ef83fcce325 (diff)
repackage with Peter fix
-rw-r--r--core/Common.php6
-rw-r--r--core/DataFiles/Languages.php2
-rw-r--r--core/Tracker/Action.php13
-rw-r--r--lang/el.php49
-rw-r--r--plugins/CoreUpdater/Controller.php7
-rw-r--r--tests/core/Common.test.php42
-rw-r--r--tests/core/Tracker/Action.test.php14
-rw-r--r--tests/webtest/testcases/level1/1.1-preinstall.xml49
-rw-r--r--tests/webtest/testcases/level1/1.3-update.xml101
-rw-r--r--tests/webtest/testcases/level1/1.4-preinstall.xml28
-rw-r--r--tests/webtest/testcases/level1/1.5-install.xml227
-rw-r--r--tests/webtest/testcases/level1/1.6-update.xml25
-rw-r--r--tests/webtest/testcases/level1/1.7-preinstall.xml29
-rw-r--r--tests/webtest/testcases/level1/1.8-install.xml227
-rw-r--r--tests/webtest/testcases/level1/1.9-update.xml52
-rw-r--r--tests/webtest/testcases/modules/macros.xml165
16 files changed, 860 insertions, 176 deletions
diff --git a/core/Common.php b/core/Common.php
index 3886bbfebb..67c4578b4c 100644
--- a/core/Common.php
+++ b/core/Common.php
@@ -310,7 +310,7 @@ class Piwik_Common
* @param string $urlQuery result of parse_url()['query'] and htmlentitied (& is &amp;) eg. module=test&amp;action=toto or ?page=test
* @param string $param
*
- * @return string|bool Parameter value if found (can be the empty string!), false if not found
+ * @return string|bool Parameter value if found (can be the empty string!), null if not found
*/
static public function getParameterFromQueryString( $urlQuery, $parameter)
{
@@ -319,7 +319,7 @@ class Piwik_Common
{
return $nameToValue[$parameter];
}
- return false;
+ return null;
}
/**
@@ -360,7 +360,7 @@ class Piwik_Common
else
{
$name = $value;
- $value = '';
+ $value = false;
}
// if array without indexes
diff --git a/core/DataFiles/Languages.php b/core/DataFiles/Languages.php
index 0ebff74776..a3e482d23e 100644
--- a/core/DataFiles/Languages.php
+++ b/core/DataFiles/Languages.php
@@ -53,7 +53,7 @@ if(!isset($GLOBALS['Piwik_LanguageList']))
'dv' => array('Divehi', 'Dhivehi', 'Maldivian'),
'dz' => 'Dzongkha',
'ee' => 'Ewe',
- 'el' => array('Greek', 'Modern Greek'), // Greek, Modern (1453-)
+ 'el' => array('Greek', 'Modern Greek', 'Hellenic'), // Greek, Modern (1453-)
'en' => 'English',
'eo' => 'Esperanto',
'es' => array('Spanish', 'Castilian'),
diff --git a/core/Tracker/Action.php b/core/Tracker/Action.php
index 343172a259..6debf50947 100644
--- a/core/Tracker/Action.php
+++ b/core/Tracker/Action.php
@@ -159,9 +159,20 @@ class Piwik_Tracker_Action implements Piwik_Tracker_Action_Interface
{
foreach ($value as $param)
{
- $validQuery .= $name.'[]='.$param.$separator;
+ if($param === false)
+ {
+ $validQuery .= $name.'[]'.$separator;
+ }
+ else
+ {
+ $validQuery .= $name.'[]='.$param.$separator;
+ }
}
}
+ else if($value === false)
+ {
+ $validQuery .= $name.$separator;
+ }
else
{
$validQuery .= $name.'='.$value.$separator;
diff --git a/lang/el.php b/lang/el.php
index 94e20da9ba..4f6bd2e435 100644
--- a/lang/el.php
+++ b/lang/el.php
@@ -16,6 +16,7 @@ $translations = array(
'General_Settings' => 'Ρυθμίσεις',
'General_GiveUsYourFeedback' => 'Πείτε μας τις παρατηρήσεις σας!',
'General_Unknown' => 'Άγνωστο',
+ 'General_Never' => 'Ποτέ',
'General_Required' => '%s απαιτούνται',
'General_NotValid' => '%s δεν είναι έγκυρο',
'General_Id' => 'Α/Α',
@@ -39,6 +40,15 @@ $translations = array(
'General_Value' => 'Τιμή',
'General_Details' => 'Λεπτομέρειες',
'General_Default' => 'Προεπιλογή',
+ 'General_Visit' => 'Επίσκεψη',
+ 'General_VisitorIP' => 'IP Επισκέπτη',
+ 'General_VisitType' => 'Τύπος Επισκέπτη',
+ 'General_DaysSinceLastVisit' => 'Ημέρες από την τελευταία επίσκεψη',
+ 'General_DaysSinceFirstVisit' => 'Ημέρες από την πρώτη επίσκεψη',
+ 'General_NumberOfVisits' => 'Αριθμός επισκέψεων',
+ 'General_VisitConvertedGoal' => 'Επίσκεψε που που εκπλήρωσε τουλάχιστον ένα Στόχο',
+ 'General_NewVisitor' => 'Νέος Επισκέπτης',
+ 'General_ReturningVisitor' => 'Επιστρεφόμενος επισκέπτης',
'General_Date' => 'Ημερομηνία',
'General_Period' => 'Περίοδος',
'General_ChooseDate' => 'Επιλογή ημερομηνίας',
@@ -71,6 +81,7 @@ $translations = array(
'General_ColumnNbVisits' => 'Επισκέψεις',
'General_ColumnPercentageVisits' => '% Επισκέψεις',
'General_ColumnNbActions' => 'Δραστηριότητες',
+ 'General_NbActions' => 'Αριθμός Δραστηριοτήτων',
'General_ColumnMaxActions' => 'Μέγιστος αριθμός δραστηριοτήτων σε μια επίσκεψη',
'General_ColumnSumVisitLength' => 'Συνολικός δαπανηθής χρόνος επισκεπτών (σε δευτερόλεπτα)',
'General_ColumnLabel' => 'Ετικέτα',
@@ -78,6 +89,7 @@ $translations = array(
'General_ColumnActionsPerVisit' => 'Δραστηριότητες ανά επίσκεψη',
'General_VisitDuration' => 'Μέση Διάρκεια Επισκέψεων (σε δευτερόλεπτα)',
'General_ColumnAvgTimeOnSite' => 'Μέσος χρόνος στην ιστοσελίδα',
+ 'General_ColumnVisitDuration' => 'Διάρκεια επίσκεψης (σε δευτερόλεπτα)',
'General_ColumnBounceRate' => 'Ρυθμός αναπήδησης',
'General_PageBounceRateDefinition' => 'Το ποσοστό των επισκέψεων που ξεκίνησαν σε αυτή τη σελίδα και έφυγαν από την ιστοσελίδα αμέσως.',
'General_ColumnExitRate' => 'Βαθμός εξόδου',
@@ -180,7 +192,6 @@ $translations = array(
'General_ExceptionNonceMismatch' => 'Αδύνατη η πιστοποίηση τεκμηρίου ασφάλειας σε αυτή τη φόρμα.',
'General_PleaseSpecifyValue' => 'Ορίστε μια τιμή για το «%s».',
'General_ExceptionMethodNotFound' => 'Η μέθοδος «%s» δεν υπάρχει ή δεν είναι διαθέσιμη στο πρότυπο «%s».',
- 'General_ExceptionSubtableNotFoundInArchive' => 'Αιτηθήκατε έναν συγκεκριμένο υποπίνακα αλλά δεν υπάρχουν αντίστοιχα δεδομένα στο Αρχείο.',
'General_ExceptionInvalidRendererFormat' => 'Η μορφή του Αναφορέα «%s» δεν είναι έγκυρη. Δοκιμάστε κάποιο από τις ακόλουθες: %s.',
'General_ExceptionInvalidPeriod' => 'Η περίοδος «%s» δεν υποστηρίζεται. Δοκιμάστε κάποια από τις ακόλουθες: %s.',
'General_ExceptionInvalidDateRange' => 'Η ημερομηνία «%s» δεν είναι ορθό εύρος ημεφομηνιών. Πρέπει να έχει την ακόλουθη μορφή: %s.',
@@ -236,6 +247,10 @@ $translations = array(
'Actions_ColumnPageURL' => 'URL σελίδας',
'Actions_ColumnClickedURL' => 'URL επιλογής',
'Actions_ColumnDownloadURL' => 'URL λήψης',
+ 'Actions_ColumnEntryPageURL' => 'URL Σελίδας Εισαγωγής',
+ 'Actions_ColumnEntryPageTitle' => 'Τίτλος Σελίδας Εισαγωγής',
+ 'Actions_ColumnExitPageURL' => 'URL Σελίδας Εξαγωγής',
+ 'Actions_ColumnExitPageTitle' => 'Τίτλος Σελίδας Εξαγωγής',
'AnonymizeIP_PluginDescription' => 'Δίνει ανωνυμία στις διευθύνσεις IP των επισκεπτών για να ακολουθείται η νομοθεσία περί Ιδιωτικού Απορρήτου.',
'API_PluginDescription' => 'Όλα τα δεδομένα στο Piwik είναι διαθέσιμα μέσω απλών APIs. Αυτό το πρόσθετο είναι το σημείο εισόδου της υπηρεσίας ιστού που μπορείτε να καλέσετε τα δεδομένα Ανάλυσης Ιστού σε xml, json, php, csv, κλπ.',
'API_QuickDocumentationTitle' => 'Σύντομη τεκμηρίωση API',
@@ -336,7 +351,6 @@ $translations = array(
'CorePluginsAdmin_Activated' => 'Ενεργοποιημένο',
'CorePluginsAdmin_Active' => 'Ενεργό',
'CorePluginsAdmin_Inactive' => 'Ανενεργό',
- 'CorePluginsAdmin_ActivatedHelp' => 'Αυτό το πρόσθετο δεν μπορεί να απενεργοποιηθεί',
'CorePluginsAdmin_Deactivate' => 'Απενεργοποίηση',
'CorePluginsAdmin_Activate' => 'Ενεργοποίηση',
'CorePluginsAdmin_MenuPlugins' => 'Πρόσθετα',
@@ -387,6 +401,10 @@ $translations = array(
'CoreUpdater_ExceptionArchiveIncompatible' => 'Μη συμβατό συμπιεσμένο αρχείο: %s',
'CoreUpdater_ExceptionArchiveEmpty' => 'Άδειο συμπιεσμένο αρχείο.',
'CoreUpdater_ExceptionArchiveIncomplete' => 'Το συμπιεσμένο αρχείο δεν είναι πλήρες: μερικά αρχεία λείπουν (π.χ. %s).',
+ 'CustomVariables_PluginDescription' => 'Οι Προσαρμοσμένες Μεταβλητές είναι ζεύγη ονομασίας-τιμής που μπορείτε να ορίσετε σε μια Επίσκεψη χρησιμοποιώντας τη συνάρτηση της μικροεφαρμογής Javascript setVisitCustomVariables(). Έτσι, το Piwik θα αναφέρει πόσες επισκέψεις, σελίδες και μετατροπές για κάθε ζεύγος ονομασίας-τιμής.',
+ 'CustomVariables_CustomVariables' => 'Προσαρμοσμένες Μεταβλητές',
+ 'CustomVariables_ColumnCustomVariableName' => 'Ονομάσία Προσαρμοσμένης Μεταβλητής',
+ 'CustomVariables_ColumnCustomVariableValue' => 'Τιμή Προσαρμοσμένης Μεταβλητής',
'Dashboard_PluginDescription' => 'Ο Κεντρικός σας Πίνακας των Στατιστικών Ιστού. Μπορείτε να προσαρμόσετε τον Κεντρικό σας Πίνακα: προσθήκη νέων μικροεφαρμογών, αλλάγή της διάταξης των μικροεφαρμογών σας. Κάθε χρήστης μπορεί να έχει πρόσβαση στον δικό του προσαρμοσμένο Κεντρικό Πίνακα.',
'Dashboard_Dashboard' => 'Κεντρικός Πίνακας',
'Dashboard_AddWidget' => 'Προσθήκη μικροεφαρμογής...',
@@ -443,9 +461,9 @@ $translations = array(
'Goals_Overview' => 'Επισκόπηση',
'Goals_GoalsOverview' => 'Επισκόπηση στόχων',
'Goals_GoalsManagement' => 'Διαχείριση στόχων',
- 'Goals_ConversionsOverviewBySegment' => 'Επισκόπηση μετατροπών ανά τμήμα',
- 'Goals_GoalConversionsBySegment' => 'Μετατροπές %s στόχων ανά τμήμα',
- 'Goals_ViewGoalsBySegment' => 'Προβολή στόχων ανά %s',
+ 'Goals_ConversionsOverviewBy' => 'Επισκόπηση μετατροπών ανά τμήμα',
+ 'Goals_GoalConversionsBy' => 'Μετατροπές %s στόχων ανά τμήμα',
+ 'Goals_ViewGoalsBy' => 'Προβολή στόχων ανά %s',
'Goals_PluginDescription' => 'Δημιουργήστε Στόχους και δείτε αναφορές για τις μετατροπές των στόχων σας: εξέλιξη στο χρόνο, πρόσοδος ανά επίσκεψη, μετατροπές ανά αναφορέα, ανά κλειδί, κλπ.',
'Goals_ColumnConversions' => 'Μετατροπές',
'Goals_ColumnRevenue' => 'Πρόσοδος',
@@ -523,8 +541,8 @@ $translations = array(
'Installation_Timezone' => 'Ζώνη ώρας ιστοσελίδας',
'Installation_SetupWebsiteError' => 'Συνέβη ένα σφάλμα κατά της προσθήκη του ιστοχώρου',
'Installation_SetupWebsiteSetupSuccess' => 'Η ιστοσελίδα %s δημιουργήθηκε με επιτυχία!',
- 'Installation_GeneralSetup' => 'Γενικές ρυθμίσεις',
- 'Installation_GeneralSetupSuccess' => 'Οι γενικές ρυθμίσεις πραγματοποιήθηκαν με επιτυχία',
+ 'Installation_SuperUser' => 'Υπερχρήστης',
+ 'Installation_SuperUserSetupSuccess' => 'Η Υπερχρήστης δημιουργήθηκε με επιτυχία!',
'Installation_SuperUserLogin' => 'Σύνδεση υπερχρήστη',
'Installation_Password' => 'Κωδικός πρόσβασης',
'Installation_PasswordRepeat' => 'Επανάληψη κωδικού πρόσβασης',
@@ -532,7 +550,6 @@ $translations = array(
'Installation_SecurityNewsletter' => 'Ενεργοποίηση αλληλογραφίας για τις βασικές αναβαθμίσεις του Piwik και ειδοποιήσεις ασφάλειας',
'Installation_CommunityNewsletter' => 'Ενεργοποίηση αλληλογραφίας για ενημερώσεις της κοινότητας (νέα πρόσθετα, νέα χαρακτηριστικά, κλπ.)',
'Installation_PasswordDoNotMatch' => 'ο κωδικός δεν ταιριάζει',
- 'Installation_SubmitGo' => 'Υποβολή!',
'Installation_Requirements' => 'Απαιτήσεις Piwik',
'Installation_Optional' => 'Προαιρετικά',
'Installation_Legend' => 'Υπόμνημα',
@@ -578,8 +595,8 @@ $translations = array(
'Installation_SystemCheckAutoUpdateHelp' => 'Σημείωση: Η αναβάθμιση με Ένα Πάτημα του Piwik απαιτεί δικαιώματα εγγραφής στο φάκελο Piwik και στα περιεχόμενά του.',
'Installation_SystemCheckError' => 'Συνέβη ένα σφάλμα – πρέπει να διορθωθεί πριν συνεχίσετε',
'Installation_SystemCheckWarning' => 'Το Piwik θα δουλεύει κανονικά αλλά θα λείπουν κάποιες λειτουργίες',
- 'Installation_SystemCheckReverseProxy' => 'Αντιστροφή Proxy',
- 'Installation_SystemCheckReverseProxyHelp' => 'Φαίνεται ότι είστε πίσω από αντεστραμένο proxy. Αυτές οι γραμμές θα προστεθούν στο config/config.ini.php:',
+ 'Installation_SystemCheckSecureProtocol' => 'Ασφαλές πρωτόκολλο',
+ 'Installation_SystemCheckSecureProtocolHelp' => 'Φαίνεται ότι χρησιμοποιείται https με τον διακομιστή σας. Αυτές οι γραμμές θα προστεθούν στο αρχείο onfig/config.ini.php;',
'Installation_SystemCheckIpv4' => 'IPv4',
'Installation_SystemCheckIpv4Help' => 'Πρέπει να απενεργοποιήσετε το IPv6 στις ρυθμίσεις του διακομιστή σας.',
'Installation_SystemCheckTracker' => 'Κατάσταση Ανιχνευτή',
@@ -631,7 +648,7 @@ $translations = array(
'Login_PasswordsDoNotMatch' => 'Οι κωδικοί δεν ταιριάζουν.',
'Login_PasswordSuccessfullyChanged' => 'Ο κωδικός άλλαξε με επιτυχία!',
'Login_InvalidUsernameEmail' => 'Λανθασμένο όνομα χρήστη ή/και λάθος ηλεκτρονική διεύθυνση',
- 'Login_InvalidNonceOrReferer' => 'Το κλειδί ασφαλείας της φόρμας είναι άκυρο ή έχει λήξει. Επαναφορτώστε πάλι τη φόρμα και ελέξτε αν είναι ενεργοποιημένα τα cookies.',
+ 'Login_InvalidNonceOrHeaders' => 'Η ασφάλεια της φόρμας απέτυχε. Επαναφορτώστε τη φόρμα και ελέγξτε ότι είναι ενεργοποιημένα τα cookies. Αν χρησιμοποιείτε διακομιστή proxy, πρέπει να ρυθμίσετε το Piwik να δέχετε την κεφαλίδα Proxy που προωθεί την Κεφαλίδα του Φιλοξενητή.',
'Login_InvalidOrExpiredToken' => 'Το τεκμήριο είναι άκυρο ή έχει λήξει',
'Login_MailTopicPasswordRecovery' => 'Ανάκτηση κωδικού',
'Login_MailPasswordRecoveryBody' => 'Γεια %1$s, Ελήφθη αίτημα ανάκτησης κωδικού πρόσβασης από %2$s. Για να ανακτήσετε τον κωδικό πρόσβασής σας: 1) Μεταβείτε στη Φόρμα Ανάκτησης Κωδικού Πρόσβασης στο: %3$s 2) Εισάγετε το ακόλουθο τεκμήριο: %4$s 3) Συμπληρώστε τη φόρμα (εισάγοντας τον νέο κωδικό πρόσβασης δύο φορές) και υποβάλετε τη φόρμα. Σημείωση: αυτό το τεκμήριο θα εκπεύσει σε 24 ώρες.',
@@ -670,6 +687,7 @@ $translations = array(
'Referers_ColumnWebsitePage' => 'Σελίδα Ιστοσελίδας',
'Referers_ColumnKeyword' => 'Λέξη-κλειδί',
'Referers_ColumnCampaign' => 'Εκστρατεία',
+ 'Referers_RefererName' => 'Ονομασία Αναφορέα',
'Referers_DetailsByRefererType' => 'Λεπτομέρειες για τον Τύπο Αναφορέα',
'Referers_TypeDirectEntries' => '%s απευθείας είσοδοι',
'Referers_TypeSearchEngines' => '%s από μηχανές αναζήτησης',
@@ -709,6 +727,8 @@ $translations = array(
'SitesManager_TrackingTags' => 'Κώδικας εποπτείας για %s',
'SitesManager_WebsitesManagement' => 'Διαχείριση ιστοσελίδων',
'SitesManager_MainDescription' => 'Το σύστημα αναλυτικών αναφορών χρειάζεται ιστοσελίδες! Προσθέστε, ενημερώστε, διαγράψτε ιστοσελίδες και εμφανίστε τον κώδικα Javascript που θα εισηχθεί στις ιστοσελίδες σας.',
+ 'SitesManager_YouCurrentlyHaveAccessToNWebsites' => 'Έχετε πρόσβαση σε %s ιστοσελίδες.',
+ 'SitesManager_OnlyOneSiteAtTime_js' => 'Μπορείτε να επεξεργαστείτε μόνο μια ιστοσελίδα τη φορά. Αποθηκεύστε ή Ακυρώστε τις τρέχουσες αλλαγές για την ιστοσελίδα %s.',
'SitesManager_JsTrackingTag' => 'Ετικέτα Παρακολούθησης JavaScript',
'SitesManager_JsTrackingTagHelp' => 'Εδώ είναι η ετικέτα Παρακολούθησης JavaScript για να συμπεριληφθεί στις σελίδες σας',
'SitesManager_ShowTrackingTag' => 'προβολή ετικέτας παρακολούθησης',
@@ -750,8 +770,6 @@ $translations = array(
'SitesManager_CurrencySymbolWillBeUsedForGoals' => 'Το σύμβολο το Νομίσματος θα εμφανιστεί δίπλα στις Προσόδους των Στόχων.',
'SitesManager_DefaultCurrencyForNewWebsites' => 'Προεπιλεγμένο Νόμισμα για νέες ιστοσελίδες',
'SitesManager_SelectDefaultCurrency' => 'Μπορείτε να επιλέξετε το νόμισμα το οποίο θα είναι προεπιλογή για τις νέες ιστοσελίδες.',
- 'SitesManager_Save_js' => 'Αποθήκευση',
- 'SitesManager_Cancel_js' => 'Άκυρο',
'TranslationsAdmin_PluginDescription' => 'Βοηθήστε να μεταφραστεί το Piwik στη γλώσσα σας.',
'TranslationsAdmin_MenuTranslations' => 'Μεταφράσεις',
'TranslationsAdmin_MenuLanguages' => 'Γλώσσες',
@@ -1064,6 +1082,7 @@ $translations = array(
'UserSettings_WideScreen' => 'Τύποι οθόνης',
'UserSettings_ColumnBrowserFamily' => 'Οικογένεια φυλλομετρητών',
'UserSettings_ColumnBrowser' => 'Φυλλομετρητής',
+ 'UserSettings_ColumnBrowserVersion' => 'Έκδοση φυλλομετρητή',
'UserSettings_ColumnPlugin' => 'Πρόσθετο',
'UserSettings_ColumnConfiguration' => 'Ρύθμιση',
'UserSettings_ColumnOperatingSystem' => 'Λειτουργικό σύστημα',
@@ -1081,6 +1100,7 @@ $translations = array(
'UsersManager_PluginDescription' => 'Διαχείριση Χρηστών στο Piwik: προσθήκη ενός νέου Χρήστη, επεξεργασία ενός υπάρχοντος χρήστη, αναβαθμίστε τα δικαιώματα. Όλες οι δραστηριότητες είναι επίσης διαθέσιμες μέσω του API.',
'UsersManager_UsersManagement' => 'Διαχείριση χρηστών',
'UsersManager_UsersManagementMainDescription' => 'Δημιουργήστε νέους χρήστες ή ενημερώστε τους υπάρχοντες. Μπορείτε επίσης να αλλάξετε τα δικαιώματά τους (παραπάνω).',
+ 'UsersManager_ThereAreCurrentlyNRegisteredUsers' => 'Υπάρχουν %s εγεγραμμένοι χρήστες.',
'UsersManager_ManageAccess' => 'Διαχείριση πρόσβασης',
'UsersManager_MainDescription' => 'Ρυθμίστε ποιοι χρήστες θα έχουν πρόσβαση σε ποιες ιστοσελίδες. Μπορείτε επίσης να ρυθμίσετε τα δικαιώματα για όλες τις ιστοσελίδες με μία κίνηση.',
'UsersManager_Sites' => 'Ιστοσελίδες',
@@ -1153,7 +1173,6 @@ $translations = array(
'VisitorGenerator_SelectWebsite' => 'Επιλογή Ιστοσελίδας',
'VisitorGenerator_MinVisitors' => 'Ελάχιστοι Επισκέπτες',
'VisitorGenerator_MaxVisitors' => 'Μέγιστοι Επισκέπτες',
- 'VisitorGenerator_NbActions' => 'Αριθμός Δραστηριοτήτων',
'VisitorGenerator_NbRequestsPerSec' => 'Αιτήσεις ανά δευτερόλεπτο',
'VisitorGenerator_DaysToCompute' => 'Ημέρες για υπολογισμό',
'VisitorInterest_PluginDescription' => 'Αναφέρει το Ενδιαφέρον Επισκέπτη: αριθμός προσβηθέντων σελίδων, δαπανηθής χρόνος στην Ιστοσελίδα.',
@@ -1197,7 +1216,7 @@ $translations = array(
'VisitTime_NHour' => '%sω',
'Widgetize_PluginDescription' => 'Το πρόσθετο κάνει πολύ εύκολη την εξαγωγή οποιασδήποτε Μικροεφαρμογής Piwik στο Ιστολόγιό σας, την Ιστοσελίδα σας ή το Igoogle και το Netvibes!',
'PDFReports_PluginDescription' => 'Δημιουργήστε και λάβετε τις προσαρμοσμένες αναφορές PDF και αποστείλτε ηλεκτρονικά ημερησίως, εβδομαδιαίως ή μηνιαίως.',
- 'PDFReports_ManagePdfReports' => 'Διαχείριση Αναφορών PDF',
+ 'PDFReports_ManageEmailReports' => 'Διαχείριση Αναφορών Αλληλογραφίας',
'PDFReports_EmailReports' => 'Αναφορές Ηλεκτρονικής Αλληλογραφίας',
'PDFReports_PDF' => 'PDF',
'PDFReports_SendReportNow' => 'Αποστολή Αναφοράς τώρα',
diff --git a/plugins/CoreUpdater/Controller.php b/plugins/CoreUpdater/Controller.php
index 9c1efab808..afec2c680d 100644
--- a/plugins/CoreUpdater/Controller.php
+++ b/plugins/CoreUpdater/Controller.php
@@ -96,6 +96,9 @@ class Piwik_CoreUpdater_Controller extends Piwik_Controller
private function oneClick_Unpack()
{
+ $pathExtracted = PIWIK_USER_PATH . self::PATH_TO_EXTRACT_LATEST_VERSION;
+ $this->pathRootExtractedPiwik = $pathExtracted . 'piwik';
+
if(file_exists($this->pathRootExtractedPiwik))
{
Piwik::unlinkRecursive($this->pathRootExtractedPiwik, true);
@@ -103,7 +106,6 @@ class Piwik_CoreUpdater_Controller extends Piwik_Controller
$archive = Piwik_Unzip::factory('PclZip', $this->pathPiwikZip);
- $pathExtracted = PIWIK_USER_PATH . self::PATH_TO_EXTRACT_LATEST_VERSION;
if ( 0 == ($archive_files = $archive->extract($pathExtracted) ) )
{
throw new Exception(Piwik_TranslateException('CoreUpdater_ExceptionArchiveIncompatible', $archive->errorInfo()));
@@ -114,7 +116,6 @@ class Piwik_CoreUpdater_Controller extends Piwik_Controller
throw new Exception(Piwik_TranslateException('CoreUpdater_ExceptionArchiveEmpty'));
}
unlink($this->pathPiwikZip);
- $this->pathRootExtractedPiwik = $pathExtracted . 'piwik';
}
private function oneClick_Verify()
@@ -297,6 +298,7 @@ class Piwik_CoreUpdater_Controller extends Piwik_Controller
$this->warningMessages = array_merge($this->warningMessages, array_slice($integrityInfo, 1));
}
+ Piwik_AssetManager::removeMergedAssets();
Piwik_View::clearCompiledTemplates();
$view->coreError = $this->coreError;
@@ -312,6 +314,7 @@ class Piwik_CoreUpdater_Controller extends Piwik_Controller
{
$this->loadAndExecuteUpdateFiles($updater, $componentsWithUpdateFile);
+ Piwik_AssetManager::removeMergedAssets();
Piwik_View::clearCompiledTemplates();
$view->coreError = $this->coreError;
diff --git a/tests/core/Common.test.php b/tests/core/Common.test.php
index 851ae4ede2..a1ed376a41 100644
--- a/tests/core/Common.test.php
+++ b/tests/core/Common.test.php
@@ -356,19 +356,19 @@ class Test_Piwik_Common extends UnitTestCase
}
/**
- * no query string => false
+ * no query string => null
*/
function test_getParameterFromQueryString_noQuerystring()
{
$urlQuery = "";
$parameter = "test''";
$result = Piwik_Common::getParameterFromQueryString( $urlQuery, $parameter);
- $expectedResult = false;
- $this->assertEqual($result, $expectedResult);
+ $expectedResult = null;
+ $this->assertTrue($result === $expectedResult);
}
/**
- * param not found => false
+ * param not found => null
*/
function test_getParameterFromQueryString_parameternotfound()
{
@@ -376,8 +376,21 @@ class Test_Piwik_Common extends UnitTestCase
$urlQuery = "toto=mama&mama=titi";
$parameter = "tot";
$result = Piwik_Common::getParameterFromQueryString( $urlQuery, $parameter);
+ $expectedResult = null;
+ $this->assertTrue($result === $expectedResult);
+ }
+
+ /**
+ * missing parameter value => returns false
+ */
+ function test_getParameterFromQueryString_missingParamValue()
+ {
+
+ $urlQuery = "toto=mama&mama&tuytyt=teaoi";
+ $parameter = "mama";
+ $result = Piwik_Common::getParameterFromQueryString( $urlQuery, $parameter);
$expectedResult = false;
- $this->assertEqual($result, $expectedResult);
+ $this->assertTrue($result === $expectedResult);
}
/**
@@ -434,6 +447,7 @@ class Test_Piwik_Common extends UnitTestCase
function test_getParameterFromQueryString()
{
$tests = array(
+ 'x' => false,
'x=1' => '1',
'?x=1' => '1',
'x[]=' => array(''),
@@ -446,7 +460,7 @@ class Test_Piwik_Common extends UnitTestCase
// ?x[]=A&y=1
'?x%5B%5D=A%26y%3D1' => array('A%26y%3D1'),
// ?z=y&x[]=1
- '?z=y%26x%5b%5d%3d1' => false,
+ '?z=y%26x%5b%5d%3d1' => null,
);
// use $i as the test index because simpletest uses sprintf() internally and the percent encoding causes an error
@@ -454,11 +468,25 @@ class Test_Piwik_Common extends UnitTestCase
foreach($tests as $test => $expected)
{
$i++;
- $this->assertFalse(Piwik_Common::getParameterFromQueryString($test, 'y'), $i);
+ $this->assertTrue(Piwik_Common::getParameterFromQueryString($test, 'y') === null, $i);
$this->assertTrue(Piwik_Common::getParameterFromQueryString($test, 'x') === $expected, $i);
}
}
+ function test_getArrayFromQueryString()
+ {
+ $expected = array(
+ 'a' => false,
+ 'b' => '',
+ 'c' => '1',
+ 'd' => array( false ),
+ 'e' => array(''),
+ 'f' => array('a'),
+ 'g' => array('b', 'c'),
+ );
+ $this->assertEqual(serialize(Piwik_Common::getArrayFromQueryString('a&b=&c=1&d[]&e[]=&f[]=a&g[]=b&g[]=c')), serialize($expected));
+ }
+
public function test_isValidFilenameValidValues()
{
diff --git a/tests/core/Tracker/Action.test.php b/tests/core/Tracker/Action.test.php
index 6032620635..05c7dd6bdb 100644
--- a/tests/core/Tracker/Action.test.php
+++ b/tests/core/Tracker/Action.test.php
@@ -58,6 +58,7 @@ class Test_Piwik_TrackerAction extends Test_Database
// testing with missing value
'http://a.com/index?p1=v1&p2=&p3=v3&p4',
+ 'http://a.com/index?p1&p2=v2&p3=v3&p4',
// testing with extra &&
'http://a.com/index?p1=v1&&p2=v2&p3=v3&p4=v4&&',
@@ -80,7 +81,10 @@ class Test_Piwik_TrackerAction extends Test_Database
'http://a.com/index?p1=v1&p2[]=v2a&p2[]=v2b&p2[]=v2c&p3=v3&p4=v4',
// normalize orphaned p4
- 'http://a.com/index?p1=v1&p2=&p3=v3&p4=',
+ 'http://a.com/index?p1=v1&p2=&p3=v3&p4',
+
+ // normalize orphaned p1
+ 'http://a.com/index?p1&p2=v2&p3=v3&p4',
// the extra & are automatically cleaned up
'http://a.com/index?p1=v1&p2=v2&p3=v3&p4=v4',
@@ -108,6 +112,7 @@ class Test_Piwik_TrackerAction extends Test_Database
'http://a.com/index?p1=v1&p3=v3',
'http://a.com/index?p1=v1&p3=v3',
'http://a.com/index?p1=v1&p3=v3',
+ 'http://a.com/index?p1&p3=v3',
'http://a.com/index?p1=v1&p3=v3',
);
$this->setUpRootAccess();
@@ -136,6 +141,7 @@ class Test_Piwik_TrackerAction extends Test_Database
'http://a.com/index?p1=v1&p3=v3',
'http://a.com/index?p1=v1&p3=v3',
'http://a.com/index?p1=v1&p3=v3',
+ 'http://a.com/index?p1&p3=v3',
'http://a.com/index?p1=v1&p3=v3',
);
$this->setUpRootAccess();
@@ -235,6 +241,12 @@ class Test_Piwik_TrackerAction extends Test_Database
'url' => 'http://example.org/CATEGORY/TEST',
'type' => Piwik_Tracker_Action::TYPE_ACTION_URL),
),
+ array(
+ 'request' => array( 'url' => 'http://example.org/?2,123'),
+ 'expected' => array( 'name' => null,
+ 'url' => 'http://example.org/?2,123',
+ 'type' => Piwik_Tracker_Action::TYPE_ACTION_URL),
+ ),
// empty request
array(
diff --git a/tests/webtest/testcases/level1/1.1-preinstall.xml b/tests/webtest/testcases/level1/1.1-preinstall.xml
index ae183691e6..c67315662f 100644
--- a/tests/webtest/testcases/level1/1.1-preinstall.xml
+++ b/tests/webtest/testcases/level1/1.1-preinstall.xml
@@ -9,7 +9,7 @@
<!ENTITY rsaquo "&#8250;" >
]>
-<project name="Level 1 - pre-install" basedir="." default="webtest">
+<project name="Level 1 - pre-install 1.0" basedir="." default="webtest">
&time;
<target name="webtest">
<webtest name="pre-install">
@@ -17,54 +17,11 @@
<option name="ThrowExceptionOnScriptError" value="false" />
</config>
<steps>
- <echo>Pre-install</echo>
+ <echo>Pre-install 1.0</echo>
&loadMacros;
- <!-- download Piwik 1.0 and unzip -->
-
- <property environment="env" />
-
- <get src="http://builds.piwik.org/piwik-1.0.zip" dest="piwik-1.0.zip" />
-
- <unzip src="piwik-1.0.zip" dest="${env.WORKSPACE}" />
-
- <delete includeemptydirs="true">
- <fileset dir="${basedir}/../.." includes="config/**" />
- <fileset dir="${basedir}/../.." includes="core/**" />
- <fileset dir="${basedir}/../.." includes="js/**" />
- <fileset dir="${basedir}/../.." includes="lang/**" />
- <fileset dir="${basedir}/../.." includes="libs/**" />
- <fileset dir="${basedir}/../.." includes="misc/**" />
- <fileset dir="${basedir}/../.." includes="plugins/**" />
- <fileset dir="${basedir}/../.." includes="themes/**" />
- <fileset dir="${basedir}/../.." includes="tmp/**" />
- <fileset dir="${basedir}/../..">
- <include name="*" />
- <exclude name="tests" />
- </fileset>
- </delete>
-
- <move todir="${env.WORKSPACE}/build/">
- <fileset dir="${env.WORKSPACE}/piwik/" />
- </move>
-
- <replace file="${env.WORKSPACE}/build/config/global.ini.php">
- <replacefilter
- token="latest_version_url = http://piwik.org/latest.zip"
- value="latest_version_url = http://${env.HTTP_HOST}/jenkins.private/jobs/Piwik/workspace/latest.zip" />
- <replacefilter
- token="api_service_url = http://api.piwik.org"
- value="api_service_url = http://${env.HTTP_HOST}/jenkins.private/jobs/Piwik/workspace" />
- </replace>
- <length file="${env.WORKSPACE}/build/config/global.ini.php" property="configLEN" />
- <checksum file="${env.WORKSPACE}/build/config/global.ini.php" property="configMD5" />
- <replaceregexp
- file="${env.WORKSPACE}/build/config/manifest.inc.php"
- match='"(config/global.ini.php)".*'
- replace='"\1" => array("${configLEN}", "${configMD5}"),'
- byline="true" />
-
+ <piwikPreInstall version="1.0" />
</steps>
</webtest>
</target>
diff --git a/tests/webtest/testcases/level1/1.3-update.xml b/tests/webtest/testcases/level1/1.3-update.xml
index af92f3a1cc..37ee23453f 100644
--- a/tests/webtest/testcases/level1/1.3-update.xml
+++ b/tests/webtest/testcases/level1/1.3-update.xml
@@ -18,106 +18,7 @@
&loadMacros;
- <!-- logging in -->
-
- <invoke description="get index" url="/" />
- <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Sign in" />
- <verifyText description="check page text" text="Piwik" />
- <verifyText description="check page text" text="Lost your password?" />
-
- &checkForErrors;
- &verifyLinksAndImages;
-
- <setInputField description="set Piwik login" htmlId="form_login" value="piwik_login" />
- <setInputField description="set Piwik password" htmlId="form_password" value="piwik_password" />
-
- <clickButton description="click 'Sign in' button" label="Sign in" />
-
- <!-- logged in -->
-
- <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Web Analytics Reports" />
- <verifyText description="check page text" text="Piwik" />
- <verifyText description="check page text" text="Dashboard" />
- <verifyText description="check page text" text="Hello" />
-
- <!-- update notice -->
-
- <verifyText description="check page text" text="New Update:" />
- <mouseOver description="expand header message" htmlId="header_message" />
- <verifyText description="check page text" text="Please update now!" />
-
- <enableJavaScript enable="false" />
- <clickLink description="click 'Please update now'" href="action=newVersionAvailable" />
-
- <!-- one click update -->
-
- <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Update" />
- <verifyText description="check page text" text="Piwik" />
- <verifyText description="check page text" text="Update Automatically" />
- <verifyText description="check page text" text="Download" />
-
- <clickButton description="click 'Update Automatically' Button" label="Update Automatically" />
- <!-- invoke description="one click update" url="/index.php?module=CoreUpdater&amp;action=oneClickUpdate" /-->
-
- <!-- download, unzip -->
-
- <not description="check for errors">
- <verifyXPath description="looking for error image" xpath="//img[@src='themes/default/images/error_medium.png']" />
- </not>
-
- <not description="check if zip archive passed">
- <verifyText description="check page text" text="Incompatible archive" />
- </not>
-
- <verifyText description="check page text" text="Piwik updated successfully!" />
- <clickButton description="click 'Continue to Piwik' button" label="Continue to Piwik" />
-
- <!-- db update? -->
-
- <ifStep description="check if db update required">
- <condition>
- <verifyText description="check page text" text="Database Upgrade Required" />
- </condition>
- <then>
- <clickButton description="click 'Upgrade Piwik' button" label="Upgrade Piwik" />
-
- <!-- db update done -->
-
- <not description="check for errors">
- <verifyXPath description="looking for error image" xpath="//img[@src='themes/default/images/error_medium.png']" />
- </not>
-
- <verifyText description="check page text" text="Piwik has been successfully updated!" />
- <clickButton description="click 'Continue to Piwik' button" label="Continue to Piwik" />
- </then>
- </ifStep>
-
- <!-- logged out? -->
- <ifStep description="check if re-login required">
- <condition>
- <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Sign in" />
- </condition>
- <then>
- <setInputField description="set Piwik login" htmlId="form_login" value="piwik_login" />
- <setInputField description="set Piwik password" htmlId="form_password" value="piwik_password" />
-
- <!-- sign in -->
-
- <clickButton description="click 'Sign in' button" label="Sign in" />
- </then>
- </ifStep>
-
- <!-- logged in -->
-
- <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Web Analytics Reports" />
- <verifyText description="check page text" text="Piwik" />
- <verifyText description="check page text" text="Dashboard" />
- <verifyText description="check page text" text="Hello" />
-
- <not description="up to date">
- <verifyText description="check page text" text="New Update:" />
- </not>
-
+ <piwikAutoUpdate />
</steps>
</webtest>
</target>
diff --git a/tests/webtest/testcases/level1/1.4-preinstall.xml b/tests/webtest/testcases/level1/1.4-preinstall.xml
new file mode 100644
index 0000000000..0e1e2b48f2
--- /dev/null
+++ b/tests/webtest/testcases/level1/1.4-preinstall.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE project [
+ <!ENTITY time SYSTEM "../modules/time.xml">
+ <!ENTITY checkForErrors SYSTEM "../modules/errors.xml">
+ <!ENTITY verifyLinksAndImages SYSTEM "../modules/common_pages.xml">
+ <!ENTITY loadMacros SYSTEM "../modules/macros.xml">
+ <!ENTITY raquo "&#187;">
+ <!ENTITY rsaquo "&#8250;" >
+]>
+
+<project name="Level 1 - pre-install 1.1.1" basedir="." default="webtest">
+ &time;
+ <target name="webtest">
+ <webtest name="pre-install">
+ <config>
+ <option name="ThrowExceptionOnScriptError" value="false" />
+ </config>
+ <steps>
+ <echo>Pre-install 1.1.1</echo>
+
+ &loadMacros;
+
+ <piwikPreInstall version="1.1.1" />
+ </steps>
+ </webtest>
+ </target>
+</project>
diff --git a/tests/webtest/testcases/level1/1.5-install.xml b/tests/webtest/testcases/level1/1.5-install.xml
new file mode 100644
index 0000000000..91f87b5a5a
--- /dev/null
+++ b/tests/webtest/testcases/level1/1.5-install.xml
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE project [
+ <!ENTITY time SYSTEM "../modules/time.xml">
+ <!ENTITY checkForErrors SYSTEM "../modules/errors.xml">
+ <!ENTITY verifyLinksAndImages SYSTEM "../modules/common_pages.xml">
+ <!ENTITY loadMacros SYSTEM "../modules/macros.xml">
+ <!ENTITY raquo "&#187;">
+ <!ENTITY rsaquo "&#8250;" >
+]>
+
+<project name="Level 1 - install" basedir="." default="webtest">
+ &time;
+ <target name="webtest">
+ <webtest name="install index">
+ <steps>
+ <echo>Installation</echo>
+
+ &loadMacros;
+
+ <echo>Piwik install - dbsetup: db.name: ${db.name}</echo>
+ <sql
+ driver="com.mysql.jdbc.Driver"
+ url="jdbc:mysql://${db.host}:${db.port}/"
+ userid="${db.username}"
+ password="${db.password}"
+ >
+ <classpath>
+ <pathelement location="${basedir}/../lib/java/mysql-connector-java-5.1.7.jar" />
+ </classpath>
+ <transaction>
+ DROP DATABASE IF EXISTS ${db.name};
+ </transaction>
+ <transaction>
+ CREATE DATABASE IF NOT EXISTS ${db.name};
+ </transaction>
+ </sql>
+
+ <invoke description="get index" url="/" />
+
+ <!-- 1. welcome -->
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Welcome!" />
+ <verifyText description="check page text" text="This process is split up into 9 easy steps and will take around 5 minutes" />
+
+<!--
+ &checkForErrors;
+-->
+ &verifyLinksAndImages;
+
+ <retryClickLink description="wait for piwik.php tracking test" label="Next &raquo;" maxcount="10" seconds="1" />
+
+ <!-- 2. systemCheck -->
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="System Check" />
+ <verifyText description="check page text" text="Optional" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <not description="check if system check passed">
+ <verifyXPath description="looking for error image" xpath="//img[@src='themes/default/images/error.png']" />
+ </not>
+
+ <verifyXPath description="looking for ok image" xpath="//img[@src='themes/default/images/ok.png']" />
+
+ <clickLink description="click 'Next'" label="Next &raquo;" />
+
+ <!-- 3. databaseSetup -->
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Database Setup" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <setInputField description="set database host (and port)" name="host" value="${db.host}:${db.port}" />
+ <setInputField description="set database username" name="username" value="${db.username}" />
+ <setInputField description="set database password" name="password" value="${db.password}" />
+ <setInputField description="set database name" name="dbname" value="${db.name}" />
+ <setInputField description="set database port" name="tables_prefix" value="canoo_" />
+
+ <clickButton description="click 'Go!' button" label="Go!" />
+
+ <!-- 4. databaseCheck -->
+<!--
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Database Check" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <clickLink description="click 'Next'" label="Next &raquo;" />
+-->
+
+ <!-- 5. tablesCreation -->
+
+ <not description="check if no error">
+ <verifyXPath description="looking for error image" xpath="//img[@src='themes/default/images/error_medium.png']" />
+ </not>
+
+ <not description="check if no warning">
+ <verifyXPath description="looking for warning image" xpath="//img[@src='themes/default/images/warning_medium.png']" />
+ </not>
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Tables created with success!" />
+ <verifyXPath description="looking for success image" xpath="//img[@src='themes/default/images/success_medium.png']" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <clickLink description="click 'Next'" label="Next &raquo;" />
+
+ <!-- 6. generalSetup -->
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="General Setup" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <setInputField description="set Piwik login" name="login" value="piwik_login" />
+ <setInputField description="set Piwik password" name="password" value="piwik_password" />
+ <setInputField description="set repeated Piwik password" name="password_bis" value="piwik_password" />
+ <setInputField description="set Piwik email" name="email" value="nobody@piwik.org" />
+
+ <clickButton description="click 'Go!' button" label="Go!" />
+
+ <!-- 7. firstWebsiteSetup -->
+
+ <not description="check if no error">
+ <verifyXPath description="looking for error image" xpath="//img[@src='themes/default/images/error_medium.png']" />
+ </not>
+
+ <not description="check if no warning">
+ <verifyXPath description="looking for warning image" xpath="//img[@src='themes/default/images/warning_medium.png']" />
+ </not>
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Setup a Website" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <setInputField description="set Piwik site name" name="siteName" value="Dummy Site Name" />
+ <setInputField description="set Piwik URL" name="url" value="${wt.config.protocol}://${wt.config.host}:${wt.config.port}${wt.config.basepath}" />
+ <setSelectField description="set Piwik timezone" name="timezone" value="UTC" />
+
+ <clickButton description="click 'Go!' button" label="Go!" />
+
+ <!-- 8. displayJavascriptCode -->
+
+ <not description="check if no error">
+ <verifyXPath description="looking for error image" xpath="//img[@src='themes/default/images/error_medium.png']" />
+ </not>
+
+ <not description="check if no warning">
+ <verifyXPath description="looking for warning image" xpath="//img[@src='themes/default/images/warning_medium.png']" />
+ </not>
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="JavaScript Tracking tag" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <clickLink description="click 'Next'" label="Next &raquo;" />
+
+ <!-- 9. finished -->
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Congratulations" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <clickLink description="click 'Continue to Piwik'" label="Continue to Piwik &raquo;" />
+
+ <!-- logging in -->
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Sign in" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Lost your password?" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <setInputField description="set Piwik login" htmlId="form_login" value="piwik_login" />
+ <setInputField description="set Piwik password" htmlId="form_password" value="piwik_password" />
+
+ <clickButton description="click 'Sign in' button" label="Sign in" />
+
+ <!-- logged in -->
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Web Analytics Reports" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Dashboard" />
+ <verifyText description="check page text" text="Hello" />
+
+ <!-- change language -->
+ <retryClickLink description="click 'Deutsch'" href="index.php?module=LanguagesManager&amp;action=saveLanguage&amp;language=de" seconds="5" />
+
+ <verifyText description="check page text" text="Hallo" />
+
+ <retryClickLink description="click 'Français'" href="index.php?module=LanguagesManager&amp;action=saveLanguage&amp;language=fr" seconds="5" />
+
+ <verifyText description="check page text" text="Bonjour" />
+
+ <retryClickLink description="click 'English'" href="index.php?module=LanguagesManager&amp;action=saveLanguage&amp;language=en" seconds="5" />
+
+ <verifyText description="check page text" text="Hello" />
+ </steps>
+ </webtest>
+ </target>
+</project>
diff --git a/tests/webtest/testcases/level1/1.6-update.xml b/tests/webtest/testcases/level1/1.6-update.xml
new file mode 100644
index 0000000000..37ee23453f
--- /dev/null
+++ b/tests/webtest/testcases/level1/1.6-update.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE project [
+ <!ENTITY time SYSTEM "../modules/time.xml">
+ <!ENTITY checkForErrors SYSTEM "../modules/errors.xml">
+ <!ENTITY verifyLinksAndImages SYSTEM "../modules/common_pages.xml">
+ <!ENTITY loadMacros SYSTEM "../modules/macros.xml">
+ <!ENTITY raquo "&#187;">
+ <!ENTITY rsaquo "&#8250;" >
+]>
+
+<project name="Level 1 - auto update" basedir="." default="webtest">
+ &time;
+ <target name="webtest">
+ <webtest name="auto update">
+ <steps>
+ <echo>Auto-Update</echo>
+
+ &loadMacros;
+
+ <piwikAutoUpdate />
+ </steps>
+ </webtest>
+ </target>
+</project>
diff --git a/tests/webtest/testcases/level1/1.7-preinstall.xml b/tests/webtest/testcases/level1/1.7-preinstall.xml
new file mode 100644
index 0000000000..b0fc0e60fd
--- /dev/null
+++ b/tests/webtest/testcases/level1/1.7-preinstall.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE project [
+ <!ENTITY time SYSTEM "../modules/time.xml">
+ <!ENTITY checkForErrors SYSTEM "../modules/errors.xml">
+ <!ENTITY verifyLinksAndImages SYSTEM "../modules/common_pages.xml">
+ <!ENTITY loadMacros SYSTEM "../modules/macros.xml">
+ <!ENTITY raquo "&#187;">
+ <!ENTITY rsaquo "&#8250;" >
+]>
+
+<project name="Level 1 - pre-install latest version" basedir="." default="webtest">
+ &time;
+ <target name="webtest">
+ <webtest name="pre-install">
+ <config>
+ <option name="ThrowExceptionOnScriptError" value="false" />
+ </config>
+ <steps>
+ <echo>Pre-install latest version</echo>
+
+ &loadMacros;
+
+ <piwikGetVersion propertyName="latestVersion" />
+ <piwikPreInstall version="${latestVersion}" />
+ </steps>
+ </webtest>
+ </target>
+</project>
diff --git a/tests/webtest/testcases/level1/1.8-install.xml b/tests/webtest/testcases/level1/1.8-install.xml
new file mode 100644
index 0000000000..6ac215f878
--- /dev/null
+++ b/tests/webtest/testcases/level1/1.8-install.xml
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE project [
+ <!ENTITY time SYSTEM "../modules/time.xml">
+ <!ENTITY checkForErrors SYSTEM "../modules/errors.xml">
+ <!ENTITY verifyLinksAndImages SYSTEM "../modules/common_pages.xml">
+ <!ENTITY loadMacros SYSTEM "../modules/macros.xml">
+ <!ENTITY raquo "&#187;">
+ <!ENTITY rsaquo "&#8250;" >
+]>
+
+<project name="Level 1 - install" basedir="." default="webtest">
+ &time;
+ <target name="webtest">
+ <webtest name="install index">
+ <steps>
+ <echo>Installation</echo>
+
+ &loadMacros;
+
+ <echo>Piwik install - dbsetup: db.name: ${db.name}</echo>
+ <sql
+ driver="com.mysql.jdbc.Driver"
+ url="jdbc:mysql://${db.host}:${db.port}/"
+ userid="${db.username}"
+ password="${db.password}"
+ >
+ <classpath>
+ <pathelement location="${basedir}/../lib/java/mysql-connector-java-5.1.7.jar" />
+ </classpath>
+ <transaction>
+ DROP DATABASE IF EXISTS ${db.name};
+ </transaction>
+ <transaction>
+ CREATE DATABASE IF NOT EXISTS ${db.name};
+ </transaction>
+ </sql>
+
+ <invoke description="get index" url="/" />
+
+ <!-- 1. welcome -->
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Welcome!" />
+ <verifyText description="check page text" text="This process is split up into 9 easy steps and will take around 5 minutes" />
+
+<!--
+ &checkForErrors;
+-->
+ &verifyLinksAndImages;
+
+ <retryClickLink description="wait for piwik.php tracking test" label="Next &raquo;" maxcount="10" seconds="1" />
+
+ <!-- 2. systemCheck -->
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="System Check" />
+ <verifyText description="check page text" text="Optional" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <not description="check if system check passed">
+ <verifyXPath description="looking for error image" xpath="//img[@src='themes/default/images/error.png']" />
+ </not>
+
+ <verifyXPath description="looking for ok image" xpath="//img[@src='themes/default/images/ok.png']" />
+
+ <clickLink description="click 'Next'" label="Next &raquo;" />
+
+ <!-- 3. databaseSetup -->
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Database Setup" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <setInputField description="set database host (and port)" name="host" value="${db.host}:${db.port}" />
+ <setInputField description="set database username" name="username" value="${db.username}" />
+ <setInputField description="set database password" name="password" value="${db.password}" />
+ <setInputField description="set database name" name="dbname" value="${db.name}" />
+ <setInputField description="set database port" name="tables_prefix" value="canoo_" />
+
+ <clickButton description="click 'Next »' button" label="Next »" />
+
+ <!-- 4. databaseCheck -->
+<!--
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Database Check" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <clickLink description="click 'Next'" label="Next &raquo;" />
+-->
+
+ <!-- 5. tablesCreation -->
+
+ <not description="check if no error">
+ <verifyXPath description="looking for error image" xpath="//img[@src='themes/default/images/error_medium.png']" />
+ </not>
+
+ <not description="check if no warning">
+ <verifyXPath description="looking for warning image" xpath="//img[@src='themes/default/images/warning_medium.png']" />
+ </not>
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Tables created with success!" />
+ <verifyXPath description="looking for success image" xpath="//img[@src='themes/default/images/success_medium.png']" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <clickLink description="click 'Next'" label="Next &raquo;" />
+
+ <!-- 6. generalSetup -->
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Super User" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <setInputField description="set Piwik login" name="login" value="piwik_login" />
+ <setInputField description="set Piwik password" name="password" value="piwik_password" />
+ <setInputField description="set repeated Piwik password" name="password_bis" value="piwik_password" />
+ <setInputField description="set Piwik email" name="email" value="nobody@piwik.org" />
+
+ <clickButton description="click 'Next »' button" label="Next »" />
+
+ <!-- 7. firstWebsiteSetup -->
+
+ <not description="check if no error">
+ <verifyXPath description="looking for error image" xpath="//img[@src='themes/default/images/error_medium.png']" />
+ </not>
+
+ <not description="check if no warning">
+ <verifyXPath description="looking for warning image" xpath="//img[@src='themes/default/images/warning_medium.png']" />
+ </not>
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Setup a Website" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <setInputField description="set Piwik site name" name="siteName" value="Dummy Site Name" />
+ <setInputField description="set Piwik URL" name="url" value="${wt.config.protocol}://${wt.config.host}:${wt.config.port}${wt.config.basepath}" />
+ <setSelectField description="set Piwik timezone" name="timezone" value="UTC" />
+
+ <clickButton description="click 'Next »' button" label="Next »" />
+
+ <!-- 8. displayJavascriptCode -->
+
+ <not description="check if no error">
+ <verifyXPath description="looking for error image" xpath="//img[@src='themes/default/images/error_medium.png']" />
+ </not>
+
+ <not description="check if no warning">
+ <verifyXPath description="looking for warning image" xpath="//img[@src='themes/default/images/warning_medium.png']" />
+ </not>
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="JavaScript Tracking code" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <clickLink description="click 'Next'" label="Next &raquo;" />
+
+ <!-- 9. finished -->
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Installation" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Congratulations" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <clickLink description="click 'Continue to Piwik'" label="Continue to Piwik &raquo;" />
+
+ <!-- logging in -->
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Sign in" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Lost your password?" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <setInputField description="set Piwik login" htmlId="form_login" value="piwik_login" />
+ <setInputField description="set Piwik password" htmlId="form_password" value="piwik_password" />
+
+ <clickButton description="click 'Sign in' button" label="Sign in" />
+
+ <!-- logged in -->
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Web Analytics Reports" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Dashboard" />
+ <verifyText description="check page text" text="Hello" />
+
+ <!-- change language -->
+ <retryClickLink description="click 'Deutsch'" href="index.php?module=LanguagesManager&amp;action=saveLanguage&amp;language=de" seconds="5" />
+
+ <verifyText description="check page text" text="Hallo" />
+
+ <retryClickLink description="click 'Français'" href="index.php?module=LanguagesManager&amp;action=saveLanguage&amp;language=fr" seconds="5" />
+
+ <verifyText description="check page text" text="Bonjour" />
+
+ <retryClickLink description="click 'English'" href="index.php?module=LanguagesManager&amp;action=saveLanguage&amp;language=en" seconds="5" />
+
+ <verifyText description="check page text" text="Hello" />
+ </steps>
+ </webtest>
+ </target>
+</project>
diff --git a/tests/webtest/testcases/level1/1.9-update.xml b/tests/webtest/testcases/level1/1.9-update.xml
new file mode 100644
index 0000000000..5c879ed393
--- /dev/null
+++ b/tests/webtest/testcases/level1/1.9-update.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE project [
+ <!ENTITY time SYSTEM "../modules/time.xml">
+ <!ENTITY checkForErrors SYSTEM "../modules/errors.xml">
+ <!ENTITY verifyLinksAndImages SYSTEM "../modules/common_pages.xml">
+ <!ENTITY loadMacros SYSTEM "../modules/macros.xml">
+ <!ENTITY raquo "&#187;">
+ <!ENTITY rsaquo "&#8250;" >
+]>
+
+<project name="Level 1 - auto update" basedir="." default="webtest">
+ &time;
+ <target name="webtest">
+ <webtest name="auto update">
+ <steps>
+ <echo>Auto-Update</echo>
+
+ &loadMacros;
+
+ <piwikGetVersion propertyName="latestVersion" />
+
+ <get src="http://dev.piwik.org/svn/trunk/core/Version.php" dest="trunkVersion.php" />
+ <loadfile srcFile="trunkVersion.php" property="trunkVersion">
+ <filterchain>
+ <tokenfilter>
+ <containsstring contains="const VERSION" />
+ <replaceregex pattern="const VERSION = '" replace="" />
+ <replaceregex pattern="';" replace="" />
+ <trim />
+ </tokenfilter>
+ <striplinebreaks />
+ </filterchain>
+ </loadfile>
+
+ <echo>${trunkVersion}</echo>
+ <echo>${latestVersion}</echo>
+
+ <ifStep description="compare version numbers">
+ <condition>
+ <not>
+ <verifyProperty name="trunkVersion" value="${latestVersion}" propertyType="ant" />
+ </not>
+ </condition>
+ <then>
+ <piwikAutoUpdate />
+ </then>
+ </ifStep>
+ </steps>
+ </webtest>
+ </target>
+</project>
diff --git a/tests/webtest/testcases/modules/macros.xml b/tests/webtest/testcases/modules/macros.xml
index 40f8e7c07f..4bf0f45630 100644
--- a/tests/webtest/testcases/modules/macros.xml
+++ b/tests/webtest/testcases/modules/macros.xml
@@ -11,3 +11,168 @@
</retry>
</sequential>
</macrodef>
+
+<macrodef name="piwikGetVersion" description="get Piwik version">
+ <attribute name="propertyName" default="latestVersion" />
+ <sequential>
+ <get src="http://api.piwik.org/1.0/getLatestVersion/" dest="latestVersion.txt" />
+ <loadfile srcFile="latestVersion.txt" property="@{propertyName}">
+ <filterchain>
+ <striplinebreaks />
+ </filterchain>
+ </loadfile>
+ </sequential>
+</macrodef>
+
+<macrodef name="piwikPreInstall" description="pre-install Piwik">
+ <attribute name="version" default="1.0" />
+ <sequential>
+ <!-- download Piwik and unzip -->
+
+ <property environment="env" />
+
+ <get src="http://builds.piwik.org/piwik-@{version}.zip" dest="piwik-@{version}.zip" />
+
+ <unzip src="piwik-@{version}.zip" dest="${env.WORKSPACE}" />
+
+ <delete includeemptydirs="true">
+ <fileset dir="${basedir}/../.." includes="config/**" />
+ <fileset dir="${basedir}/../.." includes="core/**" />
+ <fileset dir="${basedir}/../.." includes="js/**" />
+ <fileset dir="${basedir}/../.." includes="lang/**" />
+ <fileset dir="${basedir}/../.." includes="libs/**" />
+ <fileset dir="${basedir}/../.." includes="misc/**" />
+ <fileset dir="${basedir}/../.." includes="plugins/**" />
+ <fileset dir="${basedir}/../.." includes="themes/**" />
+ <fileset dir="${basedir}/../.." includes="tmp/**" />
+ <fileset dir="${basedir}/../..">
+ <include name="*" />
+ <exclude name="tests" />
+ </fileset>
+ </delete>
+
+ <move todir="${env.WORKSPACE}/build/">
+ <fileset dir="${env.WORKSPACE}/piwik/" />
+ </move>
+
+ <replace file="${env.WORKSPACE}/build/config/global.ini.php">
+ <replacefilter
+ token="latest_version_url = http://piwik.org/latest.zip"
+ value="latest_version_url = http://${env.HTTP_HOST}/jenkins.private/jobs/Piwik/workspace/latest.zip" />
+ <replacefilter
+ token="api_service_url = http://api.piwik.org"
+ value="api_service_url = http://${env.HTTP_HOST}/jenkins.private/jobs/Piwik/workspace" />
+ </replace>
+ <length file="${env.WORKSPACE}/build/config/global.ini.php" property="configLEN" />
+ <checksum file="${env.WORKSPACE}/build/config/global.ini.php" property="configMD5" />
+ <replaceregexp
+ file="${env.WORKSPACE}/build/config/manifest.inc.php"
+ match='"(config/global.ini.php)".*'
+ replace='"\1" => array("${configLEN}", "${configMD5}"),'
+ byline="true" />
+ </sequential>
+</macrodef>
+
+<macrodef name="piwikAutoUpdate" description="auto-update Piwik">
+ <sequential>
+ <!-- logging in -->
+
+ <invoke description="get index" url="/" />
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Sign in" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Lost your password?" />
+
+ &checkForErrors;
+ &verifyLinksAndImages;
+
+ <setInputField description="set Piwik login" htmlId="form_login" value="piwik_login" />
+ <setInputField description="set Piwik password" htmlId="form_password" value="piwik_password" />
+
+ <clickButton description="click 'Sign in' button" label="Sign in" />
+
+ <!-- logged in -->
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Web Analytics Reports" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Dashboard" />
+ <verifyText description="check page text" text="Hello" />
+
+ <!-- update notice -->
+
+ <verifyText description="check page text" text="New Update:" />
+ <mouseOver description="expand header message" htmlId="header_message" />
+ <verifyText description="check page text" text="Please update now!" />
+
+ <enableJavaScript enable="false" />
+ <clickLink description="click 'Please update now'" href="action=newVersionAvailable" />
+
+ <!-- one click update -->
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Update" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Update Automatically" />
+ <verifyText description="check page text" text="Download" />
+
+ <clickButton description="click 'Update Automatically' Button" label="Update Automatically" />
+ <!-- invoke description="one click update" url="/index.php?module=CoreUpdater&amp;action=oneClickUpdate" /-->
+
+ <!-- download, unzip -->
+
+ <not description="check for errors">
+ <verifyXPath description="looking for error image" xpath="//img[@src='themes/default/images/error_medium.png']" />
+ </not>
+
+ <not description="check if zip archive passed">
+ <verifyText description="check page text" text="Incompatible archive" />
+ </not>
+
+ <verifyText description="check page text" text="Piwik updated successfully!" />
+ <clickButton description="click 'Continue to Piwik' button" label="Continue to Piwik" />
+
+ <!-- db update? -->
+
+ <ifStep description="check if db update required">
+ <condition>
+ <verifyText description="check page text" text="Database Upgrade Required" />
+ </condition>
+ <then>
+ <clickButton description="click 'Upgrade Piwik' button" label="Upgrade Piwik" />
+
+ <!-- db update done -->
+
+ <not description="check for errors">
+ <verifyXPath description="looking for error image" xpath="//img[@src='themes/default/images/error_medium.png']" />
+ </not>
+
+ <verifyText description="check page text" text="Piwik has been successfully updated!" />
+ <clickButton description="click 'Continue to Piwik' button" label="Continue to Piwik" />
+ </then>
+ </ifStep>
+
+ <!-- logged out? -->
+ <ifStep description="check if re-login required">
+ <condition>
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Sign in" />
+ </condition>
+ <then>
+ <setInputField description="set Piwik login" htmlId="form_login" value="piwik_login" />
+ <setInputField description="set Piwik password" htmlId="form_password" value="piwik_password" />
+
+ <!-- sign in -->
+
+ <clickButton description="click 'Sign in' button" label="Sign in" />
+ </then>
+ </ifStep>
+
+ <!-- logged in -->
+
+ <verifyTitle description="check the title is parsed correctly" text="Piwik &rsaquo; Web Analytics Reports" />
+ <verifyText description="check page text" text="Piwik" />
+ <verifyText description="check page text" text="Dashboard" />
+ <verifyText description="check page text" text="Hello" />
+
+ <not description="up to date">
+ <verifyText description="check page text" text="New Update:" />
+ </not>
+ </sequential>
+</macrodef>