Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix show_excluded_items in @navigation api #1816

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

mamico
Copy link
Member

@mamico mamico commented Sep 19, 2024

The show_ecluded_items setting does not work for the @navigation API due to an incorrect condition.


📚 Documentation preview 📚: https://plonerestapi--1816.org.readthedocs.build/

@mister-roboto

This comment was marked as resolved.

@mamico
Copy link
Member Author

mamico commented Sep 19, 2024

In Plone 5.2 test is broken with and without the fix.
I can't figure out if it's the wrong test or what else

@mamico
Copy link
Member Author

mamico commented Sep 19, 2024

@jenkins-plone-org please run jobs

Copy link
Contributor

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

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

Couple of typos and a question for the failing test.

@@ -124,6 +124,35 @@ def test_dont_broke_with_contents_without_review_state(self):
)
self.assertIsNone(response.json()["items"][1]["items"][3]["review_state"])

def test_show_exclude_items(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo.

Suggested change
def test_show_exclude_items(self):
def test_show_excluded_items(self):

@@ -0,0 +1,2 @@
Fix incorrect condition for show_ecluded_items setting in the @navigation API.
Copy link
Contributor

Choose a reason for hiding this comment

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

Add reST syntax and fix typo.

Suggested change
Fix incorrect condition for show_ecluded_items setting in the @navigation API.
Fix incorrect condition for ``show_excluded_items`` setting in the ``@navigation`` API.

response = self.api_session.get(
"/folder/@navigation", params={"expand.navigation.depth": 2}
)
self.assertNotIn(
Copy link
Contributor

Choose a reason for hiding this comment

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

Is settings.show_excluded_items==True at this point? That could explain the test failure.

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.

3 participants