aboutsummaryrefslogtreecommitdiffstats
path: root/test/widgetsSpec.js
AgeCommit message (Collapse)Author
2011-11-14style(docs): make jslint happy - fix some warningsVojta Jina
2011-11-14refactor($service): removed almost all references to scope.$serviceMisko Hevery
- still need to remove from factory
2011-11-14refactor(services): migrate angular.service -> moduleMisko Hevery
2011-11-14refactor(injector): switch to injector 2.0 introduce modulesMisko Hevery
2011-11-14new(injector): new injector v2.0Misko Hevery
- not connected to keep the CL small
2011-11-14refactor(compiler) turn compiler into a serviceMisko Hevery
BREAK - remove angular.compile() since the compile method is now a service and needs to be injected
2011-11-14refactor(injector): turn scope into a serviceMisko Hevery
- turn scope into a $rootScope service. - injector is now a starting point for creating angular application. - added inject() method which wraps jasmine its/beforeEach/afterEach, and which allows configuration and injection of services. - refactor tests to use inject() where possible BREAK: - removed angular.scope() method
2011-10-31style(widgets): fix typo in a spec commentIgor Minar
2011-10-26fix(ng:repeat) with array ignore properties not representing array elementsIgor Minar
Along the way I also changed the repeater impl to use for loop instead of for in loop. Iteration over objects is handled by creating an array of keys, which is sorted and this array then determines the order of iteration over an element. This makes repeating over objects deterministic and cross-browser compatible.
2011-10-26fix(ng:view): ignore stale xhr callbacksIgor Minar
A lot of badness happens when we don't ignore stale xhrs. These raceconditions are only apparent when user clicks through the app very quckly without waiting for routes to fully load. Closes #619
2011-10-26test(ng:view): spec cleanupIgor Minar
- remove optional controller definition from specs - remove extranious digest calls
2011-10-18fix(ng:repeat): repeater should ignore $ and $$ propertiesIgor Minar
2011-10-11chore(formating): clean code to be function() {Misko Hevery
2011-10-11feat(forms): new and improved formsMisko Hevery
2011-10-11feat(ng:repeat) collection items and DOM elements affinity / stabilityMisko Hevery
2011-09-16fix(specs): jQuery now returns attr name instead of true/false for special attrsIgor Minar
for special attrs like 'checked' or 'multiple', jquery now returns the name or undedefined. e.g. foo.attr('checked') => 'checked' || undefined The solution is a combination of updating our tests as well as switching over to prop() instead which properly returns true/false
2011-09-08fix($route): update $route to reflect $location changesVojta Jina
* update $route to reflect new $location * add some more unit tests to $route * fix some other failing unit tests * redirect overrides the url now Breaks $route custom redirect fn has only 3 params now
2011-09-08feat($browser): jQuery style url method, onUrlChange eventVojta Jina
This is just basic implementation of $browser.url, $browser.onUrlChange methods: $browser.url() - returns current location.href $browser.url('/new') - set url to /new If supported, history.pushState is used, location.href property otherwise. $browser.url('/new', true) - replace current url with /new If supported, history.replaceState is used, location.replace otherwise. $browser.onUrlChange is only fired when url is changed from the browser: - user types into address bar - user clicks on back/forward button - user clicks on link It's not fired when url is changed using $browser.url() Breaks Removed $browser.setUrl(), $browser.getUrl(), use $browser.url() Breaks Removed $browser.onHashChange(), use $browser.onUrlChange()
2011-09-07fix(ng:options): ng:change should be called after the new val is setIgor Minar
Closes #547
2011-08-30feat(widget): add ng:pluralize as an Angular widgetDi Peng
2011-08-15style(*): remove extra semicolonsIgor Minar
2011-08-12refactor(scope): remove $flush/$observe ng:eval/ng:eval-orderMisko Hevery
2011-08-06refactor(widgets): remove input[button, submit, reset, image] and button ↵Di Peng
windgets These widgets are useless and only trigger extra $updateViews. The only reason we had them was to support ng:change on these widgets, but since there are no bindings present in these cases it doesn't make sense to support ng:change here. It's likely just a leftover from getangular.com Breaking change: ng:change for input[button], input[submit], input[reset], input[image] and button widgets is not supported any more
2011-08-02feat(scope): new and improved scope implementationMisko Hevery
- Speed improvements (about 4x on flush phase) - Memory improvements (uses no function closures) - Break $eval into $apply, $dispatch, $flush - Introduced $watch and $observe Breaks angular.equals() use === instead of == Breaks angular.scope() does not take parent as first argument Breaks scope.$watch() takes scope as first argument Breaks scope.$set(), scope.$get are removed Breaks scope.$config is removed Breaks $route.onChange callback has not "this" bounded
2011-07-26style(ng:options): fix style and some docsIgor Minar
2011-07-26fix(ng:options): add support for option groupsMisko Hevery
Closes# 450
2011-07-26fix(directive): ng:options to support ng:changeMisko Hevery
Closes #463
2011-07-26fix(directive): ng:options to support iterating over objectsMisko Hevery
Closes #448
2011-07-26fix(directive): ng:options incorrectly re-grew options on datasource changeMisko Hevery
Closes #464
2011-07-26fix(directive): ng:options now support binding to expressionMisko Hevery
Closes #449
2011-07-18feat(strict mode): adding strict mode flag to all js filesIgor Minar
the flag must be in all src and test files so that we get the benefit of running in the strict mode even in jstd the following script was used to modify all files: for file in `find src test -name "*.js"`; do echo -e "'use strict';\n" > temp.txt cat $file >> temp.txt mv temp.txt $file done
2011-07-12test(ng:repeat): add tests for $position for small arrays/objectsIgor Minar
2011-06-23fix:ng:repeater - fix $position when collection size changesMisko Hevery
2011-06-08remove ng:format=indexMisko Hevery
2011-06-08Added ng:options directiveMisko Hevery
Closes #301
2011-06-08Cleanup parser code to expose smaller APIMisko Hevery
2011-04-25Fix some typos, missing semi-colons, etc...Vojta Jina
This is a combination of 4 commits: * Fix some small typos, missing semi-colons, etc. * Fix comment for angular.scenario.SpecRunner.run method * Fixed some missing semi-colons in cookbook * Fixed missing semi-colon in nodeserver/server.js
2011-04-11add test for ng:view sync cache regressionIgor Minar
test for 9bd2c396
2011-04-09fix build for IE9Igor Minar
all unit tests now pass under IE9
2011-03-30make xhr.cache optionally synchronousIgor Minar
- add `sync` flag xhr.cache - change ng:include to use the sync flag - change ng:view to use the sync flag The end result is that there are fewer repaints in the browser, which means less "blinking" that user sees.
2011-03-28fixing lint warningsIgor Minar
2011-03-26remove _null and _undefinedIgor Minar
they have no significant effect on minified and gziped size. in fact they make things worse. file | before | after removal ---------------------------------------- concat | 325415 | 325297 min | 62070 | 62161 min + gzip | 25187 | 25176 The bottom line is that we are getting 0.05% decrease in size after gzip without all of the hassle of using underscores everywhere.
2011-03-01linking function should return bound scopeIgor Minar
angular.compile()() returns {scope:scope, view:view}, this isn't useful at all and only makes tests more verbose. Instead, this change makes the linking function return scope directly and if anyone needs the linked dom there are two ways to do it documented in angular.compile. other changes: - moved angular.compile docs to the compiler so that they are closer to the compiler - fixed some typos and updated angular.compile docs with the new return value
2011-02-25Corrected an issue where properties inherited from __proto__ show up in ↵Misko Hevery
ng:repeat. Closses #112
2011-02-16Change API angular.compile(element)([scope], [element/true])Misko Hevery
2011-02-16remove $init on scope from applying compilation templateMisko Hevery
Closes #40
2011-02-15split up services into individual filesIgor Minar
- split up services into files under src/service - split up specs into files under test/service - rewrite all specs so that they don't depend on one global forEach - get rid of obsolete code and tests in ng:switch - rename mock $log spec from "$log" to "$log mock"
2011-02-04ng:view should be nestable in ng:includeIgor Minar
2011-02-04smarter normalization of value on option, and htmlParser fixesMisko Hevery
2011-01-26split mocks and create $log and $exceptionHandler mocksIgor Minar
- split mocks between angular-mocks.js and mocks.js - src/angular-mocks.js now contains only mocks that we want to ship - test/mocks.js contains mocks that we use internally for testing angular - created angular.mock namespace - created public $exceptionHandler mock rethrows errors - created public $log mock stores all logs messages in an array that can be accessed to make assertions - internally we now have factory to create $exceptionHandler that we can assert on - internally we also keep track of all messages logged and fail tests if messages were not expected and cleaned up (checked via global beforeEach and afterEach) - updated RakeFile and docs reader.js to point to the new angular-mocks.js location - made real $exceptionHandler and $log factories accessible from tests and simplified their specs - fixed typos in several spec descriptions - added log assertions throughout the test suite