Skip to content

Plone 5 (tests OK)#20

Open
daggelpop wants to merge 12 commits intomasterfrom
plone5
Open

Plone 5 (tests OK)#20
daggelpop wants to merge 12 commits intomasterfrom
plone5

Conversation

@daggelpop
Copy link

Hello,

This is the same PR as #19, with working tests.

At first, I tried to fix the functional tests for the control panel, but the new select widget requires javascript, so I wrote robot tests instead.

zope.testbrowser documentation mentions this, but "zope.testbrowser.real" doesn't seem to exist:

One important thing to note: zope.testbrowser is not JavaScript aware! For
that, you need a real browser. Look at zope.testbrowser.real and Selenium
if you require "real" browser testing.

@gotcha
Copy link
Member

gotcha commented Mar 20, 2019

Would you add Travis setup to confirm it works both under Plone 4.3 and 5 ?

Copy link
Member

@gotcha gotcha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check my comments ?

if 'summary' in self.context.Schema()['description'].widget.label:
key = 'summary'
else:
key = 'description'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should keep the distinction between description and summary. The description field is still named summary in the "Page" content type.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not the only place where keeping the distinction is needed.

<td tal:condition="python: field != 'Title' and field not in ['ModificationDate',
'CreationDate', 'EffectiveDate',
'ExpirationDate', ]"
tal:content="value"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer logic to be kept in view classes. Would it be possible to move this tal:condition test to a method on a view class ?

tal:attributes="href obj_url;
title obj_description;">
<img class="thumb-icon"
tal:define="getIcon python:obj.getURL() +'/@@images/image/icon'"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python: in the template is often a smell. I would compute the image URL in the view class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants