mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-09 07:14:44 +00:00
appended lastDocument to the document.body
This commit is contained in:
parent
55c0767f16
commit
4fec828cf6
1 changed files with 4 additions and 1 deletions
|
|
@ -11,6 +11,7 @@ describe("DSL", function() {
|
||||||
};
|
};
|
||||||
executeStep = function(step, html, callback) {
|
executeStep = function(step, html, callback) {
|
||||||
lastDocument =_jQuery('<div>' + html + '</div>');
|
lastDocument =_jQuery('<div>' + html + '</div>');
|
||||||
|
_jQuery(document.body).append(lastDocument);
|
||||||
var specThis = {
|
var specThis = {
|
||||||
testWindow: window,
|
testWindow: window,
|
||||||
testDocument: lastDocument
|
testDocument: lastDocument
|
||||||
|
|
@ -32,8 +33,10 @@ describe("DSL", function() {
|
||||||
it('should select', function() {
|
it('should select', function() {
|
||||||
input('gender').select('female');
|
input('gender').select('female');
|
||||||
expect(lastStep.name).toEqual("Select radio 'gender' to 'female'");
|
expect(lastStep.name).toEqual("Select radio 'gender' to 'female'");
|
||||||
executeStep(lastStep, '<input type="radio" name="0@gender" value="male"/>' +
|
executeStep(lastStep,
|
||||||
|
'<input type="radio" name="0@gender" value="male" checked/>' +
|
||||||
'<input type="radio" name="0@gender" value="female"/>');
|
'<input type="radio" name="0@gender" value="female"/>');
|
||||||
|
expect(lastDocument.find(':radio:checked').length).toEqual(1);
|
||||||
expect(lastDocument.find(':radio:checked').val()).toEqual('female');
|
expect(lastDocument.find(':radio:checked').val()).toEqual('female');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue