plone.restapi/unify-expired-and-excluded-items-handling: Merge branch 'master' into translate-workflow-titles
GitHub <jenkins-z4DKO/[email protected]> Sat, 29 Jul 2017 16:31:45 -0700 (PDT)
| Newsgroups | gmane.comp.web.zope.plone.cvs |
|---|---|
| Message-ID | <[email protected]> |
Repository: plone.restapi Branch: refs/heads/unify-expired-and-excluded-items-handling Date: 2017-07-27T07:59:31+02:00 Author: Timo Stollenwerk (tisto) <[email protected]> Commit: https://github.com/plone/plone.restapi/commit/7a67236d639d770f269a8665080e53b8aa83c18d Merge branch 'master' into translate-workflow-titles Files changed: A docs/source/_json/component_breadcrumbs.req A docs/source/_json/component_breadcrumbs.resp A docs/source/_json/component_navigation.req A docs/source/_json/component_navigation.resp M CHANGES.rst M docs/source/_json/breadcrumbs.req M docs/source/_json/breadcrumbs.resp M docs/source/_json/navigation.req M docs/source/_json/navigation.resp M docs/source/components.rst M src/plone/restapi/tests/test_documentation.py M src/plone/restapi/tests/test_services_breadcrumbs.py M src/plone/restapi/tests/test_services_navigation.py diff --git a/CHANGES.rst b/CHANGES.rst index 375ea23f..ea327e04 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -11,6 +11,9 @@ New Features: - Translate titles in @workflow. [csenger] + +- Add skipped tests from @breadcrumbs and @navigation now that the expansion is in place + [sneridagh] 1.0a20 (2017-07-24) diff --git a/docs/source/_json/breadcrumbs.req b/docs/source/_json/breadcrumbs.req index 9693c4d3..8370e19a 100644 --- a/docs/source/_json/breadcrumbs.req +++ b/docs/source/_json/breadcrumbs.req @@ -1,3 +1,3 @@ -GET /plone/front-page/@components/breadcrumbs HTTP/1.1 +GET /plone/front-page/@breadcrumbs HTTP/1.1 Accept: application/json Authorization: Basic YWRtaW46c2VjcmV0 diff --git a/docs/source/_json/breadcrumbs.resp b/docs/source/_json/breadcrumbs.resp index 647f746a..00d2a168 100644 --- a/docs/source/_json/breadcrumbs.resp +++ b/docs/source/_json/breadcrumbs.resp @@ -1,14 +1,12 @@ HTTP/1.1 200 OK Content-Type: application/json -[ - { - "@id": "http://localhost:55001/plone/front-page/@components/breadcrumbs", - "items": [ - { - "title": "Welcome to Plone", - "url": "http://localhost:55001/plone/front-page" - } - ] - } -] \ No newline at end of file +{ + "@id": "http://localhost:55001/plone/front-page/@breadcrumbs", + "items": [ + { + "title": "Welcome to Plone", + "url": "http://localhost:55001/plone/front-page" + } + ] +} \ No newline at end of file diff --git a/docs/source/_json/component_breadcrumbs.req b/docs/source/_json/component_breadcrumbs.req new file mode 100644 index 00000000..9693c4d3 --- /dev/null +++ b/docs/source/_json/component_breadcrumbs.req @@ -0,0 +1,3 @@ +GET /plone/front-page/@components/breadcrumbs HTTP/1.1 +Accept: application/json +Authorization: Basic YWRtaW46c2VjcmV0 diff --git a/docs/source/_json/component_breadcrumbs.resp b/docs/source/_json/component_breadcrumbs.resp new file mode 100644 index 00000000..647f746a --- /dev/null +++ b/docs/source/_json/component_breadcrumbs.resp @@ -0,0 +1,14 @@ +HTTP/1.1 200 OK +Content-Type: application/json + +[ + { + "@id": "http://localhost:55001/plone/front-page/@components/breadcrumbs", + "items": [ + { + "title": "Welcome to Plone", + "url": "http://localhost:55001/plone/front-page" + } + ] + } +] \ No newline at end of file diff --git a/docs/source/_json/component_navigation.req b/docs/source/_json/component_navigation.req new file mode 100644 index 00000000..8de636fd --- /dev/null +++ b/docs/source/_json/component_navigation.req @@ -0,0 +1,3 @@ +GET /plone/front-page/@components/navigation HTTP/1.1 +Accept: application/json +Authorization: Basic YWRtaW46c2VjcmV0 diff --git a/docs/source/_json/component_navigation.resp b/docs/source/_json/component_navigation.resp new file mode 100644 index 00000000..da3406d6 --- /dev/null +++ b/docs/source/_json/component_navigation.resp @@ -0,0 +1,18 @@ +HTTP/1.1 200 OK +Content-Type: application/json + +[ + { + "@id": "http://localhost:55001/plone/front-page/@components/navigation", + "items": [ + { + "title": "Home", + "url": "http://localhost:55001/plone" + }, + { + "title": "Welcome to Plone", + "url": "http://localhost:55001/plone/front-page" + } + ] + } +] \ No newline at end of file diff --git a/docs/source/_json/navigation.req b/docs/source/_json/navigation.req index 8de636fd..9cdab891 100644 --- a/docs/source/_json/navigation.req +++ b/docs/source/_json/navigation.req @@ -1,3 +1,3 @@ -GET /plone/front-page/@components/navigation HTTP/1.1 +GET /plone/front-page/@navigation HTTP/1.1 Accept: application/json Authorization: Basic YWRtaW46c2VjcmV0 diff --git a/docs/source/_json/navigation.resp b/docs/source/_json/navigation.resp index da3406d6..c44ab952 100644 --- a/docs/source/_json/navigation.resp +++ b/docs/source/_json/navigation.resp @@ -1,18 +1,16 @@ HTTP/1.1 200 OK Content-Type: application/json -[ - { - "@id": "http://localhost:55001/plone/front-page/@components/navigation", - "items": [ - { - "title": "Home", - "url": "http://localhost:55001/plone" - }, - { - "title": "Welcome to Plone", - "url": "http://localhost:55001/plone/front-page" - } - ] - } -] \ No newline at end of file +{ + "@id": "http://localhost:55001/plone/front-page/@navigation", + "items": [ + { + "title": "Home", + "url": "http://localhost:55001/plone" + }, + { + "title": "Welcome to Plone", + "url": "http://localhost:55001/plone/front-page" + } + ] +} \ No newline at end of file diff --git a/docs/source/components.rst b/docs/source/components.rst index 49db7373..647f0708 100644 --- a/docs/source/components.rst +++ b/docs/source/components.rst @@ -14,11 +14,11 @@ Breadcrumbs Getting the breadcrumbs for the current page: .. http:example:: curl httpie python-requests - :request: _json/breadcrumbs.req + :request: _json/component_breadcrumbs.req Example response: -.. literalinclude:: _json/breadcrumbs.resp +.. literalinclude:: _json/component_breadcrumbs.resp :language: http Navigation @@ -27,9 +27,9 @@ Navigation Getting the top navigation items: .. http:example:: curl httpie python-requests - :request: _json/navigation.req + :request: _json/component_navigation.req Example response: -.. literalinclude:: _json/navigation.resp +.. literalinclude:: _json/component_navigation.resp :language: http diff --git a/src/plone/restapi/tests/test_documentation.py b/src/plone/restapi/tests/test_documentation.py index dd66c871..cdbc8c3d 100644 --- a/src/plone/restapi/tests/test_documentation.py +++ b/src/plone/restapi/tests/test_documentation.py @@ -706,14 +706,24 @@ def test_documentation_groups_delete(self): def test_documentation_breadcrumbs(self): response = self.api_session.get( - '{}/@components/breadcrumbs'.format(self.document.absolute_url())) + '{}/@breadcrumbs'.format(self.document.absolute_url())) save_request_and_response_for_docs('breadcrumbs', response) def test_documentation_navigation(self): response = self.api_session.get( - '{}/@components/navigation'.format(self.document.absolute_url())) + '{}/@navigation'.format(self.document.absolute_url())) save_request_and_response_for_docs('navigation', response) + def test_documentation_componente_breadcrumbs(self): + response = self.api_session.get( + '{}/@components/breadcrumbs'.format(self.document.absolute_url())) + save_request_and_response_for_docs('component_breadcrumbs', response) + + def test_documentation_components_navigation(self): + response = self.api_session.get( + '{}/@components/navigation'.format(self.document.absolute_url())) + save_request_and_response_for_docs('component_navigation', response) + def test_documentation_principals(self): gtool = api.portal.get_tool('portal_groups') properties = { diff --git a/src/plone/restapi/tests/test_services_breadcrumbs.py b/src/plone/restapi/tests/test_services_breadcrumbs.py index a21002c0..3f0e3fb0 100644 --- a/src/plone/restapi/tests/test_services_breadcrumbs.py +++ b/src/plone/restapi/tests/test_services_breadcrumbs.py @@ -35,7 +35,6 @@ def setUp(self): title=u'A document') transaction.commit() - @unittest.skip('Planned for future release') def test_breadcrumbs(self): response = self.api_session.get('/folder/doc1/@breadcrumbs') diff --git a/src/plone/restapi/tests/test_services_navigation.py b/src/plone/restapi/tests/test_services_navigation.py index 02a04f84..a0c47213 100644 --- a/src/plone/restapi/tests/test_services_navigation.py +++ b/src/plone/restapi/tests/test_services_navigation.py @@ -35,7 +35,6 @@ def setUp(self): title=u'A document') transaction.commit() - @unittest.skip('Planned for future release') def test_navigation(self): response = self.api_session.get('/folder/@navigation') ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot