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

Add: End 2 End tests on the sidebar permalink editor for CPT's. #13060

Merged
merged 5 commits into from
Dec 21, 2018

Conversation

jorgefilipecosta
Copy link
Member

Description

This PR adds a series of tests testing if the sidebar panel should appear in several different combinations of CPT's containing different values for public and public queryable.

Should have failed on the bug #12482 meanwhile solved on #12884.

How has this been tested?

I execute the end 2 end tests and verified they pass.

@jorgefilipecosta jorgefilipecosta added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label Dec 21, 2018
Copy link
Member

@tofumatt tofumatt left a comment

Choose a reason for hiding this comment

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

Looks good to me once tests pass. Just a few little comments but nothing major 👍

@@ -0,0 +1,45 @@
<?php
/**
* Plugin Name: Gutenberg Test Custom CPTS
Copy link
Member

Choose a reason for hiding this comment

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

Does CPTS stand for Custom Post Types? I dunno what it stands for so we should probably explain it 😄



add_action( 'init', function() {
register_post_type( 'public_q_public', [
Copy link
Member

Choose a reason for hiding this comment

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

It might be easier to read these/the test suites if these were expanded a bit. Maybe:

  • view_public_query_public
  • view_notPublic_query_public

etc...

* @package gutenberg-test-custom-cpts
*/

add_action( 'init', function() {
Copy link
Member

Choose a reason for hiding this comment

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

Looks like there are a bunch of PHPCS errors here. Are these spaces you're using?! 😉

@tofumatt
Copy link
Member

Oops, thanks for the further indent fixes; I was just guessing. The PHPCS rules are kinda odd to me 😄

@jorgefilipecosta jorgefilipecosta force-pushed the add/end-2-end-tests-sidebar-panel-cpts branch from 19a1c59 to aabfc58 Compare December 21, 2018 18:49
@jorgefilipecosta jorgefilipecosta force-pushed the add/end-2-end-tests-sidebar-panel-cpts branch from aabfc58 to 5aad5bb Compare December 21, 2018 19:00
@jorgefilipecosta jorgefilipecosta merged commit d8f3ec3 into master Dec 21, 2018
@jorgefilipecosta jorgefilipecosta deleted the add/end-2-end-tests-sidebar-panel-cpts branch December 21, 2018 19:21
@jorgefilipecosta
Copy link
Member Author

Thank you for the review @tofumatt all the feedback was applied before the merge.

While I was editing the commit title I pressed enter by error and the commit got a wrong title, I'm sorry for that :(

@jorgefilipecosta jorgefilipecosta changed the title Add: End 2 End tests on the sidebar link panel for CPT's. Add: End 2 End tests on the sidebar permalink editor for CPT's. Dec 21, 2018
@tofumatt
Copy link
Member

While I was editing the commit title I pressed enter by error and the commit got a wrong title, I'm sorry for that :(

I've been there before many times; no worries 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants