Skip to content

fix(ci): replace canvas CSS selector with URL check in test_01_open_flow - #217

Merged
lice-reis merged 2 commits into
mainfrom
fix/migration-ui-url-check
May 11, 2026
Merged

fix(ci): replace canvas CSS selector with URL check in test_01_open_flow#217
lice-reis merged 2 commits into
mainfrom
fix/migration-ui-url-check

Conversation

@lice-reis

Copy link
Copy Markdown
Collaborator

Problem

test_01_open_flow kept failing across multiple fix attempts because all CSS selectors for the flow canvas (.react-flow, [class*='react-flow'], node selectors) are tied to ReactFlow internals that change across library versions. Tests 02–06 pass because they use text/attribute selectors, not canvas CSS classes.

Fix

Replaced the canvas visibility check with two version-independent assertions:

  1. expect(self.page).to_have_url(re.compile(flow_id)) — verifies the page didn't redirect to home/login
  2. wait_for_selector("body > *") — verifies the page rendered content (not blank)

This is resilient to any ReactFlow or Langflow UI refactors.

🤖 Generated with Claude Code

lice-reis and others added 2 commits May 11, 2026 16:18
CSS class selectors (.react-flow, [class*='react-flow']) are brittle across
ReactFlow version bumps. Replaced with a URL assertion (flow_id in URL)
which is version-independent and verifies the page actually loaded the
correct flow without redirecting to home or login.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… (visible)

The previous selector body > * resolved to the <noscript> element first,
which is never visible when JS is enabled — causing a timeout every run.
Switch to body > div with state=attached so the check passes as soon as
the React root div is present in the DOM.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lice-reis
lice-reis merged commit 5d3d73c into main May 11, 2026
3 checks passed
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