Skip to content

Mobile/amp tests: Potential fixes for 4 code quality findings - #359

Draft
patmmccann wants to merge 4 commits into
masterfrom
ai-findings-autofix/test-spec-mobileAndAmpRender_spec.js
Draft

Mobile/amp tests: Potential fixes for 4 code quality findings#359
patmmccann wants to merge 4 commits into
masterfrom
ai-findings-autofix/test-spec-mobileAndAmpRender_spec.js

Conversation

@patmmccann

@patmmccann patmmccann commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

This PR applies 4/4 suggestions from code quality AI findings.

Screenshot_20260701-093737

patmmccann and others added 4 commits July 1, 2026 09:37
…lot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…lot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…lot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
…lot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@patmmccann patmmccann changed the title Potential fixes for 4 code quality findings Mobile/amp tests: Potential fixes for 4 code quality findings Jul 1, 2026
@patmmccann
patmmccann marked this pull request as ready for review July 1, 2026 13:38

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0d1e4934fc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const markup = '<script>window.testScriptExecuted=true;</script>'
writeAdHtml(markup);
const ps = sinon.stub();
writeAdHtml(markup, ps);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use real postscribe when asserting script execution

Passing a sinon.stub() here means writeAdHtml only calls the fake postscribe function; it no longer appends the markup or executes the inline script. In the Karma browser test, window.testScriptExecuted therefore remains unset and the newly added assertion setup makes this test fail whenever the suite runs. Keep the real postscribe path for the execution check, or have the fake actually insert/evaluate the markup.

Useful? React with 👍 / 👎.

@patmmccann
patmmccann marked this pull request as draft July 1, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant