Skip to content

Commit

Permalink
Merge pull request #236 from plone/portal-in-the-catalog
Browse files Browse the repository at this point in the history
Portal in the catalog
  • Loading branch information
jensens authored Oct 30, 2021
2 parents 7fde206 + 253c673 commit 7a1bd2b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions news/236.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adapt the tests to cope with the fact the since Plone 6 the Plone site root is cataloged [ale-rt]
2 changes: 1 addition & 1 deletion plone/app/content/tests/test_folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def testStateChange(self):
effective_index = self.convertDateTimeToIndexRepr(
self.portal.page.effective_date
)
self.assertEqual(pc.uniqueValuesFor("effective"), (effective_index,))
self.assertIn(effective_index, pc.uniqueValuesFor("effective"))


class RenameTest(BaseTest):
Expand Down
24 changes: 22 additions & 2 deletions plone/app/content/tests/test_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,12 @@ def testVocabularyCatalogResults(self):
"i": "path",
"o": "plone.app.querystring.operation.string.path",
"v": "/plone",
}
},
{
"i": "portal_type",
"o": "plone.app.querystring.operation.selection.any",
"v": "Document",
},
]
}
self.request.form.update(
Expand Down Expand Up @@ -216,7 +221,12 @@ def testVocabularyBatching(self):
"i": "path",
"o": "plone.app.querystring.operation.string.path",
"v": "/plone",
}
},
{
"i": "portal_type",
"o": "plone.app.querystring.operation.selection.any",
"v": "Document",
},
]
}
# batch pages are 1-based
Expand Down Expand Up @@ -601,10 +611,20 @@ def testUntranslatableMetadata(self):

def testGetMimeIcon(self):
"""Check if the returned icon is correct"""
query = {
"criteria": [
{
"i": "portal_type",
"o": "plone.app.querystring.operation.selection.any",
"v": "File",
},
]
}
self.request.form.update(
{
"name": "plone.app.vocabularies.Catalog",
"attributes": ["getMimeIcon"],
"query": json.dumps(query),
}
)
view = VocabularyView(self.portal, self.request)
Expand Down

0 comments on commit 7a1bd2b

Please sign in to comment.