From 2115db69035c5993533fe7a3825e64cf6e9068ad Mon Sep 17 00:00:00 2001 From: Elliott Sprehn Date: Tue, 19 Oct 2010 13:17:49 -0700 Subject: Lots of stability and performance updates and UI polish too. Polish the Scenario Runner UI to include: - a scroll pane that steps appear in since the list can be very long - Collapse successful tests - Show the line where the DSL statements were when there's an error (Chrome, Firefox) Also: - Remove lots angular.bind calls to reduce the amount of stack space used. - Use setTimeout(...,0) to schedule the next future to let the browser breathe and have it repaint the steps. Also prevents overflowing the stack when an it() creates many futures. - Run afterEach() handlers even if the it() block fails. - Make navigateTo() take a function as the second argument so you can compute a URL in the future. - Add wait() DSL statement to allow interactive debugging of tests. - Allow custom jQuery selectors with element(...).query(fn) DSL statement. Known Issues: - All afterEach() handlers run even if a beforeEach() handler fails. Only after handlers for the same level as the failure and above should run. --- test/scenario/DescribeSpec.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'test/scenario/DescribeSpec.js') diff --git a/test/scenario/DescribeSpec.js b/test/scenario/DescribeSpec.js index 05129cfe..417a0d2e 100644 --- a/test/scenario/DescribeSpec.js +++ b/test/scenario/DescribeSpec.js @@ -38,12 +38,16 @@ describe('angular.scenario.Describe', function() { expect(specs.length).toEqual(2); expect(specs[0].name).toEqual('2'); - specs[0].fn(); + specs[0].before(); + specs[0].body(); + specs[0].after(); expect(log.text).toEqual('{(2)}'); log.reset(); expect(specs[1].name).toEqual('1'); - specs[1].fn(); + specs[1].before(); + specs[1].body(); + specs[1].after(); expect(log.text).toEqual('{1}'); }); -- cgit v1.2.3