Skip to content

fix: wait for stop button visibility before clicking in E2E test#7677

Open
abhnish wants to merge 1 commit into
sugarlabs:masterfrom
abhnish:fix/cypress-stop-button-visibility
Open

fix: wait for stop button visibility before clicking in E2E test#7677
abhnish wants to merge 1 commit into
sugarlabs:masterfrom
abhnish:fix/cypress-stop-button-visibility

Conversation

@abhnish

@abhnish abhnish commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes a flaky Cypress E2E test in main.cy.js where cy.get("#stop").click()
was called immediately after clicking play, without waiting for the stop
button to become visible.

The stop button has display: none by default and only appears after the
program starts running. Adding .should("be.visible") before .click()
tells Cypress to wait until the button is visible before interacting with it,
eliminating the timing-dependent failure.

Related Issue

N/A — pre-existing test flakiness, not tied to a specific issue.

Category

  • Bug Fix

Type of Change

  • Bug Fix

Testing Performed

  1. Change is a one-line addition of .should("be.visible") before .click().
  2. No app logic touched — test file only.

PR Checklist

  • My changes generate no new warnings or console errors
  • I have checked for and resolved any merge conflicts

@github-actions github-actions Bot added bug fix Fixes a bug or incorrect behavior size/XS Extra small: < 10 lines changed area/tests Changes to test files labels Jun 28, 2026
@codecov

codecov Bot commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.94%. Comparing base (eb2c25b) to head (7163b7d).
⚠️ Report is 55 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7677   +/-   ##
=======================================
  Coverage   51.94%   51.94%           
=======================================
  Files         169      169           
  Lines       56826    56826           
=======================================
  Hits        29519    29519           
  Misses      27307    27307           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

This PR has merge conflicts with master.

Please rebase your branch:

# Add upstream remote (one-time setup)
git remote add upstream https://github.com/sugarlabs/musicblocks.git

# Fetch latest master and rebase
git fetch upstream
git rebase upstream/master

# Resolve any conflicts, then:
git push --force-with-lease origin YOUR_BRANCH

Tip: Enable "Allow edits from maintainers" on this PR so we can auto-rebase for you next time. This only grants access to your PR branch. Your fork's other branches are not affected.

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

Labels

area/tests Changes to test files bug fix Fixes a bug or incorrect behavior needs-rebase size/XS Extra small: < 10 lines changed

Projects

Development

Successfully merging this pull request may close these issues.

1 participant