~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/app/javascript/tests/test_picker.js

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-06-08 03:19:34 UTC
  • mfrom: (13158.2.3 webkit-yuitest-love-0)
  • Revision ID: launchpad@pqm.canonical.com-20110608031934-cvn4s0bwn2rr7q7c
[rs=sinzui][no-qa] Fix YUITest teardown so that the runner reports it
 completed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
            {"value": "frieda", "title": "Frieda", "css": "sprite-person",
49
49
                "description": "frieda@example.com", "api_uri": "~/frieda"}
50
50
        ];
 
51
        this.picker = null;
51
52
        this.text_input = null;
52
53
        this.select_menu = null;
53
54
    },
59
60
        if (this.text_input !== null) {
60
61
            Y.one('body').removeChild(this.text_input);
61
62
            }
62
 
        cleanup_widget(this.picker);
 
63
        if (this.picker !== null) {
 
64
            cleanup_widget(this.picker);
 
65
            }
63
66
    },
64
67
 
65
68
    create_picker: function(validate_callback) {
197
200
        // copy the selected value to the text input field.
198
201
        this.text_input = Y.Node.create(
199
202
                '<input id="field.testfield" value="foo" />');
200
 
        node = Y.one(document.body).appendChild(this.text_input);
 
203
        var node = Y.one(document.body).appendChild(this.text_input);
201
204
        this.select_menu = Y.Node.create(
202
205
            '<select id="field.testfield-suggestions"> ' +
203
206
            '    <option value="">Did you mean...</option>' +