Skip to content

test: implement screen-shooter integration tests#1241

Open
shadowusr wants to merge 3 commits intousers/shadowusr/TESTPLANE-672.screen-shooter-rewritefrom
users/shadowusr/TESTPLANE-672.screen-shooter-integration-tests
Open

test: implement screen-shooter integration tests#1241
shadowusr wants to merge 3 commits intousers/shadowusr/TESTPLANE-672.screen-shooter-rewritefrom
users/shadowusr/TESTPLANE-672.screen-shooter-integration-tests

Conversation

@shadowusr
Copy link
Copy Markdown
Member

What's done?

  • Implemented integrations tests for element screen shooter, based on Testplane Standalone API

Copy link
Copy Markdown

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

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: b59ef68b70

ℹ️ 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".

Comment on lines +155 to +158
const actualImagePath = path.join(__dirname, "screens", "dynamic-sticky-menu-safe-area.png");
await image.save(actualImagePath);

const expectedImagePath = path.join(SCREENSHOTS_PATH, "dynamic-sticky-menu-safe-area.png");
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 Save actual screenshots outside reference snapshots

actualImagePath is set to __dirname/screens/...png, which is the same file later used as expectedImagePath; this makes looksSame(actualImagePath, expectedImagePath) a self-compare that will always pass and silently overwrites the checked-in baseline on every run. The same pattern appears in other cases in this file, so these tests cannot catch regressions in screenshot output.

Useful? React with 👍 / 👎.

Comment on lines +220 to +223
_.set(browserConfig.desiredCapabilities, "goog:chromeOptions", {
args: [
"--force-device-scale-factor=3",
"--high-dpi-support=1",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restrict Chrome-specific capabilities to Chrome runs

This test unconditionally injects goog:chromeOptions into browserConfig, but the integration workflow runs with BROWSER=firefox too; in firefox jobs this either causes session-creation errors or runs without applying the intended fractional-scroll emulation, so the test becomes unreliable/non-representative across the matrix. Guard this setup by browser name (or skip the case for non-Chrome browsers).

Useful? React with 👍 / 👎.

@DudaGod DudaGod self-assigned this Apr 15, 2026
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.

2 participants