Some fixes and new tests

The stack trace has 3 parts: the first contains all the tests passed together, the second and the third contains the failed-tests passed alone.


pau@mendel:~/dev/Espurna/bikalims/zinstance$ bin/test -m bika.lims
Running bika.lims.testing.BikaTestingLayer:Functional tests:
  Set up plone.testing.zca.LayerCleanup in 0.000 seconds.
  Set up plone.testing.z2.Startup in 0.269 seconds.
  Set up plone.app.testing.layers.PloneFixture in 5.599 seconds.
  Set up bika.lims.testing.BikaTestLayer in 46.712 seconds.
  Set up bika.lims.testing.BikaTestingLayer:Functional in 0.000 seconds.
  Running:
                  
  Ran 16 tests with 0 failures and 0 errors in 13.103 seconds.
Running bika.lims.testing.BikaTestingLayer:Robot tests:
  Tear down bika.lims.testing.BikaTestingLayer:Functional in 0.000 seconds.
  Set up plone.testing.z2.ZServer in 0.502 seconds.
  Set up bika.lims.testing.BikaTestingLayer:Robot in 0.000 seconds.
  Running:
    1/29 (3.4%)[ WARN ] Maintenance, Validations, CAlibrations, Certifications and Schedules not tested
[ WARN ] Can't select Reset using SESSION (breaks in zeo without sticky sessions)
The following test left new threads behind:
Repetitive Bika Setup stuff (test_bika_setup.robot)
New thread(s): [<_DummyThread(Dummy-1, started daemon 140620319504128)>]
    3/29 (10.3%)[ WARN ] span.state-sample_received
    4/29 (13.8%)
==============================================================================
test AnalysisRequest                                                          
==============================================================================
Create two different ARs from the same sample.                        | FAIL |
ValueError: Element locator 'xpath=//div[contains(@class,'cg-colItem')][1]' did not match any elements.
------------------------------------------------------------------------------
test AnalysisRequest                                                  | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
Output:  /home/pau/dev/Espurna/bikalims/zinstance/parts/test/test_AnalysisRequest/Create_two_different_ARs_from_the_same_sample/output.xml
Log:     /home/pau/dev/Espurna/bikalims/zinstance/parts/test/test_AnalysisRequest/Create_two_different_ARs_from_the_same_sample/log.html
Report:  /home/pau/dev/Espurna/bikalims/zinstance/parts/test/test_AnalysisRequest/Create_two_different_ARs_from_the_same_sample/report.html



Failure in test Create two different ARs from the same sample (test_AnalysisRequest.robot)
Traceback (most recent call last):
  File "/home/pau/dev/Espurna/bikalims/buildout-cache/eggs/unittest2-0.5.1-py2.7.egg/unittest2/case.py", line 340, in run
    testMethod()
  File "/home/pau/dev/Espurna/bikalims/buildout-cache/eggs/robotsuite-1.3.3-py2.7.egg/robotsuite/__init__.py", line 360, in runTest
    assert last_status == 'PASS', last_message
AssertionError: ValueError: Element locator 'xpath=//div[contains(@class,'cg-colItem')][1]' did not match any elements.

    19/29 (65.5%)[ WARN ] XXX Publication preferences are broken - the widgets need to make sense, and be adaptable.
[ WARN ] No archetypes-fieldname-CCContact field selected
    25/29 (86.2%)
==============================================================================
test ShowPartitions                                                           
==============================================================================
AnalysisRequest views                                                 | FAIL |
StaleElementReferenceException: Message: u'stale element reference: element is not attached to the page document\n  (Session info: chrome=38.0.2125.111)\n  (Driver info: chromedriver=2.11.298611 (d1120fdf51badec2f7b63a96e19a58d4783de84d),platform=Linux 3.2.0-4-amd64 x86_64)'
------------------------------------------------------------------------------
test ShowPartitions                                                   | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
Output:  /home/pau/dev/Espurna/bikalims/zinstance/parts/test/test_ShowPartitions/AnalysisRequest_views/output.xml
Log:     /home/pau/dev/Espurna/bikalims/zinstance/parts/test/test_ShowPartitions/AnalysisRequest_views/log.html
Report:  /home/pau/dev/Espurna/bikalims/zinstance/parts/test/test_ShowPartitions/AnalysisRequest_views/report.html



Failure in test AnalysisRequest views (test_ShowPartitions.robot)
Traceback (most recent call last):
  File "/home/pau/dev/Espurna/bikalims/buildout-cache/eggs/unittest2-0.5.1-py2.7.egg/unittest2/case.py", line 340, in run
    testMethod()
  File "/home/pau/dev/Espurna/bikalims/buildout-cache/eggs/robotsuite-1.3.3-py2.7.egg/robotsuite/__init__.py", line 360, in runTest
    assert last_status == 'PASS', last_message
AssertionError: StaleElementReferenceException: Message: u'stale element reference: element is not attached to the page document\n  (Session info: chrome=38.0.2125.111)\n  (Driver info: chromedriver=2.11.298611 (d1120fdf51badec2f7b63a96e19a58d4783de84d),platform=Linux 3.2.0-4-amd64 x86_64)' 

                  
  Ran 29 tests with 2 failures and 0 errors in 34 minutes 30.540 seconds.
Tearing down left over layers:
  Tear down bika.lims.testing.BikaTestingLayer:Robot in 0.000 seconds.
  Tear down plone.testing.z2.ZServer in 1.418 seconds.
  Tear down bika.lims.testing.BikaTestLayer in 0.017 seconds.
  Tear down plone.app.testing.layers.PloneFixture in 0.057 seconds.
  Tear down plone.testing.z2.Startup in 0.004 seconds.
  Tear down plone.testing.zca.LayerCleanup in 0.021 seconds.
Total: 45 tests, 2 failures, 0 errors in 35 minutes 39.236 seconds.


test_ShowPartitions.robot doesnt' has any failure:

pau@mendel:~/dev/Espurna/bikalims/zinstance$ bin/test -m bika.lims -t test_ShowPartitions.robot
Running bika.lims.testing.BikaTestingLayer:Robot tests:
  Set up plone.testing.zca.LayerCleanup in 0.000 seconds.
  Set up plone.testing.z2.Startup in 0.231 seconds.
  Set up plone.app.testing.layers.PloneFixture in 5.843 seconds.
  Set up bika.lims.testing.BikaTestLayer in 45.594 seconds.
  Set up plone.testing.z2.ZServer in 0.502 seconds.
  Set up bika.lims.testing.BikaTestingLayer:Robot in 0.000 seconds.
  Running:
    1/1 (100.0%)The following test left new threads behind:
AnalysisRequest views (test_ShowPartitions.robot)
New thread(s): [<_DummyThread(Dummy-1, started daemon 139896502900480)>]
                
  Ran 1 tests with 0 failures and 0 errors in 1 minutes 27.655 seconds.
Tearing down left over layers:
  Tear down bika.lims.testing.BikaTestingLayer:Robot in 0.000 seconds.
  Tear down plone.testing.z2.ZServer in 1.916 seconds.
  Tear down bika.lims.testing.BikaTestLayer in 0.019 seconds.
  Tear down plone.app.testing.layers.PloneFixture in 0.056 seconds.
  Tear down plone.testing.z2.Startup in 0.004 seconds.
  Tear down plone.testing.zca.LayerCleanup in 0.009 seconds.

The same for test_analysisRequest.robot

pau@mendel:~/dev/Espurna/bikalims/zinstance$ bin/test -m bika.lims -t test_AnalysisRequest.robot
Running bika.lims.testing.BikaTestingLayer:Robot tests:
  Set up plone.testing.zca.LayerCleanup in 0.000 seconds.
  Set up plone.testing.z2.Startup in 0.228 seconds.
  Set up plone.app.testing.layers.PloneFixture in 4.956 seconds.
  Set up bika.lims.testing.BikaTestLayer in 42.777 seconds.
  Set up plone.testing.z2.ZServer in 0.525 seconds.
  Set up bika.lims.testing.BikaTestingLayer:Robot in 0.000 seconds.
  Running:
    1/3 (33.3%)The following test left new threads behind:
Check the AR Add javascript (test_AnalysisRequest.robot)
New thread(s): [<_DummyThread(Dummy-1, started daemon 140542838019840)>]
    2/3 (66.7%)[ WARN ] span.state-sample_received
                
  Ran 3 tests with 0 failures and 0 errors in 2 minutes 53.791 seconds.
Tearing down left over layers:
  Tear down bika.lims.testing.BikaTestingLayer:Robot in 0.000 seconds.
  Tear down plone.testing.z2.ZServer in 1.767 seconds.
  Tear down bika.lims.testing.BikaTestLayer in 0.015 seconds.
  Tear down plone.app.testing.layers.PloneFixture in 0.048 seconds.
  Tear down plone.testing.z2.Startup in 0.004 seconds.
  Tear down plone.testing.zca.LayerCleanup in 0.007 seconds.