diff --git a/CustomBlockManagerPlugin.php b/CustomBlockManagerPlugin.php index 7de8848..89f433f 100644 --- a/CustomBlockManagerPlugin.php +++ b/CustomBlockManagerPlugin.php @@ -126,7 +126,7 @@ public function getActions($request, $actionArgs): array 'category' => $this->getCategory(), 'action' => 'index' ]), - $this->getDisplayName() + $this->getDisplayName(), ); return array_merge([new LinkAction('settings', $ajaxModal, __('plugins.generic.customBlockManager.manage'))], $actions); } diff --git a/controllers/grid/CustomBlockGridHandler.php b/controllers/grid/CustomBlockGridHandler.php index 9738a32..a82804d 100644 --- a/controllers/grid/CustomBlockGridHandler.php +++ b/controllers/grid/CustomBlockGridHandler.php @@ -106,7 +106,6 @@ public function initialize($request, $args = null) new AjaxModal( $router->url($request, null, null, 'addCustomBlock'), __('plugins.generic.customBlockManager.addBlock'), - 'modal_add_item' ), __('plugins.generic.customBlockManager.addBlock'), 'add_item' diff --git a/controllers/grid/CustomBlockGridRow.php b/controllers/grid/CustomBlockGridRow.php index 3b36bd1..aea7636 100644 --- a/controllers/grid/CustomBlockGridRow.php +++ b/controllers/grid/CustomBlockGridRow.php @@ -46,7 +46,7 @@ public function initialize($request, $template = null) new AjaxModal( $router->url($request, null, null, 'editCustomBlock', null, ['blockName' => $blockName]), __('grid.action.edit'), - 'modal_edit', + null, true ), __('grid.action.edit'), @@ -63,7 +63,7 @@ public function initialize($request, $template = null) __('common.confirmDelete'), __('grid.action.delete'), $router->url($request, null, null, 'deleteCustomBlock', null, ['blockName' => $blockName]), - 'modal_delete' + 'negative' ), __('grid.action.delete'), 'delete' diff --git a/cypress/tests/functional/CustomBlocks.cy.js b/cypress/tests/functional/CustomBlocks.cy.js index 426b5f0..38e521d 100644 --- a/cypress/tests/functional/CustomBlocks.cy.js +++ b/cypress/tests/functional/CustomBlocks.cy.js @@ -36,12 +36,11 @@ describe('Custom Block Manager plugin tests', function() { cy.wait(500); // Make sure the form has closed cy.get('[role="dialog"] button:contains(\'Close\')').click(); - // FIXME: The settings area has to be reloaded before the new block will appear.a - // This click should be unnecessary. - cy.get('nav').contains('Settings').click(); - // Ensure submenu item click despite animation - cy.get('nav').contains('Website').click({ force: true }); - cy.get('#appearance > .pkpTabs > .pkpTabs__buttons > #appearance-setup-button').click(); + cy.reload(); + cy.waitJQuery(); + + cy.get('button[id="appearance-button"]').click(); + cy.get('#appearance-setup-button').click(); cy.get('#appearance-setup span:contains("test-custom-block"):first').click(); cy.get('#appearance-setup button:contains("Save")').click(); cy.waitJQuery();