@@ -2,6 +2,8 @@ XXX: This functional test part has been removed due to the removal of
2
2
ATContentTypes from PLONE_FIXTURE. We have to rewrite this test as a robot
3
3
test because the dexterity collections do not work without js.
4
4
5
+ XXX To put this more plainly: this file is currently NOT tested.
6
+
5
7
6
8
List comments in a collection
7
9
-----------------------------
@@ -12,33 +14,24 @@ Create a collection.
12
14
>>> from plone.app.testing import TEST_USER_NAME
13
15
>>> setRoles(portal, 'manager', ['Manager'])
14
16
>>> browser.open(portal.absolute_url())
15
- >>> from plone.app.discussion.testing import COLLECTION_TYPE
16
- >>> browser.getLink(url='++add++' + COLLECTION_TYPE).click()
17
+ >>> browser.getLink(url='++add++Collection').click()
17
18
>>> open('/tmp/testbrowser.html', 'w').write(browser.contents)
18
19
>>> browser.getControl('form.widgets.IDublinCore.title').value = 'Foo Comment Collection'
19
20
>>> browser.getControl('Save').click()
20
21
>>> print(browser.contents)
21
22
<...Changes saved...
22
- >>> topic_url = browser.url
23
+ >>> collection_url = browser.url
23
24
24
25
Set the collection criteria.
25
26
26
- >>> browser.open(topic_url + "/edit")
27
+ >>> browser.open(collection_url + "/edit")
27
28
28
- >>> if COLLECTION_TYPE == "Collection":
29
- ... browser.getControl(name="addindex").value = ['portal_type']
30
- ... browser.getControl(name="form.button.addcriteria").click()
31
- ... browser.getControl(name="addoperator").value = ['plone.app.querystring.operation.selection.any']
32
- ... browser.getControl(name="form.button.addcriteria").click()
33
- ... browser.getControl(name="query.v:records:list").value = ["Discussion Item"]
34
- ... browser.getControl(name="form.button.save").click()
35
- ... else:
36
- ... browser.getLink('Criteria').click()
37
- ... browser.getControl('Item Type', index=0).selected = True
38
- ... browser.getControl('Select content types').selected = True
39
- ... browser.getControl('Add criteria').click()
40
- ... browser.getControl('Comment').selected = True
41
- ... browser.getControl('Save', index=0).click()
29
+ >>> browser.getControl(name="addindex").value = ['portal_type']
30
+ ... browser.getControl(name="form.button.addcriteria").click()
31
+ ... browser.getControl(name="addoperator").value = ['plone.app.querystring.operation.selection.any']
32
+ ... browser.getControl(name="form.button.addcriteria").click()
33
+ ... browser.getControl(name="query.v:records:list").value = ["Discussion Item"]
34
+ ... browser.getControl(name="form.button.save").click()
42
35
>>> print(browser.contents)
43
36
<...Changes saved...
44
37
@@ -71,7 +64,7 @@ Delete the commented content.
71
64
72
65
The comments are no longer in the catalog.
73
66
74
- >>> browser.open(topic_url )
67
+ >>> browser.open(collection_url )
75
68
>>> browser.getLink('admin on Doc1', index=0)
76
69
Traceback (most recent call last):
77
70
LinkNotFoundError
0 commit comments