Skip to content

Commit

Permalink
Add ticket comments for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed May 29, 2024
1 parent 63ef957 commit 0ab91d1
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/phpunit/tests/block-supports/wpGetLayoutStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Tests_Block_Supports_WpGetLayoutStyle extends WP_UnitTestCase {
/**
* @dataProvider data_wp_get_layout_style
* @ticket 56467
* @ticket 61165
*
* @param array $args Dataset to test.
* @param string $expected_output The expected output.
Expand Down
7 changes: 7 additions & 0 deletions tests/phpunit/tests/theme/wpAddGlobalStylesForBlocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function tear_down() {

/**
* @ticket 56915
* @ticket 61165
*/
public function test_third_party_blocks_inline_styles_not_register_to_global_styles() {
switch_theme( 'block-theme' );
Expand All @@ -52,6 +53,7 @@ public function test_third_party_blocks_inline_styles_not_register_to_global_sty

/**
* @ticket 56915
* @ticket 61165
*/
public function test_third_party_blocks_inline_styles_get_registered_to_global_styles() {
$this->set_up_third_party_block();
Expand All @@ -75,6 +77,7 @@ public function test_third_party_blocks_inline_styles_get_registered_to_global_s

/**
* @ticket 56915
* @ticket 61165
*/
public function test_third_party_blocks_inline_styles_get_registered_to_global_styles_when_per_block() {
$this->set_up_third_party_block();
Expand All @@ -99,6 +102,7 @@ public function test_third_party_blocks_inline_styles_get_registered_to_global_s

/**
* @ticket 56915
* @ticket 61165
*/
public function test_third_party_blocks_inline_styles_get_rendered_when_per_block() {
$this->set_up_third_party_block();
Expand All @@ -124,6 +128,7 @@ public function test_third_party_blocks_inline_styles_get_rendered_when_per_bloc

/**
* @ticket 56915
* @ticket 61165
*/
public function test_blocks_inline_styles_get_rendered() {
wp_register_style( 'global-styles', false, array(), true, true );
Expand All @@ -146,6 +151,7 @@ public function test_blocks_inline_styles_get_rendered() {

/**
* @ticket 57868
* @ticket 61165
*/
public function test_third_party_blocks_inline_styles_for_elements_get_rendered_when_per_block() {
$this->set_up_third_party_block();
Expand All @@ -165,6 +171,7 @@ public function test_third_party_blocks_inline_styles_for_elements_get_rendered_

/**
* @ticket 57868
* @ticket 61165
*/
public function test_third_party_blocks_inline_styles_for_elements_get_rendered() {
wp_register_style( 'global-styles', false, array(), true, true );
Expand Down
35 changes: 35 additions & 0 deletions tests/phpunit/tests/theme/wpThemeJson.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ public function test_get_settings_appearance_false_does_not_opt_in() {
* @ticket 58550
* @ticket 60365
* @ticket 60936
* @ticket 61165
*/
public function test_get_stylesheet() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -573,6 +574,7 @@ public function test_get_stylesheet() {
* @ticket 54336
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_stylesheet_support_for_shorthand_and_longhand_values() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -619,6 +621,7 @@ public function test_get_stylesheet_support_for_shorthand_and_longhand_values()
* @ticket 54336
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_stylesheet_skips_disabled_protected_properties() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -654,6 +657,7 @@ public function test_get_stylesheet_skips_disabled_protected_properties() {
* @ticket 58548
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_stylesheet_renders_enabled_protected_properties() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -713,6 +717,7 @@ public function test_get_stylesheet_preset_classes_work_with_compounded_selector
* @ticket 54336
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_stylesheet_preset_rules_come_after_block_rules() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -806,6 +811,7 @@ public function test_get_stylesheet_generates_proper_classes_and_css_vars_from_s
* @ticket 54336
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_stylesheet_preset_values_are_marked_as_important() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -849,6 +855,7 @@ public function test_get_stylesheet_preset_values_are_marked_as_important() {
* @ticket 56467
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_stylesheet_handles_whitelisted_element_pseudo_selectors() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -897,6 +904,7 @@ public function test_get_stylesheet_handles_whitelisted_element_pseudo_selectors
* @ticket 56467
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_stylesheet_handles_only_pseudo_selector_rules_for_given_property() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -941,6 +949,7 @@ public function test_get_stylesheet_handles_only_pseudo_selector_rules_for_given
* @ticket 56467
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_stylesheet_ignores_pseudo_selectors_on_non_whitelisted_elements() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -985,6 +994,7 @@ public function test_get_stylesheet_ignores_pseudo_selectors_on_non_whitelisted_
* @ticket 56467
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_stylesheet_ignores_non_whitelisted_pseudo_selectors() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -1030,6 +1040,7 @@ public function test_get_stylesheet_ignores_non_whitelisted_pseudo_selectors() {
* @ticket 56467
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_stylesheet_handles_priority_of_elements_vs_block_elements_pseudo_selectors() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -1082,6 +1093,7 @@ public function test_get_stylesheet_handles_priority_of_elements_vs_block_elemen
* @ticket 56467
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_stylesheet_handles_whitelisted_block_level_element_pseudo_selectors() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -1135,6 +1147,7 @@ public function test_get_stylesheet_handles_whitelisted_block_level_element_pseu
* @ticket 58548
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_stylesheet_generates_layout_styles() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -1170,6 +1183,7 @@ public function test_get_stylesheet_generates_layout_styles() {
* @ticket 58548
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_stylesheet_generates_layout_styles_with_spacing_presets() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -1204,6 +1218,7 @@ public function test_get_stylesheet_generates_layout_styles_with_spacing_presets
* @ticket 56467
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_stylesheet_generates_fallback_gap_layout_styles() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -1240,6 +1255,7 @@ public function test_get_stylesheet_generates_fallback_gap_layout_styles() {
* @ticket 58550
* @ticket 60936
* @ticket 60981
* @ticket 61165
*/
public function test_get_stylesheet_generates_base_fallback_gap_layout_styles() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -1297,6 +1313,7 @@ public function test_get_stylesheet_skips_layout_styles() {
* @ticket 56467
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_stylesheet_generates_valid_block_gap_values_and_skips_null_or_false_values() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -1352,6 +1369,7 @@ public function test_get_stylesheet_generates_valid_block_gap_values_and_skips_n
* @ticket 57354
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_stylesheet_returns_outline_styles() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -1392,6 +1410,7 @@ public function test_get_stylesheet_returns_outline_styles() {
* Tests that a custom root selector is correctly applied when generating a stylesheet.
*
* @ticket 60343
* @ticket 61165
*/
public function test_get_stylesheet_custom_root_selector() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -1421,6 +1440,7 @@ public function test_get_stylesheet_custom_root_selector() {
* Tests that settings passed to WP_Theme_JSON override merged theme data.
*
* @ticket 61118
* @ticket 61165
*/
public function test_get_stylesheet_generates_fluid_typography_values() {
register_block_type(
Expand Down Expand Up @@ -3614,6 +3634,7 @@ public function test_get_element_class_name_invalid() {
* @ticket 56467
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_property_value_valid() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -3697,6 +3718,7 @@ public function data_get_property_value_should_return_string_for_invalid_paths_o
* @ticket 56467
* @ticket 58550
* @ticket 60936
* @ticket 61165
* @expectedIncorrectUsage get_property_value
*/
public function test_get_property_value_loop() {
Expand Down Expand Up @@ -3734,6 +3756,7 @@ public function test_get_property_value_loop() {
* @ticket 56467
* @ticket 58550
* @ticket 60936
* @ticket 61165
* @expectedIncorrectUsage get_property_value
*/
public function test_get_property_value_recursion() {
Expand Down Expand Up @@ -3770,6 +3793,7 @@ public function test_get_property_value_recursion() {
* @ticket 56467
* @ticket 58550
* @ticket 60936
* @ticket 61165
* @expectedIncorrectUsage get_property_value
*/
public function test_get_property_value_self() {
Expand All @@ -3796,6 +3820,7 @@ public function test_get_property_value_self() {
* @ticket 58550
* @ticket 60936
* @ticket 61304
* @ticket 61165
*/
public function test_get_styles_for_block_with_padding_aware_alignments() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -3832,6 +3857,7 @@ public function test_get_styles_for_block_with_padding_aware_alignments() {
* @ticket 56467
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_styles_for_block_without_padding_aware_alignments() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -3864,6 +3890,7 @@ public function test_get_styles_for_block_without_padding_aware_alignments() {
/**
* @ticket 56467
* @ticket 58550
* @ticket 61165
*/
public function test_get_styles_for_block_with_content_width() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -3894,6 +3921,7 @@ public function test_get_styles_for_block_with_content_width() {
* @ticket 58548
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_styles_with_appearance_tools() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -4275,6 +4303,7 @@ public function data_sanitize_with_invalid_style_variation() {

/**
* @ticket 57583
* @ticket 61165
*
* @dataProvider data_get_styles_for_block_with_style_variations
*
Expand Down Expand Up @@ -4825,6 +4854,7 @@ public function data_set_spacing_sizes_when_invalid() {
* @ticket 56903
* @ticket 58550
* @ticket 60936
* @ticket 61165
*
* @dataProvider data_update_separator_declarations
*
Expand Down Expand Up @@ -4946,6 +4976,7 @@ public function test_shadow_preset_styles() {
* @ticket 57559
* @ticket 58550
* @ticket 60936
* @ticket 61165
*/
public function test_get_shadow_styles_for_blocks() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -4989,6 +5020,7 @@ public function test_get_shadow_styles_for_blocks() {
* Tests that theme background image styles are correctly generated.
*
* @ticket 61123
* @ticket 61165
*/
public function test_get_top_level_background_image_styles() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -5054,6 +5086,7 @@ public function test_get_top_level_background_image_styles() {

/**
* @ticket 57536
* @ticket 61165
*/
public function test_get_custom_css_handles_global_custom_css() {
$theme_json = new WP_Theme_JSON(
Expand Down Expand Up @@ -5148,6 +5181,8 @@ public function data_custom_css_for_user_caps() {
}

/**
* @ticket 61165
*
* @dataProvider data_process_blocks_custom_css
*
* @param array $input An array containing the selector and css to test.
Expand Down

0 comments on commit 0ab91d1

Please sign in to comment.