Re: Failing Date/Related Items Robot Tests

Johannes Raggam <[email protected]>
Newsgroups gmane.comp.web.zope.plone.devel
Message-ID <1380639102.25957.33.camel@luft>
Hi,

at least for the datetime widget issues, I found the source of the
problem.

With plone.app.contenttypes the collective.z3cform.datetimewidget is
used instead of the calendar macro found somewhere in portal_skins.
Looks like, as if the robot tests were written for the latter.

My fixes in Products.CMFPlone.tests.robot.test_edit.robot are a start
and don't work right away. They have to be debugged more deeply. My
current git diff output is included in the attached file.

Cheers,
Johannes



On Mon, 2013-09-30 at 21:58 +0200, Timo Stollenwerk wrote:
> Hi,
> 
> 
> Ramon and I are working hard on getting the Plone 5 coredev jobs
> passing. There are three robot tests in CMFPlone that currently fail:
> Scenario: Adding a related item
> https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/tests/robot/test_edit.robot#L31
> Scenario: DateTime widget follows form dropdowns values
> https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/tests/robot/test_edit.robot#L31
> Scenario: Form dropdowns follows DateTime widget values:
> https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/tests/robot/test_edit.robot#L51
> 
> 
> Those tests are probably related to the merge of plone.app.event and
> maybe plone.app.widgets (related item?) related changes.
> 
> 
> Since we don't know how to fix those tests, we would really appreciate
> it the developers involved in those changes could have a look and
> maybe could fix those tests. We are really close to getting the job
> green and I think it is really essential that we fix the job before
> the conference sprints.
> 
> Cheers,
> Timo
> 

-- 
programmatic  web development
di(fh) johannes raggam / thet
python plone zope development
mail: office-//[email protected]
web:  http://programmatic.pro
      http://bluedynamics.com

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk

_______________________________________________
Plone-developers mailing list
Plone-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/plone-developers
test_edit.robot.diff (text/x-patch, 3.2 KB)
diff --git a/Products/CMFPlone/tests/robot/test_edit.robot b/Products/CMFPlone/tests/robot/test_edit.robot
index d3603cb..fc261b5 100644
--- a/Products/CMFPlone/tests/robot/test_edit.robot
+++ b/Products/CMFPlone/tests/robot/test_edit.robot
@@ -113,28 +113,32 @@ the related item is shown in the page
    Xpath Should Match X Times  //dl[@id = 'relatedItemBox']/dd  1
 
 I select a date using the dropdowns
-    Select From List  xpath=//select[@id='edit_form_effectiveDate_0_year']  2001
-    Select From List  xpath=//select[@id='edit_form_effectiveDate_0_month']  January
-    Select From List  xpath=//select[@id='edit_form_effectiveDate_0_day']  01
-    Select From List  xpath=//select[@id='edit_form_effectiveDate_0_hour']  01
-    Select From List  xpath=//select[@id='edit_form_effectiveDate_0_minute']  00
-    Select From List  xpath=//select[@id='edit_form_effectiveDate_0_ampm']  AM
+
+    Select From List  xpath=//input[@id='form-widgets-IDublinCore-effective-year']  2001
+    Select From List  xpath=//select[@id='form-widgets-IDublinCore-effective-month']  1
+    Select From List  xpath=//input[@id='form-widgets-IDublinCore-effective-day']  01
+    Select From List  xpath=//input[@id='form-widgets-IDublinCore-effective-hour']  01
+    Select From List  xpath=//input[@id='form-widgets-IDublinCore-effective-min']  00
+#    Select From List  xpath=//select[@id='edit_form_effectiveDate_0_ampm']  AM
 
 I click the calendar icon
 
-    Click Element  xpath=//span[@id='edit_form_effectiveDate_0_popup']
-    Element Should Be Visible  xpath=//div[@class='calendar']
+    Click Element  xpath=//div[@id='formfield-form-widgets-IDublinCore-effective']//a[@class='caltrigger']
+    Element Should Be Visible  xpath=//div[@class='calroot']
 
 popup calendar should have the same date
-    Element Text Should Be  xpath=//div[@class='calendar']//thead//td[@class='title']  January, 2001
+
+    Element Text Should Be  xpath=//div[@class='calroot']//div[@id='calhead']//div[@id='caltitle']//select[@id='calmonth'] 0
+    Element Text Should Be  xpath=//div[@class='calroot']//div[@id='calhead']//div[@id='caltitle']//select[@id='calyear'] 2001
 
 I select a date using the widget
-    Click Element  xpath=//div[@class='calendar']/table/thead/tr[2]/td[4]/div
+    Click Element  xpath=//div[@class='calroot']//div[@id='calbody']//div[@id='calweeks']//div[@id='calweek']//a[@href='#1']
+    
 
 form dropdowns should not have the default values anymore
-    ${yearLabel} =  Get Selected List Label  xpath=//select[@id='edit_form_effectiveDate_0_year']
+    ${yearLabel} =  Get Selected List Label  xpath=//input[@id='form-widgets-IDublinCore-effective-year']
     Should Not Be Equal  ${yearLabel}  --
-    ${monthLabel} =  Get Selected List Label  xpath=//select[@id='edit_form_effectiveDate_0_month']
+    ${monthLabel} =  Get Selected List Label  xpath=//select[@id='form-widgets-IDublinCore-effective-month']
     Should Not Be Equal  ${monthLabel}  --
-    ${dayLabel} =  Get Selected List Label  xpath=//select[@id='edit_form_effectiveDate_0_day']
+    ${dayLabel} =  Get Selected List Label  xpath=//input[@id='form-widgets-IDublinCore-effective-day']
     Should Not Be Equal  ${dayLabel}  --
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEABECAAYFAlJK4X4ACgkQW4mNMQxDgAc2GQCgiI6RKnjK9AI24q/yj68hq3Jy
+2sAoNiclg7+NgNnCJwtPk+W8ca8GWJ1
=TwPH
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.