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

Update test: plone.app.discussion #843

Merged
merged 4 commits into from
Mar 13, 2020
Merged

Conversation

ksuess
Copy link
Member

@ksuess ksuess commented Dec 10, 2019

plone.app.discussion introduces an additional workflow. This change takes the additional workflow states into account.

@mister-roboto
Copy link

@ksuess thanks for creating this Pull Request and help improve Plone!

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass.

Whenever you feel that the pull request is ready to be tested, either start all jenkins jobs pull requests by yourself, or simply add a comment in this pull request stating:

@jenkins-plone-org please run jobs

With this simple comment all the jobs will be started automatically.

Happy hacking!

@coveralls
Copy link

coveralls commented Dec 10, 2019

Coverage Status

Coverage remained the same at ?% when pulling fcba527 on plone.app.discussion-moderation into de8614a on master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at ?% when pulling 2ade84b on plone.app.discussion-moderation into de8614a on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at ?% when pulling 2ade84b on plone.app.discussion-moderation into de8614a on master.

@tisto
Copy link
Member

tisto commented Dec 11, 2019

@ksuess thank you for your contribution. The code looks fine to me. Though, could you please elaborate on how you ran into this issue? I would like to understand the rationale behind this change. Did you create a test layer that includes both plone.restapi and plone.app.discussion?

Copy link
Member

@ale-rt ale-rt left a comment

Choose a reason for hiding this comment

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

Not sure what is the need to to change the test but the method used is deprecated (to my knowledge).

@@ -93,7 +93,7 @@ def test_endpoint_inlines_vocabularies(self):
u"published": {u"title": u"Published with accent \xe9 [published]"},
u"visible": {u"title": u"Public draft [visible]"},
}
self.assertEqual(expected_vocab_values, idx["values"])
self.assertDictContainsSubset(expected_vocab_values, idx["values"])
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for reviewing. I'll fix this as soon as the main PR plone/plone.app.discussion#165 is reviewed and approved.

@ksuess
Copy link
Member Author

ksuess commented Dec 12, 2019

@ksuess thank you for your contribution. The code looks fine to me. Though, could you please elaborate on how you ran into this issue? I would like to understand the rationale behind this change. Did you create a test layer that includes both plone.restapi and plone.app.discussion?

Comments moderation: Additional workflow with states pending, approved, rejected and spam plone/plone.app.discussion#165

Testing with
plone/plone.app.discussion#165
collective/plone.app.locales#285

plus
#843
plone/Products.CMFPlacefulWorkflow#30
plone/Products.CMFPlone#3002
for failing tests on additional workflow states.

https://github.com/plone/plone.app.discussion/pull/165
https://github.com/collective/plone.app.locales/pull/285
https://github.com/plone/plone.restapi/pull/843
https://github.com/plone/Products.CMFPlacefulWorkflow/pull/30
https://github.com/plone/Products.CMFPlone/pull/3002

@tisto
Copy link
Member

tisto commented Dec 12, 2019

Ideally, we would keep the plone.app.discussion workflows out of the Plone core testing layer. Though, I guess this is beyond the scope of this. If anybody wants to work on it this would be a worthwhile goal...

@ksuess
Copy link
Member Author

ksuess commented Jan 11, 2020

Obsolete.
plone/plone.app.discussion#166 extends the existing review workflow instead of adding an additional workflow.

@ksuess ksuess closed this Jan 11, 2020
@ksuess
Copy link
Member Author

ksuess commented Jan 13, 2020

Reopened pull request: tests need to take plone.app.discussion workflow stati into account, even for replaced pull request in plone.app.discussion plone/plone.app.discussion#166

@ksuess ksuess reopened this Jan 13, 2020
@mister-roboto
Copy link

@ksuess thanks for creating this Pull Request and help improve Plone!

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass.

Whenever you feel that the pull request is ready to be tested, either start all jenkins jobs pull requests by yourself, or simply add a comment in this pull request stating:

@jenkins-plone-org please run jobs

With this simple comment all the jobs will be started automatically.

Happy hacking!

@ksuess ksuess force-pushed the plone.app.discussion-moderation branch from 398fab6 to c6d631d Compare January 13, 2020 08:38
@ksuess ksuess requested a review from ale-rt January 14, 2020 09:00
@ale-rt
Copy link
Member

ale-rt commented Jan 14, 2020

There seems to be a genuine failure on plone/app/discussion/tests/functional_test_comments.txt

@ksuess ksuess force-pushed the plone.app.discussion-moderation branch from c6d631d to 8f3550c Compare January 23, 2020 10:27
plone.app.discussion introduces an additional workflow. This change takes the additional workflow states into account.
replace deprecated assertDictContainsSubset with assertLessEqual on dictionary items()
@ksuess ksuess force-pushed the plone.app.discussion-moderation branch from 8f3550c to 1813e19 Compare February 4, 2020 09:26
@ale-rt
Copy link
Member

ale-rt commented Feb 8, 2020

@jenkins-plone-org please run jobs

Copy link
Member

@ale-rt ale-rt left a comment

Choose a reason for hiding this comment

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

LGTM
IMO this can be merged also without the other PRs related to the ongoing work in plone.app.discussion.

@mauritsvanrees
Copy link
Member

This indeed seems ready for merge, even without merging the related plone.app.discussion PR.
Jenkins 5.1 fails, but that job should not have been run in the first place: plone.restapi is not used there (the Jenkins error is the plone.restapi is not in sources.cfg).

@plone/restapi-team When convenient, can you merge?

@jensens
Copy link
Member

jensens commented Mar 13, 2020

IMO a minimal change which absolutely makes sense.

@jensens jensens merged commit 93f6db5 into master Mar 13, 2020
@jensens jensens deleted the plone.app.discussion-moderation branch March 13, 2020 15:25
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.

7 participants