mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 07:40:22 +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) {
|
||||
lastDocument =_jQuery('<div>' + html + '</div>');
|
||||
_jQuery(document.body).append(lastDocument);
|
||||
var specThis = {
|
||||
testWindow: window,
|
||||
testDocument: lastDocument
|
||||
|
|
@ -32,8 +33,10 @@ describe("DSL", function() {
|
|||
it('should select', function() {
|
||||
input('gender').select('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"/>');
|
||||
expect(lastDocument.find(':radio:checked').length).toEqual(1);
|
||||
expect(lastDocument.find(':radio:checked').val()).toEqual('female');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue