| @@ -222,9 +222,11 @@ | ||
| 222 | 222 | */ |
| 223 | 223 | protected function _renderActionSettings() { |
| 224 | 224 | global $wp_version; |
| 225 | 225 | $disable_actions = version_compare( $wp_version, '4.7.0', '<' ); |
| 226 | - self::_renderSectionStart( esc_html__( 'Actions', 'visualizer' ), false ); | |
| 226 | + // default open this section when not testing through cypress because cypress expects to click and open each section | |
| 227 | + // and may not like finding a section is already open. | |
| 228 | + self::_renderSectionStart( esc_html__( 'Actions', 'visualizer' ), ! defined( 'TI_CYPRESS_TESTING' ) ); | |
| 227 | 229 | self::_renderCheckboxItem( |
| 228 | 230 | esc_html__( 'Print', 'visualizer' ), |
| 229 | 231 | 'actions[]', |
| 230 | 232 | isset( $this->actions ) && in_array( 'print', $this->actions, true ) ? true : false, |
| @@ -654,10 +656,10 @@ | ||
| 654 | 656 | * @param string $title The title of this group. |
| 655 | 657 | * @param string $html Any additional HTML. |
| 656 | 658 | * @param string $class Any additional classes. |
| 657 | 659 | */ |
| 658 | - public static function _renderGroupStart( $title, $html = '', $class = '' ) { | |
| 659 | - echo '<li class="viz-group ' . $class . '">'; | |
| 660 | + public static function _renderGroupStart( $title, $html = '', $class = '', $id = '' ) { | |
| 661 | + echo '<li id="' . $id . '" class="viz-group ' . $class . '">'; | |
| 660 | 662 | echo '<h3 class="viz-group-title">', $title, '</h3>'; |
| 661 | 663 | echo $html; |
| 662 | 664 | echo '<ul class="viz-group-content">'; |
| 663 | 665 | } |