Skip to content

chore: gate the sharing dialog search box and keep e2e failure artifacts - #4730

Closed
karolinelien wants to merge 1 commit into
masterfrom
chore/e2e-failure-artifacts
Closed

chore: gate the sharing dialog search box and keep e2e failure artifacts#4730
karolinelien wants to merge 1 commit into
masterfrom
chore/e2e-failure-artifacts

Conversation

@karolinelien

Copy link
Copy Markdown
Contributor

Why

The sharing dialog search box. you change the sharing settings clicks Share view and types into the dialog's search box with nothing in between. That box is disabled while the dialog loads the object's sharing state, and cy.type() does not wait for the disabled state to clear — the CI error carries no Timed out retrying prefix, so it threw immediately rather than after the command timeout. cy.get retried only until the input existed, which it does while still disabled.

Not version specific: the same scenario fails the same way on cypress (2.42, 5) here and on cypress (2.43, 5) on another branch. It is a race.

Failure artifacts. Neither cypress job kept its screenshots or videos. Recording to Cypress Cloud is opt-in via [e2e record] or the e2e record label, and nothing uploaded the local ones — so a failing shard left nothing to look at. One sharing failure on 2.41 is still undiagnosed for exactly this reason.

What

  • Gate the search box with a retrying should('be.enabled'), and scope the lookup to [data-test="sharing-dialog"] the way the newer WorkingListsSharing step already does — the bare [placeholder="Search"] would match any search box on the page.
  • Upload cypress/screenshots and cypress/videos on failure only, 7-day retention, in both the version matrix (e2e-tests.yml) and the dev shards (verify-app.yml).

Verification

Ran TrackerWorkingListsUser.feature against play.im.dhis2.org/stable-2-43-1 with the gate in place: both sharing scenarios pass, including The Program stage custom working can be shared, the one failing in CI. One unrelated scenario fails locally on demo-data counts (Show only teis with active enrollments and unassinged events expects 4 rows, play has 3).

Both workflow files were parsed to confirm the new step lands on the right job with if: failure().

AI Assisted.

`you change the sharing settings` clicked "Share view" and typed into the
dialog's search box with nothing in between. The box is disabled while the
dialog loads the object's sharing state, and `cy.type()` does not wait for
that to clear - the CI error carries no "Timed out retrying" prefix, so it
threw immediately rather than after the command timeout. `cy.get` only
retried until the input existed, which it does while still disabled.

Gate it with a retrying `should('be.enabled')` and scope the lookup to the
dialog, the way the newer WorkingListsSharing step already does - the bare
`[placeholder="Search"]` would match any search box on the page.

This is the failure seen on `cypress (2.42, 5)` and, on another branch, on
`cypress (2.43, 5)` - same scenario, same error, different version, so it is
a race rather than anything version specific.

Neither cypress job kept its screenshots or videos: recording to Cypress
Cloud is opt-in through `[e2e record]` or the `e2e record` label, and nothing
uploaded the local artifacts, so a failing shard left nothing to look at.
Upload them on failure only, with a short retention.

Verified against play stable-2-43-1: both sharing scenarios pass with the
gate in place.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Sep 7, 2026

Copy link
Copy Markdown

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