diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 06aff74eac8..4688b044b7e 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -7,6 +7,10 @@ _Released 12/2/2025 (PENDING)_ - Improved performance when viewing command snapshots in the Command Log. Element highlighting is now significantly faster, especially when highlighting multiple elements or complex pages. This is achieved by reducing redundant style calculations and batching DOM operations to minimize browser reflows. Addressed in [#32951](https://github.com/cypress-io/cypress/pull/32951). +**Bugfixes:** + +- Fixed an issue where a ` + +describe('http/util/rewriter', () => { + describe('.top-level tests', () => { + it('just a script tag', async () => { + expect(await html('', {} as any, injected)) + .toEqual(`${injected} `) + }) + + it('script tag before a html tag', async () => { + expect(await html('Test HTML', {} as any, injected)) + .toEqual(`${injected} Test HTML`) + }) + + it('script tag after a html tag', async () => { + expect(await html('Test HTML', {} as any, injected)) + .toEqual(` ${injected} Test HTML`) + }) + + it('script tag inside head tag with no body tag', async () => { + expect(await html('', {} as any, injected)) + .toEqual(` ${injected}`) + }) + + it('script tag inside head tag with a body tag', async () => { + expect(await html('Example Body', {} as any, injected)) + .toEqual(` ${injected}Example Body`) + }) + + it('script tag inside body tag with no head tag', async () => { + expect(await html('', {} as any, injected)) + .toEqual(` ${injected} `) + }) + + it('script tag inside body tag with a head tag', async () => { + expect(await html('Original Head', {} as any, injected)) + .toEqual(` ${injected}Original Head`) + }) + }) +})