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@googlemail.com>2014-03-30 10:37:34 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-03-30 10:37:34 +0400
commit25f7c2c20a5b65784fb3c957d09ca5db8bbea017 (patch)
tree768f97958456b17260a33cd3d03cea587a44b2c8 /tests/angularjs
parent12769e570e190a4a541845046cb1c90930ebf08f (diff)
refs #4691 use chai instead of expect.js, run tests by default only in PhantomJS, added missing node modules
Diffstat (limited to 'tests/angularjs')
-rw-r--r--tests/angularjs/README.md10
-rw-r--r--tests/angularjs/bootstrap.js6
-rwxr-xr-xtests/angularjs/karma.conf.js4
-rw-r--r--tests/angularjs/package.json8
4 files changed, 21 insertions, 7 deletions
diff --git a/tests/angularjs/README.md b/tests/angularjs/README.md
index 7ab5bcd9dc..025f3a25b9 100644
--- a/tests/angularjs/README.md
+++ b/tests/angularjs/README.md
@@ -3,11 +3,17 @@
npm install .
## Used libs
-MochaJS + expect.js (might use chai instead of expect.js)
+MochaJS + Chai
## Execution
Run tests (it runs tests automatically again once there is a file change)
`karma start karma.conf.js`
-It runs the tests in PhantomJS and Chrome at the moment, we might change it soon. \ No newline at end of file
+It runs the tests in PhantomJS at the moment. If you want to run it in different browsers
+just change the `browsers: ['Chrome', 'Firefox', 'PhantomJS']` property in `karma.conf.js`
+
+## Help
+
+More about Chai: http://chaijs.com/guide/styles/
+More about Mocha: http://visionmedia.github.io/mocha/ \ No newline at end of file
diff --git a/tests/angularjs/bootstrap.js b/tests/angularjs/bootstrap.js
index 4142fb19ca..d47009c4e0 100644
--- a/tests/angularjs/bootstrap.js
+++ b/tests/angularjs/bootstrap.js
@@ -24,4 +24,8 @@ piwik.trackingHostnameHttp = 'developer.piwik.org';
piwik.trackingHostnameHttps = '';
var translations = {"CorePluginsAdmin_NoZipFileSelected":"Please select a ZIP file.","General_InvalidDateRange":"Invalid Date Range, Please Try Again","General_Loading":"Loading...","General_Show":"show","General_Hide":"hide","General_YearShort":"yr","General_MultiSitesSummary":"All Websites","CoreHome_YouAreUsingTheLatestVersion":"You are using the latest version of Piwik!","CoreHome_IncludeRowsWithLowPopulation":"Rows with low population are hidden %s Show all rows","CoreHome_ExcludeRowsWithLowPopulation":"All rows are shown %s Exclude low population","CoreHome_DataTableIncludeAggregateRows":"Aggregate rows are hidden %s Show them","CoreHome_DataTableExcludeAggregateRows":"Aggregate rows are shown %s Hide them","CoreHome_Default":"default","CoreHome_PageOf":"%1$s of %2$s","CoreHome_FlattenDataTable":"The report is hierarchical %s Make it flat","CoreHome_UnFlattenDataTable":"The report is flat %s Make it hierarchical","CoreHome_ExternalHelp":"Help (opens in new tab)","SitesManager_NotFound":"No websites found for","Annotations_ViewAndAddAnnotations":"View and add annotations for %s...","General_RowEvolutionRowActionTooltipTitle":"Open Row Evolution","General_RowEvolutionRowActionTooltip":"See how the metrics for this row changed over time","Annotations_IconDesc":"View notes for this date range.","Annotations_IconDescHideNotes":"Hide notes for this date range.","Annotations_HideAnnotationsFor":"Hide annotations for %s...","General_LoadingPopover":"Loading %s...","General_LoadingPopoverFor":"Loading %s for","General_ShortMonth_1":"Jan","General_ShortMonth_2":"Feb","General_ShortMonth_3":"Mar","General_ShortMonth_4":"Apr","General_ShortMonth_5":"May","General_ShortMonth_6":"Jun","General_ShortMonth_7":"Jul","General_ShortMonth_8":"Aug","General_ShortMonth_9":"Sep","General_ShortMonth_10":"Oct","General_ShortMonth_11":"Nov","General_ShortMonth_12":"Dec","General_LongMonth_1":"January","General_LongMonth_2":"February","General_LongMonth_3":"March","General_LongMonth_4":"April","General_LongMonth_5":"May","General_LongMonth_6":"June","General_LongMonth_7":"July","General_LongMonth_8":"August","General_LongMonth_9":"September","General_LongMonth_10":"October","General_LongMonth_11":"November","General_LongMonth_12":"December","General_ShortDay_1":"Mon","General_ShortDay_2":"Tue","General_ShortDay_3":"Wed","General_ShortDay_4":"Thu","General_ShortDay_5":"Fri","General_ShortDay_6":"Sat","General_ShortDay_7":"Sun","General_LongDay_1":"Monday","General_LongDay_2":"Tuesday","General_LongDay_3":"Wednesday","General_LongDay_4":"Thursday","General_LongDay_5":"Friday","General_LongDay_6":"Saturday","General_LongDay_7":"Sunday","General_DayMo":"Mo","General_DayTu":"Tu","General_DayWe":"We","General_DayTh":"Th","General_DayFr":"Fr","General_DaySa":"Sa","General_DaySu":"Su","General_Search":"Search","General_MoreDetails":"More Details","General_Help":"Help","General_MetricsToPlot":"Metrics to plot","General_MetricToPlot":"Metric to plot","General_RecordsToPlot":"Records to plot","General_SaveImageOnYourComputer":"To save the image on your computer, right click on the image and select \"Save Image As...\"","General_ExportAsImage":"Export as Image","General_NoDataForGraph":"No data for this graph.","Widgetize_OpenInNewWindow":"Open in a new window","Dashboard_LoadingWidget":"Loading widget, please wait...","General_TransitionsRowActionTooltipTitle":"Open Transitions","General_TransitionsRowActionTooltip":"See what visitors did before and after viewing this page","Dashboard_AddPreviewedWidget":"Click to add widget to the dashboard","Dashboard_WidgetPreview":"Widget preview","Dashboard_Maximise":"Maximise","Dashboard_Minimise":"Minimise","Dashboard_WidgetNotFound":"Widget not found","Dashboard_DashboardCopied":"Current dashboard successfully copied to selected user.","General_Close":"Close","General_Refresh":"Refresh","General_Website":"Website","General_ColumnNbVisits":"Visits","General_ColumnPageviews":"Pageviews","General_ColumnRevenue":"Revenue","General_TotalVisitsPageviewsRevenue":"(Total: %s visits, %s pageviews, %s revenue)","General_EvolutionSummaryGeneric":"%1$s in %2$s compared to %3$s in %4$s. Evolution: %5$s","General_AllWebsitesDashboard":"All Websites dashboard","General_NVisits":"%s visits","MultiSites_Evolution":"Evolution","SitesManager_AddSite":"Add a new website","General_Next":"Next","General_Previous":"Previous","General_GoTo":"Go to %s","Dashboard_DashboardOf":"Dashboard of %s","Actions_SubmenuSitesearch":"Site Search","MultiSites_LoadingWebsites":"Loading websites","General_ErrorRequest":"Oops\u2026 problem during the request, please try again.","Goals_AddGoal":"Add Goal","Goals_UpdateGoal":"Update Goal","Goals_DeleteGoalConfirm":"Are you sure you want to delete the Goal %s?","UserCountry_FatalErrorDuringDownload":"A fatal error occurred while downloading this file. There might be something wrong with your internet connection, with the GeoIP database you downloaded or Piwik. Try downloading and installing it manually.","UserCountry_SetupAutomaticUpdatesOfGeoIP":"Setup automatic updates of GeoIP databases","General_Done":"Done","Feedback_ThankYou":"Thank you for helping us to make Piwik better!","Feedback_RateFeatureTitle":"Do you like the '%s' feature? Please rate and leave a comment","Feedback_RateFeatureThankYouTitle":"Thank you for rating '%s'!","Feedback_RateFeatureLeaveMessageLike":"We are glad you like it! Please let us know what you like the most or if you have a feature request.","Feedback_RateFeatureLeaveMessageDislike":"We are sorry to hear you don't like it! Please let us know how we can improve.","Feedback_SendFeedback":"Send Feedback","Feedback_RateFeatureSendFeedbackInformation":"Your Piwik platform will send us (the Piwik team) an email (including your email address) so we can get in contact with you if you have any question.","General_Ok":"Ok","General_OrCancel":"or %s Cancel %s","General_Save":"Save","UsersManager_DeleteConfirm":"Are you sure you want to delete the user %s?","UsersManager_ConfirmGrantSuperUserAccess":"Do you really want to grant '%s' Super User access? Warning: the user will have access to all websites and will be able to perform administrative tasks.","UsersManager_ConfirmProhibitOtherUsersSuperUserAccess":"Do you really want to remove Super User access from '%s'? The user will lose all permissions and access to all websites. Make sure to set permissions to needed websites afterwards if necessary.","UsersManager_ConfirmProhibitMySuperUserAccess":"%s, do you really want to remove your own Super User access? You will lose all permissions and access to all websites and will be logged out from Piwik.","SitesManager_OnlyOneSiteAtTime":"You can only edit one website at a time. Please Save or Cancel your current modifications to the website %s.","SitesManager_DeleteConfirm":"Are you sure you want to delete the website %s?","ScheduledReports_ReportSent":"Report sent","ScheduledReports_ReportUpdated":"Report updated","General_OverlayRowActionTooltipTitle":"Open Page Overlay","General_OverlayRowActionTooltip":"See analytics data directly on your website (opens new tab)","CustomAlerts_InvalidMetricValue":"Value must be numeric","Live_VisitorProfile":"Visitor profile","Live_NoMoreVisits":"There are no more visits for this visitor.","Live_ShowMap":"show map","Live_HideMap":"hide map","Live_PageRefreshed":"Number of times this page was viewed \/ refreshed in a row."};
-if(typeof(piwik_translations) == 'undefined') { var piwik_translations = new Object; }for(var i in translations) { piwik_translations[i] = translations[i];} \ No newline at end of file
+if(typeof(piwik_translations) == 'undefined') { var piwik_translations = new Object; }for(var i in translations) { piwik_translations[i] = translations[i];}
+
+
+var expect = chai.expect
+ , should = chai.should(); \ No newline at end of file
diff --git a/tests/angularjs/karma.conf.js b/tests/angularjs/karma.conf.js
index 812ba61de7..228379cc62 100755
--- a/tests/angularjs/karma.conf.js
+++ b/tests/angularjs/karma.conf.js
@@ -15,8 +15,8 @@ module.exports = function(config) {
// list of files / patterns to load in the browser
files: [
+ 'tests/angularjs/node_modules/chai/chai.js',
'tests/angularjs/bootstrap.js',
- 'node_modules/expect.js/index.js',
'libs/angularjs/angular.min.js',
'libs/angularjs/angular-mocks.js',
'libs/jquery/jquery.js',
@@ -67,7 +67,7 @@ module.exports = function(config) {
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
- browsers: ['Chrome', 'PhantomJS'],
+ browsers: ['PhantomJS'],
// Continuous Integration mode
diff --git a/tests/angularjs/package.json b/tests/angularjs/package.json
index 5c66e4f0af..c9672d5e9d 100644
--- a/tests/angularjs/package.json
+++ b/tests/angularjs/package.json
@@ -2,12 +2,16 @@
"author": "(c) piwik.org",
"name": "PiwikJsTestRunner",
"description": "Piwik AngularJS test runner",
+ "license": "GPLv3+",
+ "homepage": "http://piwik.org",
"dependencies": {
- "expect.js": ">= 0.3.1",
"karma": ">= 0.12.1",
"karma-mocha": ">= 0.1.3",
"chai": ">= 1.9.1",
- "phantomjs": ">= 1.9.7-1"
+ "phantomjs": ">= 1.9.7-1",
+ "karma-phantomjs-launcher": ">= 0.1.2",
+ "karma-chrome-launcher": ">= 0.1.2",
+ "karma-firefox-launcher": ">= 0.1.3"
},
"engines": {
"node": ">= 0.10.0"