Commit graph

27 commits

Author SHA1 Message Date
Elliott Sprehn
40d7e66f40 Lots of bug fixes in the scenario runner and a bunch of new features.
- By default the runner now creates multiple output formats as it runs. Nodes are created in the DOM with ids: json, xml, and html.

ex. $('#json').html() => json output of the runner
ex. $('#xml').html() => json output of the runner

$result is also an object tree result.

The permitted formats are html,json,xml,object.

If you don't want certain formats you can select specific ones with the new ng:scenario-output attribute on the script tag.

<script src="angular-scenario.js" ng:scenario-output="xml,json">

- Added element(...).count() that returns the number of matching elements for the selector.

- repeater(...).count() now returns 0 if no elements matched which can be used to check if a repeater is empty.

- Added toBe() matcher that does strict equality with ===

- Implement iit and ddescribe. If iit() is used instead of it() then only that test will run. If ddescribe() is used instead of describe() them only it() statements inside of it will run. Several iit/ddescribe() blocks can be used to run isolated tests.

- Implement new event based model for SpecRunner. You can now listen for events in the runner. This is useful for writing your own UI or connecting a remote process (ex. WebDriver). Event callbacks execute on the Runner instance.

Events, if fired, will always be in the below order. All events always happen
except for Failure and Error events which only happen in error conditions.

Events:
  RunnerBegin
  SpecBegin(spec)
  StepBegin(spec, step)
  StepError(spec, step, error)
  StepFailure(spec, step, error)
  StepEnd(spec, step)
  SpecError(spec, step, error)
  SpecEnd(spec)
  RunnerEnd

- Only allow the browser to repaint every 10 steps. Cuts 700ms off Firefox in benchmark, 200ms off Chrome.

- Bug Fix: Manually navigate anchors on click since trigger wont work in Firefox.
2010-10-26 15:17:57 -07:00
Igor Minar
5b40e87ac6 personalLog demo - initial version with spec 2010-10-23 14:38:08 -07:00
Misko Hevery
8a867cee22 Workaround for http://bugs.jquery.com/ticket/7292 2010-10-22 22:46:51 -07:00
Misko Hevery
352dbfa38f upgraded jasmine to 1.0.1
Close #63
2010-10-17 21:13:28 -07:00
Elliott Sprehn
03df6cbddb New Angular Scenario runner and DSL system with redesigned HTML UI.
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-10-14 09:47:39 -07:00
Shyam Seshadri
cf33105011 Fix toEqual matcher to use angular.equals instead of simple == comparison, which breaks down for arrays and objects 2010-08-12 02:45:22 +08:00
Misko Hevery
03aac8b0ab fix broken build, fix #autobind and css loading 2010-07-29 15:26:10 -07:00
Andres Ornelas
0d41c86522 fixed broken jstd conf file 2010-05-26 15:17:28 -07:00
Andres Ornelas
3fab5d9879 added error handling on scenario definition 2010-05-24 15:25:30 -07:00
Andres Ornelas Mesta
f6c67e28c9 happy 2010-05-24 13:54:32 -07:00
Misko Hevery
5215e2095c basic end to end runner 2010-05-20 15:55:41 -07:00
Misko Hevery
fe434307d1 tests work under jquery and without 2010-04-22 17:11:56 -07:00
Misko Hevery
2a9669e1d8 working on jQuery passing tests 2010-04-22 15:50:20 -07:00
Misko Hevery
843bd355d2 various bug fixes 2010-04-09 16:20:15 -07:00
Misko Hevery
7a4b480206 added ng:switch widget 2010-04-05 11:46:53 -07:00
Misko Hevery
e55c97deba dissabled a lot of tests, and made the core test set pass. 2010-03-29 20:25:42 -07:00
Misko Hevery
7c87c17d08 upgraded jquery to 1.4.2 and made ng-action work with jquery 2010-03-22 18:20:49 -07:00
Adam Abrons
c9aba8b442 make xhr just a method 2010-03-16 14:48:11 -07:00
Misko Hevery
cc71b745c3 added resources; removed compiled code 2010-03-15 14:36:50 -07:00
Misko Hevery
2880411713 added bootstrap, fixed formatter 2010-01-29 10:15:15 -08:00
Misko Hevery
ba9eef40cf fix jquery version in jstd.conf 2010-01-25 20:30:22 -08:00
Misko Hevery
efad9ec5be changes to make it closure compiler compatible 2010-01-24 17:10:58 -08:00
Misko Hevery
4460328bc1 lots of cleanup to get it ready for OS 2010-01-23 15:54:58 -08:00
Misko Hevery
595b4ea097 checkpoint for integration with angular 2010-01-18 10:47:03 -08:00
Misko Hevery
9b9a0dadcc removed nglr namespace 2010-01-09 15:02:43 -08:00
Misko Hevery
214c142d9d created a way to init the code without autobootstrap 2010-01-08 16:04:35 -08:00
Adam Abrons
c9c176a53b angular.js 2010-01-05 16:36:58 -08:00