Hi,

I talked wit Martin about the isSeeable() issue and he also means that this should be possible to test this with the Test Runner. So I tried an example with the popup and it works for me. Here the example test code:

qx.Class.define("testml.test.DemoTest",
{
  extend : qx.test.ui.LayoutTestCase,

  members :
  {
    testSimple : function()
    {
      var popup = new qx.ui.popup.Popup(new qx.ui.layout.Canvas());
      popup.add(new qx.ui.basic.Label("Hello World #1"));
      popup.placeToPoint({left:10, top:10});

      popup.show();
      this.flush();
      this.assertTrue(popup.isSeeable());
      this.debug("isSeeable: "+ popup.isSeeable());

      popup.exclude();
      this.flush();
      this.assertFalse(popup.isSeeable());
      this.debug("isSeeable: "+ popup.isSeeable());
    }
  }
});

My test class extend form the "qx.test.ui.LayoutTestCase". Hope this helps.

Cheers,
Chris

Am 22.12.2009 22:42, schrieb Jean-Noël Rivasseau:
Hi

    No, at the moment it is not possible to set the order manually. But
    there is a bug report for this enhancement #3258 [1]. Please add
    yourself to the bug report, if you will be informed a bout the state.


Ok, I hope this bug will be fixed soon :) Cleanups after tests are a big issue so at least the order should be fixed.


    >
    The isSeeable() method is tested in our framework with the test class
    'qx.test.ui.core.Widget', so this should be possible to test. But I
    don't know if it is possible to the the "appear" listener, but I think
    it should be also possible to test this.

    The trick is to flush the qooxdoo queues, before you test for e.q.
    isSeeable(). Otherwise the optimizations from the UI core system
    avoid a
    rendering from the widget and a isSeeable() allways returns 'false'. I
    would prefer to extend from the 'qx.test.ui.LayoutTestCase' for this
    case (see 'qx.test.ui.core.Widget' as example). The benefit is
    that this
    class has a getRoot() method to add the widget to the application root
    and a flush() method to flush all qooxdoo queues.


No, it's not a matter of flushing the queues. I was aware of this problem already and put the manual flush but even like that it is not working. As I mentioned I think this is really due to the fact that it's a Popup I am testing. You can check for yourself: it won't work if you have a simple popup that should be shown on the application.

Jean-Noel


--
Christian Schmidt
Software Entwickler

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
[email protected]

Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas 
Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver 
Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to