-
Notifications
You must be signed in to change notification settings - Fork 21
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
Theme e2e tests #320
Theme e2e tests #320
Conversation
c101606
to
fe8ce08
Compare
fe8ce08
to
0f9bbfd
Compare
50500dc
to
b1ae371
Compare
7064fbd
to
469c6d7
Compare
469c6d7
to
ddaa0c9
Compare
Note there are some blocks which are skipped in e2e for 5.6 and 5.7 where they break. We have not added logic to skip that from build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PatelUtkarsh Just a couple questions, everything else looks good to me
@@ -80,7 +80,7 @@ public function action_register_blocks() { | |||
$args ['render_callback'] = [ static::class, 'render' ]; | |||
} | |||
|
|||
register_block_type( $folder, $args ); | |||
register_block_type_from_metadata( $folder, $args ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PatelUtkarsh afaik register_block_type
calls register_block_type_from_metadata
and it's the preferred method, is this for legacy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes for legacy WP 5.6.
@@ -26,7 +26,7 @@ | |||
global $_theme_files; | |||
$_theme_files = []; | |||
|
|||
$_theme_root = realpath( __DIR__ . '/..' ); | |||
$_theme_root = 'material-design-google'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible the root of the theme can change? Maybe the user changes the folder name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here (in bin/php-tests.sh
) we are setting soft link from theme to installed WP:
Which requires theme root to be hard-coded as otherwise it will come as theme
.
Co-authored-by: Mario Aguiar <mario.aguiar@xwp.co>
Summary
Fixes #317
Checklist