aboutsummaryrefslogtreecommitdiffstats
path: root/test/scenario
diff options
context:
space:
mode:
authorMisko Hevery2010-10-26 15:35:58 -0700
committerMisko Hevery2010-10-26 16:33:59 -0700
commit9c0225512c63ebfc37e6408cc155d9da1fe682c9 (patch)
tree4973f6c57b801c71cbc93d7d993887ff6d3f9558 /test/scenario
parent40d7e66f408eaaa66efd8d7934ab2eb3324236a1 (diff)
downloadangular.js-9c0225512c63ebfc37e6408cc155d9da1fe682c9.tar.bz2
fixes IE related failures, and form submit event handling in ie
Diffstat (limited to 'test/scenario')
-rw-r--r--test/scenario/ApplicationSpec.js2
-rw-r--r--test/scenario/dslSpec.js2
-rw-r--r--test/scenario/output/HtmlSpec.js4
-rw-r--r--test/scenario/output/jsonSpec.js10
-rw-r--r--test/scenario/output/objectSpec.js8
-rw-r--r--test/scenario/output/xmlSpec.js12
6 files changed, 19 insertions, 19 deletions
diff --git a/test/scenario/ApplicationSpec.js b/test/scenario/ApplicationSpec.js
index 122292c6..3e1c862d 100644
--- a/test/scenario/ApplicationSpec.js
+++ b/test/scenario/ApplicationSpec.js
@@ -88,7 +88,7 @@ describe('angular.scenario.Application', function() {
var testWindow = {
document: _jQuery('<div class="test-foo"></div>'),
angular: {
- service: {},
+ service: {}
}
};
testWindow.angular.service.$browser = function() {
diff --git a/test/scenario/dslSpec.js b/test/scenario/dslSpec.js
index bbba0b7d..efedeeb5 100644
--- a/test/scenario/dslSpec.js
+++ b/test/scenario/dslSpec.js
@@ -177,7 +177,7 @@ describe("angular.scenario.dsl", function() {
expect($window.location).not.toEqual('#foo');
doc.append('<a href="#foo"></a>');
$root.dsl.element('a').click();
- expect($window.location).toEqual('#foo');
+ expect($window.location).toMatch(/#foo$/);
});
it('should count matching elements', function() {
diff --git a/test/scenario/output/HtmlSpec.js b/test/scenario/output/HtmlSpec.js
index f5bb90b0..f973397e 100644
--- a/test/scenario/output/HtmlSpec.js
+++ b/test/scenario/output/HtmlSpec.js
@@ -19,7 +19,7 @@ describe('angular.scenario.output.html', function() {
};
step = {
name: 'some step',
- line: function() { return 'unknown:-1'; },
+ line: function() { return 'unknown:-1'; }
};
runner = new angular.scenario.testing.MockRunner();
context = _jQuery("<div></div>");
@@ -44,7 +44,7 @@ describe('angular.scenario.output.html', function() {
runner.emit('StepBegin', spec, step);
runner.emit('InteractiveWait', spec, step);
expect(context.find('.test-actions .test-title:first').text()).toEqual('some step');
- expect(context.find('.test-actions .test-title:last').html()).toEqual(
+ expect(lowercase(context.find('.test-actions .test-title:last').html())).toEqual(
'waiting for you to <a href="javascript:resume()">resume</a>.'
);
});
diff --git a/test/scenario/output/jsonSpec.js b/test/scenario/output/jsonSpec.js
index b3592608..afc74a21 100644
--- a/test/scenario/output/jsonSpec.js
+++ b/test/scenario/output/jsonSpec.js
@@ -2,7 +2,7 @@ describe('angular.scenario.output.json', function() {
var output, context;
var runner, $window;
var spec, step;
-
+
beforeEach(function() {
$window = {};
context = _jQuery('<div></div>');
@@ -12,22 +12,22 @@ describe('angular.scenario.output.json', function() {
name: 'test spec',
definition: {
id: 10,
- name: 'describe',
+ name: 'describe'
}
};
step = {
name: 'some step',
- line: function() { return 'unknown:-1'; },
+ line: function() { return 'unknown:-1'; }
};
});
-
+
it('should put json in context on RunnerEnd', function() {
runner.emit('SpecBegin', spec);
runner.emit('StepBegin', spec, step);
runner.emit('StepEnd', spec, step);
runner.emit('SpecEnd', spec);
runner.emit('RunnerEnd');
-
+
expect(angular.fromJson(context.html()).children['describe']
.specs['test spec'].status).toEqual('success');
});
diff --git a/test/scenario/output/objectSpec.js b/test/scenario/output/objectSpec.js
index c4e8d451..73c3dcf9 100644
--- a/test/scenario/output/objectSpec.js
+++ b/test/scenario/output/objectSpec.js
@@ -18,19 +18,19 @@ describe('angular.scenario.output.object', function() {
};
step = {
name: 'some step',
- line: function() { return 'unknown:-1'; },
+ line: function() { return 'unknown:-1'; }
};
});
-
+
it('should create a global variable $result', function() {
expect($window.$result).toBeDefined();
});
-
+
it('should maintain live state in $result', function() {
runner.emit('SpecBegin', spec);
runner.emit('StepBegin', spec, step);
runner.emit('StepEnd', spec, step);
-
+
expect($window.$result.children['describe']
.specs['test spec'].steps[0].duration).toBeDefined();
});
diff --git a/test/scenario/output/xmlSpec.js b/test/scenario/output/xmlSpec.js
index 448c8d10..fbfabcc4 100644
--- a/test/scenario/output/xmlSpec.js
+++ b/test/scenario/output/xmlSpec.js
@@ -2,7 +2,7 @@ describe('angular.scenario.output.json', function() {
var output, context;
var runner, $window;
var spec, step;
-
+
beforeEach(function() {
$window = {};
context = _jQuery('<div></div>');
@@ -12,22 +12,22 @@ describe('angular.scenario.output.json', function() {
name: 'test spec',
definition: {
id: 10,
- name: 'describe',
+ name: 'describe'
}
};
step = {
name: 'some step',
- line: function() { return 'unknown:-1'; },
+ line: function() { return 'unknown:-1'; }
};
});
-
+
it('should create XML nodes for object model', function() {
runner.emit('SpecBegin', spec);
runner.emit('StepBegin', spec, step);
runner.emit('StepEnd', spec, step);
runner.emit('SpecEnd', spec);
runner.emit('RunnerEnd');
- expect(_jQuery(context).find('it').attr('status')).toEqual('success');
- expect(_jQuery(context).find('it step').attr('status')).toEqual('success');
+ expect(context.find('it').attr('status')).toEqual('success');
+ expect(context.find('it step').attr('status')).toEqual('success');
});
});