Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ function radiate_scripts() {
wp_enqueue_script( 'comment-reply' );
}

wp_enqueue_script( 'html5shiv', get_template_directory_uri() . '/js/html5shiv.js', array(), '3.7.3', false );
wp_script_add_data( 'html5shiv', 'conditional', 'lte IE 8' );
// Empty handle kept so scripts that list 'html5shiv' as a dependency still load.
wp_register_script( 'html5shiv', false, array(), wp_get_theme()->get( 'Version' ), false );

}

Expand Down
18 changes: 11 additions & 7 deletions tests/e2e/specs/homepage/front-page-health.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,28 @@ test("skip link is the first Tab stop and targets the content region @fresh @hom
await expect(page.locator("#content")).toHaveCount(1);
});

// Quarantined: not fixed yet and no issue filed. Drop `.fixme` in the PR that fixes it.
/**
* @area homepage
* @tier fresh
* @guards themegrill/radiate-pro#38
* @source human 2026-09-24
* @why functions.php:170 registers html5shiv with
* @why functions.php registered html5shiv with
* wp_script_add_data( 'html5shiv', 'conditional', 'lte IE 8' ), which
* WordPress 6.9+ deprecates, so every front-end page prints a
* "Deprecated: WP_Dependencies->add_data()" notice when WP_DEBUG_DISPLAY
* is on (confirmed on test-theme.local, WP 7.1). Only observable where
* debug display is enabled; on a site with it off this passes regardless.
* Asserts no PHP notice markup in the body, not the absence of html5shiv.
* Asserts no PHP notice markup anywhere in the response (it is printed
* inside <head>), not the absence of html5shiv.
*/
test.fixme("front page prints no PHP notices or deprecations @fresh @homepage", async ({
test("front page prints no PHP notices or deprecations @fresh @homepage", async ({
page,
}) => {
await page.goto("/");
await expect(page.locator("body")).not.toContainText(
/(Deprecated|Notice|Warning|Fatal error):\s/,
// Read the raw response: PHP prints the notice while wp_head() runs, before
// <body>, so a body locator would miss it.
const response = await page.goto("/");
const html = await response!.text();
expect(html).not.toMatch(
/(?:^|>|\s)(?:<b>)?(?:Deprecated|Notice|Warning|Fatal error)(?:<\/b>)?:\s/,
);
});
Loading