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

Tests: Enable post type UI for templates and template parts #38486

Merged
merged 3 commits into from Feb 3, 2022

Conversation

Mamaduka
Copy link
Member

@Mamaduka Mamaduka commented Feb 3, 2022

Description

Core fully disabled UI for Templates and Template Parts post types. It caused e2e test failures since we still rely on UI to delete them.

PR adds mu-plugin to override post-registration arguments and enable UI for e2e tests. However, this is a short-term solution. I think we should use REST API to delete templates, similar to #33414.

Testing Instructions

All tests should pass.

Types of changes

Bugfix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).
  • I've updated related schemas if appropriate.

@Mamaduka Mamaduka self-assigned this Feb 3, 2022
@Mamaduka Mamaduka added [Type] Bug An existing feature does not function as intended [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. labels Feb 3, 2022
@Mamaduka
Copy link
Member Author

Mamaduka commented Feb 3, 2022

@kevin940726 and @talldan, what do you think about adopting the REST API method for template deletion?

@ntsekouras
Copy link
Contributor

I want Prettier for PHP

If you're using VS code there is this one: https://marketplace.visualstudio.com/items?itemName=ValeryanM.vscode-phpsab

@ntsekouras
Copy link
Contributor

However, this is a short-term solution. I think we should use REST API to delete templates, similar to #33414.

I think we should do that instead of the filter, yes.

@Mamaduka
Copy link
Member Author

Mamaduka commented Feb 3, 2022

I've got a very WIP version of the REST API solution. Decide to push this fix variation since failing e2e usually blocks people's work.

Copy link
Contributor

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

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

Let's land to unblock, but have quick follow ups with REST api calls. Thanks George!

@Mamaduka
Copy link
Member Author

Mamaduka commented Feb 3, 2022

Sounds good 👍 I will try to finish REST API PR tomorrow.

@Mamaduka Mamaduka merged commit 4aa3187 into trunk Feb 3, 2022
@Mamaduka Mamaduka deleted the fix/e2e-tests-enable-templates-ui branch February 3, 2022 14:54
@github-actions github-actions bot added this to the Gutenberg 12.6 milestone Feb 3, 2022
SiobhyB pushed a commit that referenced this pull request Feb 3, 2022
* Tests: Enable post type UI for templates and template parts
* Only enable UI for block themes
mchowning added a commit that referenced this pull request Feb 3, 2022
* Release script: Update react-native-editor version to 1.71.0

* Release script: Update with changes from 'npm run core preios'

* Updare CHANGELOG to reflect changes in  1.71.0

* Tests: Enable post type UI for templates and template parts (#38486)

* Tests: Enable post type UI for templates and template parts
* Only enable UI for block themes

* Mobile - Rich Text - Validate link colors (#38474)

* Mobile - Rich Text - Validate link colors

* Mobile - Rich Text - Update naming to match prop

Co-authored-by: George Mamadashvili <georgemamadashvili@gmail.com>
Co-authored-by: Gerardo Pacheco <gerardo.pacheco@automattic.com>
Co-authored-by: Matt Chowning <mchowning@gmail.com>
mchowning added a commit that referenced this pull request Feb 11, 2022
* Release script: Update react-native-editor version to 1.71.0

* Release script: Update with changes from 'npm run core preios'

* Updare CHANGELOG to reflect changes in  1.71.0

* Tests: Enable post type UI for templates and template parts (#38486)

* Tests: Enable post type UI for templates and template parts
* Only enable UI for block themes

* Mobile - Rich Text - Validate link colors (#38474)

* Mobile - Rich Text - Validate link colors

* Mobile - Rich Text - Update naming to match prop

* Release script: Update react-native-editor version to 1.71.1

* Release script: Update with changes from 'npm run core preios'

* [RNMobile] Highlight text: Check if style attribute value is defined during filtering (#38670)

* Check if style value is defined before removing extra spaces

* Add test case for old text color format

* Update react-native-editor changelog

* Update CHANGELOG with 1.71.1 changes

* Fix incorrect CHANGELOG entry from previous commit

Co-authored-by: Siobhan <siobhan@automattic.com>
Co-authored-by: George Mamadashvili <georgemamadashvili@gmail.com>
Co-authored-by: Gerardo Pacheco <gerardo.pacheco@automattic.com>
Co-authored-by: Carlos Garcia <fluiddot@gmail.com>
Mamaduka added a commit that referenced this pull request Feb 16, 2022
* Tests: Enable post type UI for templates and template parts
* Only enable UI for block themes
@Mamaduka
Copy link
Member Author

Cherry-picked this commit to wp/5.9 for e2e tests to work.

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. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants