Skip to content

[test] Add CCv2 Playwright tests#12758

Merged
sfc-gh-bnisco merged 1 commit intodevelopfrom
bnisco/ccv2-stack-35
Oct 25, 2025
Merged

[test] Add CCv2 Playwright tests#12758
sfc-gh-bnisco merged 1 commit intodevelopfrom
bnisco/ccv2-stack-35

Conversation

@sfc-gh-bnisco
Copy link
Copy Markdown
Collaborator

@sfc-gh-bnisco sfc-gh-bnisco commented Oct 10, 2025

Describe your changes

Added end-to-end tests for bidirectional components (CCv2) to validate core functionality and error handling. The tests cover:

  1. Stateful components with persistent state
  2. Trigger-based components for event handling
  3. Form context integration with deferred state updates
  4. Fragment context with partial reruns
  5. Component remounting with state persistence
  6. CSS isolation and styling
  7. Arrow data serialization
  8. Error handling for invalid component configurations

Testing Plan

  • E2E Tests: Added comprehensive Playwright tests that validate all core bidirectional component behaviors including state management, event handling, context integration, and error handling.
  • The tests verify that components correctly maintain state across reruns, handle events properly in different contexts (forms, fragments), and display appropriate error messages when misconfigured.
  • Tests also validate that Arrow data serialization works correctly for passing pandas DataFrames between Python and JavaScript.

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@snyk-io
Copy link
Copy Markdown
Contributor

snyk-io bot commented Oct 10, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link
Copy Markdown
Collaborator Author

sfc-gh-bnisco commented Oct 10, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@sfc-gh-bnisco sfc-gh-bnisco force-pushed the bnisco/ccv2-stack-35 branch 2 times, most recently from 58de33e to 86d90fc Compare October 24, 2025 19:57
@sfc-gh-bnisco sfc-gh-bnisco force-pushed the bnisco/ccv2-stack-34 branch 2 times, most recently from 9b43b26 to 621be66 Compare October 24, 2025 20:01
@sfc-gh-bnisco sfc-gh-bnisco force-pushed the bnisco/ccv2-stack-35 branch 2 times, most recently from da248a3 to fcf1caf Compare October 24, 2025 21:17
sfc-gh-bnisco added a commit that referenced this pull request Oct 24, 2025
## Describe your changes

Added isolated and non-isolated component implementations for the CCv2 widget. This includes:

1. `IsolatedComponent.tsx` - A component that uses Shadow DOM for content isolation
2. `NonIsolatedComponent.tsx` - A component that renders content directly without isolation
3. `styled-components.ts` - Shared styled components for both implementations

The isolated component creates a shadow root for content encapsulation, while the non-isolated version renders directly to a div. Both components use shared hooks for handling HTML, CSS, and JavaScript content.

## GitHub Issue Link (if applicable)

## Testing Plan

- These code paths are tested when they are actually used by the composed component in #12756 and in the e2e tests #12758

---

**Contribution License Agreement**

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.
@sfc-gh-bnisco sfc-gh-bnisco changed the base branch from bnisco/ccv2-stack-34 to graphite-base/12758 October 25, 2025 00:21
Copy link
Copy Markdown
Collaborator Author

sfc-gh-bnisco commented Oct 25, 2025

Merge activity

  • Oct 25, 2:22 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Oct 25, 2:24 AM UTC: Graphite rebased this pull request as part of a merge.
  • Oct 25, 2:48 AM UTC: @sfc-gh-bnisco merged this pull request with Graphite.

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

Labels

change:refactor PR contains code refactoring without behavior change impact:internal PR changes only affect internal code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants