aboutsummaryrefslogtreecommitdiffstats
path: root/test/scenario/DSLSpec.js
AgeCommit message (Collapse)Author
2010-10-19Significantly clean up the way the scenario DSL works and implement many ↵Elliott Sprehn
more DSL statements. - "this" always means the current chain scope inside a DSL - addFutureAction callbacks now take ($window, $document, done) - $document has a special method elements() that uses the currently selected nodes in the document as defined by using() statements. - $document.elements() allows placeholder insertion into selectors to make them more readable. ex. $document.elements('input[name="$1"]', myVar) will substitute the value of myVar for $1 in the selector. Subsequent arguments are $2 and so on. - $document.elements() results have a special method trigger(event) which should be used to events. This method implements some hacks to make sure browser UI controls update and the correct angular events fire. - futures now allow custom formatting. By default any chain that results in a future can use toJson() or fromJson() to convert the future value to and from json. A custom parser can be provided with parsedWith(fn) where fn is a callback(value) that must return the parsed result. Note: The entire widgets.html UI is now able to be controlled and asserted through DSL statements!!! Victory! :)
2010-10-15fixed lint warnings and one flaky testMisko Hevery
2010-10-14New Angular Scenario runner and DSL system with redesigned HTML UI.Elliott Sprehn
Uses the Jasmine syntax for tests, ex: describe('widgets', function() { it('should verify that basic widgets work', function(){ navigateTo('widgets.html'); input('text.basic').enter('Carlos'); expect(binding('text.basic')).toEqual('Carlos'); input('text.basic').enter('Carlos Santana'); expect(binding('text.basic')).not().toEqual('Carlos Boozer'); input('text.password').enter('secret'); expect(binding('text.password')).toEqual('secret'); expect(binding('text.hidden')).toEqual('hiddenValue'); expect(binding('gender')).toEqual('male'); input('gender').select('female'); expect(binding('gender')).toEqual('female'); }); }); Note: To create new UI's implement the interface shown in angular.scenario.ui.Html.
2010-09-14Fixed all trivial jslint violationsMisko Hevery
2010-08-14Provide all jquery functions as futuresShyam Seshadri
2010-08-14Fix broken tests for element dslShyam Seshadri
2010-08-13Revert click dsl, since what is returned by element is a jquery objectShyam Seshadri
2010-08-13Pull in Rajat's changes to add click and url checking dslShyam Seshadri
2010-08-12modify element dsl to understand angular bindings and return jquery object ↵Shyam Seshadri
for further checking
2010-08-12Change repeater dsl to collect and return an array of string contents based ↵Shyam Seshadri
on match
2010-08-10Fix test breakage in Chrome. Chrome JQuery doesn't like malformed table html ↵Shyam Seshadri
apparently
2010-08-10Inject jquery into future scope, and rename outer scenario to _window, which ↵Shyam Seshadri
is what it is
2010-08-09Add element DSL, to find an element. Has knowledge of finding ng:bind ↵Shyam Seshadri
elements and grabbing their contents.
2010-08-06added repeater.collect to E2E DSLAndres Ornelas
2010-08-04test passing with repeater.countAndres Ornelas
2010-07-27refactoring done but Expect not workingAndres Ornelas
2010-07-27stable before refactoringAndres Ornelas
2010-06-30all tests passing with new futures conceptAndres Ornelas
2010-06-09change repeater count expectation wordingAndres Ornelas
2010-06-09add repeater DSL and fix typoAndres Ornelas
2010-05-25appended lastDocument to the document.bodyAndres Ornelas
2010-05-24added dsl tests and select methodAndres Ornelas