Skip to content

Conversation

@priyanshu6238
Copy link
Contributor

@priyanshu6238 priyanshu6238 commented Feb 12, 2026

Summary by CodeRabbit

  • Tests

    • Enabled parallel test execution across three concurrent shards to speed CI.
    • Replaced fixed waits with visibility assertions for more stable end-to-end tests.
    • Adjusted a notification test assertion for improved robustness.
  • Chores

    • Added support for distributed test execution and updated CI to run and label sharded test jobs.

@priyanshu6238 priyanshu6238 changed the title Fix/cypress test 2 testing Feb 12, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 12, 2026

📝 Walkthrough

Walkthrough

This pull request adds Cypress test parallelization by integrating the cypress-split plugin, configuring CI to run three shards, adding the dependency, and adjusting tests to work with the split/parallel setup.

Changes

Cohort / File(s) Summary
CI Configuration
.github/workflows/continuous-integration.yml
Adds a matrix shard dimension (shard: [0,1,2]), fail-fast: false, updates Cypress step name to include shard, and sets env vars SPLIT: 3 and SPLIT_INDEX: ${{ matrix.shard }} to parameterize parallel runs.
Cypress Config
cypress.config.ts.example
Imports and invokes cypress-split in setupNodeEvents (cypressSplit(on, config)) replacing the previous no-op setup and returning the (possibly modified) config.
Tests
cypress/e2e/flow/FlowEditor.spec.ts, cypress/e2e/notification/notification.spec.ts
FlowEditor.spec.ts: add visibility assertion for first input and remove fixed 500ms wait in second input interaction. notification.spec.ts: adjust call-argument indexing from args.0 to args.0.0 when asserting window.open call.
Dependencies
package.json
Adds runtime dependency cypress-split version ^1.24.28 to enable test splitting in CI.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant GH as GitHub Actions
participant CI as CI Job (shard)
participant Cypress as Cypress Runner
participant Plugin as cypress-split
participant Tests as Test Specs
GH->>CI: start job with env SPLIT=3, SPLIT_INDEX=shard
CI->>Cypress: invoke test run (labeled shard)
Cypress->>Plugin: setupNodeEvents (cypressSplit(on, config))
Plugin->>Cypress: return shard-specific test list
Cypress->>Tests: execute assigned specs
Tests-->>CI: report results
CI-->>GH: upload/aggregate results

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 With three small shards I hop and spin,

Splitting tests so feedback's quick and thin.
No waits, no stalls, just parallel cheer,
A twitching nose, CI gains speed here. 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Optimize cypress' is vague and lacks specificity about the actual changes made. Use a more descriptive title that specifically mentions the main change, such as 'Add cypress-split parallelism for Cypress CI runs' or 'Parallelize Cypress tests with sharding'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/cypress_test_2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/continuous-integration.yml:
- Around line 123-131: Update the Cypress run step in the CI workflow (the
"Cypress run (shard ${{ matrix.shard }}/3)" job) to include the dashboard
grouping flags so shards are recorded as one build: add --group with a value
like shard-${{ matrix.shard }}/3 and --ci-build-id using ${{ github.run_id }} to
the existing yarn run cypress run --record --key invocation so each shard is
grouped and associated with the same CI build on Cypress Cloud.
🧹 Nitpick comments (1)
.github/workflows/continuous-integration.yml (1)

27-32: Each shard duplicates the full backend/frontend setup.

The shard matrix causes the entire job — including Postgres, Elixir backend compilation, and frontend build — to run 3 times. This triples CI resource consumption. Consider splitting the workflow into a setup job that builds artifacts, and a test job that uses those artifacts with the shard matrix.

@priyanshu6238 priyanshu6238 changed the title testing cypress -testing Feb 12, 2026
@priyanshu6238 priyanshu6238 self-assigned this Feb 12, 2026
@priyanshu6238 priyanshu6238 changed the title cypress -testing Optimize cypress Feb 12, 2026
Copy link
Member

@mdshamoon mdshamoon left a comment

Choose a reason for hiding this comment

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

LGTM 👍

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.

Optimize CI Integration by Running Tests in Parallel to Reduce Build Time in cypress

2 participants