Skip to content

Add bubble chart e2e#2242

Open
leonardomendix wants to merge 3 commits into
mainfrom
test/bubble-chart-e2e
Open

Add bubble chart e2e#2242
leonardomendix wants to merge 3 commits into
mainfrom
test/bubble-chart-e2e

Conversation

@leonardomendix
Copy link
Copy Markdown
Collaborator

Pull request type

Test related change (New E2E test, test automation, etc.)


Description

Add bubble chart e2e using mxcli CC command e2e workflow(#2240)

@leonardomendix leonardomendix requested a review from a team as a code owner June 2, 2026 13:19
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

AI Code Review

🔶 Changes requested — one or more medium-severity items must be addressed


What was reviewed

File Change
packages/pluggableWidgets/bubble-chart-web/e2e/BubbleChart.spec.js New E2E spec with 14 screenshot tests across 6 describe groups
packages/pluggableWidgets/bubble-chart-web/package.json Added e2e/e2edev scripts and @mendix/run-e2e devDependency
packages/pluggableWidgets/bubble-chart-web/playwright.config.cjs New Playwright config inheriting from @mendix/run-e2e

Skipped (out of scope): pnpm-lock.yaml

Note: gh pr checks required interactive approval — CI status could not be retrieved automatically.


Findings

🔶 Medium — Screenshot baselines not committed

File: packages/pluggableWidgets/bubble-chart-web/e2e/BubbleChart.spec.js lines 16, 29, 44, 57, 73, 86, 101, 115, 130, 144, 159, 173, 185, (all toHaveScreenshot calls)

Problem: All 14 tests call toHaveScreenshot("bubbleChart*.png") but the corresponding e2e/BubbleChart.spec.js-snapshots/ directory with PNG baselines does not exist in this PR. Playwright fails immediately when no baseline is present — it cannot diff against a missing file, so every snapshot test will error on CI with "Missing expected screenshot". Compare: packages/pluggableWidgets/line-chart-web/e2e/LineChart.spec.js-snapshots/ contains committed PNGs for every test.

Fix: Generate and commit the baseline screenshots:

# From the bubble-chart-web package directory
pnpm run e2e -- --update-snapshots
# Then commit the generated e2e/BubbleChart.spec.js-snapshots/*.png files
git add packages/pluggableWidgets/bubble-chart-web/e2e/BubbleChart.spec.js-snapshots/
git commit -m "test(bubble-chart-web): add e2e screenshot baselines"

⚠️ Low — Redundant waitForMendixApp call in beforeEach

File: packages/pluggableWidgets/bubble-chart-web/e2e/BubbleChart.spec.js line 6

Note: The test fixture imported from @mendix/run-e2e/fixtures already patches page.goto to call waitForMendixApp internally before resolving. Calling it again explicitly after await page.goto("/") means the Mendix-ready check runs twice per test. Not harmful, but redundant. The pattern in line-chart-web omits the explicit call:

test.beforeEach(async ({ page }) => {
    await page.goto("/");
    // waitForMendixApp is called automatically by the patched page.goto in fixtures
});

Positives

  • All element locators use .mx-name-* selectors — the most stable option available in Mendix E2E tests.
  • Test groups (bubble color, bubble size, data series, legend, axis label, grid lines) map cleanly to widget configuration axes, making it easy to trace failures to a feature area.
  • { retry: 3 } on every screenshot test is a practical guard against chart-rendering flakiness in CI.
  • playwright.config.cjs correctly delegates to @mendix/run-e2e/playwright.config.cjs — no config drift risk.
  • Session management is correctly handled: the extended test fixture from @mendix/run-e2e/fixtures performs window.mx.session.logout() at worker teardown, satisfying the session-limit requirement without needing an explicit afterEach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant