File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
packages/playground/website/cypress/e2e Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ describe('Blueprints', () => {
15
15
} ,
16
16
{
17
17
step : 'runPHP' ,
18
- code : `<?php
19
- require '/wordpress/wp-load.php';
18
+ code : `<?php
19
+ require '/wordpress/wp-load.php';
20
20
$wp_rewrite->flush_rules();
21
21
` ,
22
22
} ,
@@ -81,4 +81,21 @@ describe('Blueprints', () => {
81
81
. find ( '[aria-label="“Test post” (Edit)"]' )
82
82
. should ( 'exist' ) ;
83
83
} ) ;
84
+
85
+ it . only ( 'PHP Shutdown should work' , ( ) => {
86
+ const blueprint : Blueprint = {
87
+ landingPage : '/wp-admin/' ,
88
+ features : { networking : true } ,
89
+ steps : [
90
+ { step : 'login' } ,
91
+ {
92
+ step : 'writeFile' ,
93
+ path : '/wordpress/wp-content/mu-plugins/rewrite.php' ,
94
+ data : "<?php add_action( 'shutdown', function() { post_message_to_js('test'); } );" ,
95
+ } ,
96
+ ] ,
97
+ } ;
98
+ cy . visit ( '/#' + JSON . stringify ( blueprint ) ) ;
99
+ cy . wordPressDocument ( ) . its ( 'body' ) . should ( 'contain' , 'Dashboard' ) ;
100
+ } ) ;
84
101
} ) ;
You can’t perform that action at this time.
0 commit comments