public
Description: Fleegix.js provides an extremely lightweight, cross-browser set of JavaScript tools for building dynamic Web-app UIs.
Homepage: http://js.fleegix.org
Clone URL: git://github.com/mde/fleegix-js-javascript-toolkit.git
commit  c3f3468fc6b198035bce0632458bf15bfc9cc3cb
tree    00859ada505979fb6cabc55f6f553c59f09b1866
parent  f7c2afcdd3d62944d3c7b60501135cb429d298ee
100644 38 lines (36 sloc) 0.892 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
fleegixMain.test_fleegixEvent = new function () {
  var _handleClick = function () {
    var d = $('clickHandlerTest');
    d.firstChild.nodeValue = 'I was just clicked, yay me!';
  };
  this.test_addClickableNode = function () {
    var d = $elem('div');
    d.id = 'clickHandlerTest';
    d.appendChild($text('Click Test'));
    fleegix.event.listen(d, 'onclick', _handleClick);
    document.body.appendChild(d);
  };
  this.test_doClick = [
    {
      method: "waits.forElement",
      params: {
        id: 'clickHandlerTest'
      }
    },
    {
      method: "click",
      params: { id: 'clickHandlerTest' }
    },
    {
      method: "asserts.assertText",
      params: {
      validator: 'I was just clicked, yay me!',
        id: 'clickHandlerTest'
      }
    }
  ];
  this.teardown = function () {
    var d = $('clickHandlerTest');
    document.body.removeChild(d);
  };
};