From 2f9561349bded00d3e53646fcfd21e187226fc8d Mon Sep 17 00:00:00 2001 From: selul Date: Fri, 22 Nov 2024 23:04:46 +0200 Subject: [PATCH] fix e2e --- .../specs/customizer/general/custom-global-colors.spec.ts | 1 + .../specs/customizer/layout/single-post-settings.spec.ts | 1 - inc/customizer/options/layout_sidebar.php | 6 +++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts b/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts index 6a71257c4a..7b54963d32 100644 --- a/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts +++ b/e2e-tests/specs/customizer/general/custom-global-colors.spec.ts @@ -35,6 +35,7 @@ test.describe('Custom Global Color Control', () => { await page.locator('.block-editor-rich-text__editable').first().click(); // use Background color control to open the color picker, available since WP 6.1 + await page.getByRole('tab', { name: 'Style' }).click(); await page.getByRole('button', { name: 'Background' }).click(); await page.getByRole('option', { name: 'Color: Custom 1' }).click(); await page diff --git a/e2e-tests/specs/customizer/layout/single-post-settings.spec.ts b/e2e-tests/specs/customizer/layout/single-post-settings.spec.ts index ad616214de..fe3c000132 100644 --- a/e2e-tests/specs/customizer/layout/single-post-settings.spec.ts +++ b/e2e-tests/specs/customizer/layout/single-post-settings.spec.ts @@ -320,7 +320,6 @@ test.describe('Single Post Check', function () { }); await page.goto('/template-comments/?test_name=metaOrder'); - await page.screenshot({ path: 'metaOrder.png' }); const metaOrder = ['category', 'date', 'comments', 'author']; await checkElementsOrder(page, '.nv-meta-list', metaOrder); diff --git a/inc/customizer/options/layout_sidebar.php b/inc/customizer/options/layout_sidebar.php index 0ac6a54954..9ad0a3f802 100644 --- a/inc/customizer/options/layout_sidebar.php +++ b/inc/customizer/options/layout_sidebar.php @@ -182,7 +182,11 @@ private function sidebar_layout_choices( $control_id ) { return $options; } - + /** + * Retrieve the advanced controls for the sidebar layout. + * + * @return array The array of advanced controls. + */ public function get_advanced_controls() { if ( empty( $this->advanced_controls ) ) { $this->advanced_controls = [