diff options
-rw-r--r-- | js/Makefile | 1 | ||||
-rw-r--r-- | js/app/controllers/itemcontroller.coffee | 7 | ||||
-rw-r--r-- | js/app/directives/itemshortcuts.coffee | 82 | ||||
-rw-r--r-- | js/app/directives/scrollmarksread.coffee | 64 | ||||
-rw-r--r-- | js/app/services/businesslayer/feedbusinesslayer.coffee | 4 | ||||
-rw-r--r-- | js/app/services/businesslayer/folderbusinesslayer.coffee | 4 | ||||
-rw-r--r-- | js/app/services/existserror.coffee | 6 | ||||
-rw-r--r-- | js/config/testacular_conf.js | 2 | ||||
-rw-r--r-- | js/package.json | 14 | ||||
-rw-r--r-- | js/public/app.js | 191 | ||||
-rw-r--r-- | js/test-results.xml | 185 | ||||
-rw-r--r-- | js/tests/controllers/itemcontrollerSpec.coffee | 6 | ||||
-rw-r--r-- | js/tests/services/businesslayer/feedbusinesslayerSpec.coffee | 6 | ||||
-rw-r--r-- | js/tests/services/businesslayer/folderbusinesslayerSpec.coffee | 6 | ||||
-rw-r--r-- | templates/main.php | 4 |
15 files changed, 541 insertions, 41 deletions
diff --git a/js/Makefile b/js/Makefile index cb4c0339e..4b3bc39ae 100644 --- a/js/Makefile +++ b/js/Makefile @@ -27,7 +27,6 @@ all: compile deps: cd $(CURDIR)/ npm install --deps - cd .. watch: compile $(coffee) --compile --watch --output $(CURDIR)/build/app $(CURDIR)/app/ & \ diff --git a/js/app/controllers/itemcontroller.coffee b/js/app/controllers/itemcontroller.coffee index bdc35c855..a08486d08 100644 --- a/js/app/controllers/itemcontroller.coffee +++ b/js/app/controllers/itemcontroller.coffee @@ -34,6 +34,7 @@ Language) -> @_$scope.itemBusinessLayer = @_itemBusinessLayer @_$scope.feedBusinessLayer = @_feedBusinessLayer + @_$scope.isLoading = => return @_feedLoading.isLoading() @@ -44,6 +45,7 @@ Language) -> else return '' + # TODO: unittest @_$scope.getRelativeDate = (date) => if date return @_language.getMomentFromTimestamp(date).fromNow() @@ -51,6 +53,11 @@ Language) -> return '' + @_$scope.$on 'readItem', (scope, data) => + console.log data + + + return new ItemController($scope, ItemBusinessLayer, FeedModel, FeedLoading, FeedBusinessLayer, Language) diff --git a/js/app/directives/itemshortcuts.coffee b/js/app/directives/itemshortcuts.coffee new file mode 100644 index 000000000..c249984eb --- /dev/null +++ b/js/app/directives/itemshortcuts.coffee @@ -0,0 +1,82 @@ +### + +ownCloud - News + +@author Bernhard Posselt +@copyright 2012 Bernhard Posselt nukeawhale@gmail.com + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE +License as published by the Free Software Foundation; either +version 3 of the License, or any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU AFFERO GENERAL PUBLIC LICENSE for more details. + +You should have received a copy of the GNU Affero General Public +License along with this library. If not, see <http://www.gnu.org/licenses/>. + +### + +angular.module('News').directive 'itemShortcuts', ['$window', ($window) -> + + return (scope, elm, attr) -> + + jumpTo = ($scrollArea, $item) -> + position = $item.offset().top - $scrollArea.offset().top + + $scrollArea.scrollTop() + $scrollArea.scrollTop(position) + + jumpToPreviousItem = (scrollArea) -> + $scrollArea = $(scrollArea) + $items = $scrollArea.find('.feed_item') + notJumped = true + for item in $items + $item = $(item) + if $item.position().top >= 0 + $previous = $item.prev() + # if there are no items before the current one + if $previous.length > 0 + jumpTo($scrollArea, $previous) + + notJumped = false + break + + # in case we didnt jump + if $items.length > 0 and notJumped + jumpTo($scrollArea, $items.last()) + + + jumpToNextItem = (scrollArea) -> + $scrollArea = $(scrollArea) + $items = $scrollArea.find('.feed_item') + for item in $items + $item = $(item) + if $item.position().top > 1 + jumpTo($scrollArea, $item) + break + + + $($window.document).keydown (e) -> + # only activate if no input elements is focused + focused = $(':focus') + + if not (focused.is('input') or + focused.is('select') or + focused.is('textarea') or + focused.is('checkbox') or + focused.is('button')) + + scrollArea = elm + # j or right + if e.keyCode == 74 or e.keyCode == 39 + jumpToNextItem(scrollArea) + + # k or left + else if e.keyCode == 75 or e.keyCode == 37 + jumpToPreviousItem(scrollArea) + + +]
\ No newline at end of file diff --git a/js/app/directives/scrollmarksread.coffee b/js/app/directives/scrollmarksread.coffee new file mode 100644 index 000000000..6a0a5e085 --- /dev/null +++ b/js/app/directives/scrollmarksread.coffee @@ -0,0 +1,64 @@ +### + +ownCloud - News + +@author Bernhard Posselt +@copyright 2012 Bernhard Posselt nukeawhale@gmail.com + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE +License as published by the Free Software Foundation; either +version 3 of the License, or any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU AFFERO GENERAL PUBLIC LICENSE for more details. + +You should have received a copy of the GNU Affero General Public +License along with this library. If not, see <http://www.gnu.org/licenses/>. + +### + +scrolling = true +markingRead = true + +angular.module('News').directive 'scrollMarksRead', ['$rootScope', 'Config', +($rootScope, Config) -> + + return (scope, elm, attr) -> + + elm.bind 'scroll', -> + # prevent from doing to many scroll actions + # the first timeout prevents accidental and too early marking as read + if scrolling + scrolling = false + setTimeout -> + scrolling = true + , Config.ScrollTimeout + + if markingRead + markingRead = false + setTimeout -> + markingRead = true + # only broadcast elements that are not already read + # and that are beyond the top border + $elems = elm.find('.feed_item:not(.read)') + + for feedItem in $elems + offset = $(feedItem).position().top + if offset <= -50 + data = + id: parseInt($(feedItem).data('id'), 10) + feed: parseInt($(feedItem).data('feed'), 10) + + $rootScope.$broadcast 'readItem', data + else + break + + , Config.MarkReadTimeout + + scope.$apply attr.scrollMarksRead + +] + diff --git a/js/app/services/businesslayer/feedbusinesslayer.coffee b/js/app/services/businesslayer/feedbusinesslayer.coffee index 2540cfc5f..d83e38268 100644 --- a/js/app/services/businesslayer/feedbusinesslayer.coffee +++ b/js/app/services/businesslayer/feedbusinesslayer.coffee @@ -131,13 +131,13 @@ FeedModel, NewLoading, _ExistsError, Utils) -> parentId = parseInt(parentId, 10) if angular.isUndefined(url) or url.trim() == '' - throw new Error() + throw new Error('Url must not be empty') url = url.trim() urlHash = hex_md5(url) if @_feedModel.getByUrlHash(urlHash) - throw new _ExistsError() + throw new _ExistsError('Exists already') feed = title: url.replace( diff --git a/js/app/services/businesslayer/folderbusinesslayer.coffee b/js/app/services/businesslayer/folderbusinesslayer.coffee index 969783222..d19796d85 100644 --- a/js/app/services/businesslayer/folderbusinesslayer.coffee +++ b/js/app/services/businesslayer/folderbusinesslayer.coffee @@ -97,12 +97,12 @@ ActiveFeed, ItemModel, ShowAll, _ExistsError, OPMLParser) -> onFailure or= -> if angular.isUndefined(folderName) or folderName.trim() == '' - throw new Error() + throw new Error('Folder name must not be empty') folderName = folderName.trim() if @_folderModel.getByName(folderName) - throw new _ExistsError() + throw new _ExistsError('Exists already') folder = name: folderName diff --git a/js/app/services/existserror.coffee b/js/app/services/existserror.coffee index cb9fab54e..3c282908f 100644 --- a/js/app/services/existserror.coffee +++ b/js/app/services/existserror.coffee @@ -23,10 +23,10 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. angular.module('News').factory '_ExistsError', -> - class ExistsError extends Error + class ExistsError + + constructor: (@message) -> - constructor: (message='') -> - super(message) return ExistsError
\ No newline at end of file diff --git a/js/config/testacular_conf.js b/js/config/testacular_conf.js index 17c654805..8082c7434 100644 --- a/js/config/testacular_conf.js +++ b/js/config/testacular_conf.js @@ -88,7 +88,7 @@ autoWatch = true; // - Safari (only Mac) // - PhantomJS // - IE (only Windows) -browsers = ['Chrome']; +browsers = ['Firefox']; // If browser does not capture in given timeout [ms], kill it diff --git a/js/package.json b/js/package.json index 9a1cf930a..7ec04f33f 100644 --- a/js/package.json +++ b/js/package.json @@ -16,16 +16,16 @@ "contributors": [], "dependencies": {}, "devDependencies": { - "grunt": "~0.4.0", + "grunt": "~0.4", "grunt-cli": "~0.1.6", "coffee-script": "~1.6", - "grunt-contrib-concat": "~0.1.2", - "grunt-contrib-watch": "~0.2.0", + "grunt-contrib-concat": "~0.1", + "grunt-contrib-watch": "~0.2", "grunt-coffeelint": "0.0.6", - "gruntacular": "~0.1.1", - "grunt-wrap": "~0.2.0", - "phantomjs": "~1.8.1-3", - "grunt-phpunit": "0.2.0" + "gruntacular": "~0.3", + "grunt-wrap": "~0.2", + "phantomjs": "~1.9", + "grunt-phpunit": "0.2" }, "engine": "node >= 0.8" } diff --git a/js/public/app.js b/js/public/app.js index ee9ddf02e..2aa6c14ee 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -217,6 +217,172 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. (function() { + angular.module('News').directive('itemShortcuts', [ + '$window', function($window) { + return function(scope, elm, attr) { + var jumpTo, jumpToNextItem, jumpToPreviousItem; + + jumpTo = function($scrollArea, $item) { + var position; + + position = $item.offset().top - $scrollArea.offset().top + $scrollArea.scrollTop(); + return $scrollArea.scrollTop(position); + }; + jumpToPreviousItem = function(scrollArea) { + var $item, $items, $previous, $scrollArea, item, notJumped, _i, _len; + + $scrollArea = $(scrollArea); + $items = $scrollArea.find('.feed_item'); + notJumped = true; + for (_i = 0, _len = $items.length; _i < _len; _i++) { + item = $items[_i]; + $item = $(item); + if ($item.position().top >= 0) { + $previous = $item.prev(); + if ($previous.length > 0) { + jumpTo($scrollArea, $previous); + } + notJumped = false; + break; + } + } + if ($items.length > 0 && notJumped) { + return jumpTo($scrollArea, $items.last()); + } + }; + jumpToNextItem = function(scrollArea) { + var $item, $items, $scrollArea, item, _i, _len, _results; + + $scrollArea = $(scrollArea); + $items = $scrollArea.find('.feed_item'); + _results = []; + for (_i = 0, _len = $items.length; _i < _len; _i++) { + item = $items[_i]; + $item = $(item); + if ($item.position().top > 1) { + jumpTo($scrollArea, $item); + break; + } else { + _results.push(void 0); + } + } + return _results; + }; + return $($window.document).keydown(function(e) { + var focused, scrollArea; + + focused = $(':focus'); + if (!(focused.is('input') || focused.is('select') || focused.is('textarea') || focused.is('checkbox') || focused.is('button'))) { + scrollArea = elm; + if (e.keyCode === 74 || e.keyCode === 39) { + return jumpToNextItem(scrollArea); + } else if (e.keyCode === 75 || e.keyCode === 37) { + return jumpToPreviousItem(scrollArea); + } + } + }); + }; + } + ]); + +}).call(this); + +// Generated by CoffeeScript 1.6.2 +/* + +ownCloud - News + +@author Bernhard Posselt +@copyright 2012 Bernhard Posselt nukeawhale@gmail.com + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE +License as published by the Free Software Foundation; either +version 3 of the License, or any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU AFFERO GENERAL PUBLIC LICENSE for more details. + +You should have received a copy of the GNU Affero General Public +License along with this library. If not, see <http://www.gnu.org/licenses/>. +*/ + + +(function() { + var markingRead, scrolling; + + scrolling = true; + + markingRead = true; + + angular.module('News').directive('scrollMarksRead', [ + '$rootScope', 'Config', function($rootScope, Config) { + return function(scope, elm, attr) { + return elm.bind('scroll', function() { + if (scrolling) { + scrolling = false; + setTimeout(function() { + return scrolling = true; + }, Config.ScrollTimeout); + if (markingRead) { + markingRead = false; + setTimeout(function() { + var $elems, data, feedItem, offset, _i, _len, _results; + + markingRead = true; + $elems = elm.find('.feed_item:not(.read)'); + _results = []; + for (_i = 0, _len = $elems.length; _i < _len; _i++) { + feedItem = $elems[_i]; + offset = $(feedItem).position().top; + if (offset <= -50) { + data = { + id: parseInt($(feedItem).data('id'), 10), + feed: parseInt($(feedItem).data('feed'), 10) + }; + _results.push($rootScope.$broadcast('readItem', data)); + } else { + break; + } + } + return _results; + }, Config.MarkReadTimeout); + } + return scope.$apply(attr.scrollMarksRead); + } + }); + }; + } + ]); + +}).call(this); + +// Generated by CoffeeScript 1.6.2 +/* + +ownCloud - News + +@author Bernhard Posselt +@copyright 2012 Bernhard Posselt nukeawhale@gmail.com + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE +License as published by the Free Software Foundation; either +version 3 of the License, or any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU AFFERO GENERAL PUBLIC LICENSE for more details. + +You should have received a copy of the GNU Affero General Public +License along with this library. If not, see <http://www.gnu.org/licenses/>. +*/ + + +(function() { angular.module('News').controller('FeedController', [ '$scope', '_ExistsError', 'Persistence', 'FolderBusinessLayer', 'FeedBusinessLayer', 'SubscriptionsBusinessLayer', 'StarredBusinessLayer', 'unreadCountFormatter', function($scope, _ExistsError, Persistence, FolderBusinessLayer, FeedBusinessLayer, SubscriptionsBusinessLayer, StarredBusinessLayer, unreadCountFormatter) { var FeedController; @@ -378,6 +544,9 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. return ''; } }; + this._$scope.$on('readItem', function(scope, data) { + return console.log(data); + }); } return ItemController; @@ -728,12 +897,12 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. onFailure || (onFailure = function() {}); parentId = parseInt(parentId, 10); if (angular.isUndefined(url) || url.trim() === '') { - throw new Error(); + throw new Error('Url must not be empty'); } url = url.trim(); urlHash = hex_md5(url); if (this._feedModel.getByUrlHash(urlHash)) { - throw new _ExistsError(); + throw new _ExistsError('Exists already'); } feed = { title: url.replace(/^(?:https?:\/\/)?(?:www\.)?([a-z0-9_\-\.]+)(?:\/.*)?$/gi, '$1'), @@ -921,11 +1090,11 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. onSuccess || (onSuccess = function() {}); onFailure || (onFailure = function() {}); if (angular.isUndefined(folderName) || folderName.trim() === '') { - throw new Error(); + throw new Error('Folder name must not be empty'); } folderName = folderName.trim(); if (this._folderModel.getByName(folderName)) { - throw new _ExistsError(); + throw new _ExistsError('Exists already'); } folder = { name: folderName, @@ -1313,25 +1482,17 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. (function() { - var __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - angular.module('News').factory('_ExistsError', function() { var ExistsError; - ExistsError = (function(_super) { - __extends(ExistsError, _super); - + ExistsError = (function() { function ExistsError(message) { - if (message == null) { - message = ''; - } - ExistsError.__super__.constructor.call(this, message); + this.message = message; } return ExistsError; - })(Error); + })(); return ExistsError; }); diff --git a/js/test-results.xml b/js/test-results.xml new file mode 100644 index 000000000..2700f7867 --- /dev/null +++ b/js/test-results.xml @@ -0,0 +1,185 @@ +<?xml version="1.0"?> +<testsuites> + <testsuite name="PhantomJS 1.9 (Linux)" package="undefined" timestamp="2013-04-15T16:10:51" id="0" hostname="archtop" tests="174" errors="0" failures="0" time="0.43"> + <properties> + <property name="browser.fullName" value="Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.0 Safari/534.34"/> + </properties> + <testcase name="isAddingFolder should return false in the beginning" time="0.022" classname="PhantomJS 1.9 (Linux).FeedController"/> + <testcase name="isAddingFeed should return false in the beginning" time="0.003" classname="PhantomJS 1.9 (Linux).FeedController"/> + <testcase name="should make unreadCountFormatter available" time="0.007" classname="PhantomJS 1.9 (Linux).FeedController"/> + <testcase name="should make FeedBusinessLayer available" time="0.002" classname="PhantomJS 1.9 (Linux).FeedController"/> + <testcase name="should make FolderBusinessLayer available" time="0.002" classname="PhantomJS 1.9 (Linux).FeedController"/> + <testcase name="should make SubscriptionsBusinessLayer available" time="0.002" classname="PhantomJS 1.9 (Linux).FeedController"/> + <testcase name="should make StarredBusinessLayer available" time="0.002" classname="PhantomJS 1.9 (Linux).FeedController"/> + <testcase name="should not add folders that have no name" time="0.003" classname="PhantomJS 1.9 (Linux).FeedController"/> + <testcase name="should make ItemBusinessLayer availabe" time="0.003" classname="PhantomJS 1.9 (Linux).ItemController"/> + <testcase name="should make FeedBusinessLayer availabe" time="0.002" classname="PhantomJS 1.9 (Linux).ItemController"/> + <testcase name="should make FeedBl available" time="0.002" classname="PhantomJS 1.9 (Linux).SettingsController"/> + <testcase name="should show an error if the xml import failed" time="0.002" classname="PhantomJS 1.9 (Linux).SettingsController"/> + <testcase name="should set showall to true if importing" time="0.002" classname="PhantomJS 1.9 (Linux).SettingsController"/> + <testcase name="should be Subscriptions by default" time="0.001" classname="PhantomJS 1.9 (Linux).ActiveFeed"/> + <testcase name="should set the correct feed id" time="0.001" classname="PhantomJS 1.9 (Linux).ActiveFeed"/> + <testcase name="should set the correct feed type" time="0.001" classname="PhantomJS 1.9 (Linux).ActiveFeed"/> + <testcase name="should reset the item cache when a different feed is being loaded" time="0.003" classname="PhantomJS 1.9 (Linux).BusinessLayer"/> + <testcase name="should send a get latest items query when feed did not change" time="0.002" classname="PhantomJS 1.9 (Linux).BusinessLayer"/> + <testcase name="should send a get all items query when feed changed" time="0.001" classname="PhantomJS 1.9 (Linux).BusinessLayer"/> + <testcase name="should be active when its selected" time="0.002" classname="PhantomJS 1.9 (Linux).BusinessLayer"/> + <testcase name="should delete feeds" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should return the number of unread feeds" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should return all feeds of a folder" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should get the correct unread count for folders" time="0.009" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should mark feed as read" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should mark all as read" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should get the correct unread count for subscribtions" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should return the correct number of feeds" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should be visible if its active" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should be visible if show all is true" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should be visible if unreadcount bigger than 0" time="0.001" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should not move the feed to a new folder" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should not move the feed to the same folder" time="0.001" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should set the show all setting" time="0.003" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should set the hide read setting" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should return all feeds" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should return if ShowAll is set" time="0.001" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should return all feeds of a folder" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should return the correct feed link" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should not create a feed if it already exists" time="0.004" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should not create feeds that are empty" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should create a feed before theres a response from the server" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should set a title and an url hash to the newly crated feed" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should transform urls correctly" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should make a create feed request" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should call the onSuccess function on response status ok" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should call the handle a response error when creating a folder" time="0.003" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should mark a feed error as read by removing it" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should update all feeds" time="0.009" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should not update feeds without ids" time="0.002" classname="PhantomJS 1.9 (Linux).FeedBusinessLayer"/> + <testcase name="should delete folders" time="0.003" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should return true when folder has feeds" time="0.002" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should toggle folder" time="0.002" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should mark folder as read" time="0.002" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should get the correct unread count" time="0.001" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should be visible if show all is true" time="0.002" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should be visible if its active" time="0.001" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should be visible if one of its subfeeds is active" time="0.001" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should be visible if showAll is false and it has unread items" time="0.002" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should return all folders" time="0.002" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should not create a folder if it already exists" time="0.003" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should not create folders that are empty" time="0.002" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should create a folder before theres a response from the server" time="0.001" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should make a create folder request" time="0.001" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should call the onSuccess function on response status ok" time="0.002" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should call the handle a response error when creating a folder" time="0.002" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should mark a folder error as read by removing it" time="0.002" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should return the corret folder for id" time="0.002" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should open a folder" time="0.002" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should not import on empty opml" time="0.006" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should import a folder" time="0.004" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should import a feed" time="0.012" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should import nested folders" time="0.004" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should use an existing folder when importing a folder" time="0.003" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should not import a feed if it already exists" time="0.003" classname="PhantomJS 1.9 (Linux).FolderBusinessLayer"/> + <testcase name="should return all items" time="0.003" classname="PhantomJS 1.9 (Linux).ItemBusinessLayer"/> + <testcase name="should tell if no feed is active" time="0.002" classname="PhantomJS 1.9 (Linux).ItemBusinessLayer"/> + <testcase name="should return the correct feed title" time="0.002" classname="PhantomJS 1.9 (Linux).ItemBusinessLayer"/> + <testcase name="should set an item unstarred" time="0.002" classname="PhantomJS 1.9 (Linux).ItemBusinessLayer"/> + <testcase name="should set an item starred" time="0.002" classname="PhantomJS 1.9 (Linux).ItemBusinessLayer"/> + <testcase name="should set an item read" time="0.002" classname="PhantomJS 1.9 (Linux).ItemBusinessLayer"/> + <testcase name="should no set an item read if its already read" time="0.002" classname="PhantomJS 1.9 (Linux).ItemBusinessLayer"/> + <testcase name="should return false when item kept unread does not exist" time="0.002" classname="PhantomJS 1.9 (Linux).ItemBusinessLayer"/> + <testcase name="should return false if an item is not kept unread" time="0.002" classname="PhantomJS 1.9 (Linux).ItemBusinessLayer"/> + <testcase name="should toggle an item as kept unread" time="0.002" classname="PhantomJS 1.9 (Linux).ItemBusinessLayer"/> + <testcase name="should set an item as unread" time="0.002" classname="PhantomJS 1.9 (Linux).ItemBusinessLayer"/> + <testcase name="should not set an item as unread if its unread" time="0.002" classname="PhantomJS 1.9 (Linux).ItemBusinessLayer"/> + <testcase name="should set item as unread if kept unread is toggled and it is read" time="0.002" classname="PhantomJS 1.9 (Linux).ItemBusinessLayer"/> + <testcase name="should lower the unread count of a feed when its items get read" time="0.002" classname="PhantomJS 1.9 (Linux).ItemBusinessLayer"/> + <testcase name="should increase the unread count of a feed when its items get unread" time="0.002" classname="PhantomJS 1.9 (Linux).ItemBusinessLayer"/> + <testcase name="should not be visible if starredCount is 0" time="0.002" classname="PhantomJS 1.9 (Linux).StarredBusinessLayer"/> + <testcase name="should always be visible if its the active feed" time="0.004" classname="Phan |