Skip to content

fix(alert): wait for new deployment row in alerts e2e - #3256

Merged
baktun14 merged 1 commit into
mainfrom
fix/alert-e2e-wait-for-new-row
Jun 3, 2026
Merged

fix(alert): wait for new deployment row in alerts e2e#3256
baktun14 merged 1 commit into
mainfrom
fix/alert-e2e-wait-for-new-row

Conversation

@baktun14

@baktun14 baktun14 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Why

The Managed wallet alerts E2E (managed-wallet-alerts.spec.ts) was failing repeatedly on beta runs in the close-deployment step:

locator.click: Timeout 15000ms exceeded
  - waiting for getByRole('row').filter({ hasText: '<dseq>' }).getByRole('link').first()

The test uses userType: "existing", so the alerts list already contains historical rows from prior runs. Previously:

  • The "verify alerts on global alerts page" step only asserted getAlertRow(0) was visible — true even if that row is a stale alert from a prior run.
  • The "toggle alert from alerts list" step then toggled row 0 — potentially a stale alert, masking propagation lag.
  • The "close deployment" step finally filtered by this run's DSEQ — but if notifications-chain-events hadn't pushed the new alert to /alerts within the default 15s action timeout, the locator never resolved.

Locally the lag is small enough to be invisible; on CI it consistently races.

What

Pin every alerts-list interaction (visibility check, toggle, link click) to a single locator filtered by the freshly created DSEQ, with a 30s wait for the new row to appear. This removes the dependency on getAlertRow(0) (non-deterministic across runs) and gives notifications-chain-events enough headroom to propagate before we drive the row.

No production code changes.

Summary by CodeRabbit

  • Tests
    • Improved test reliability for managed wallet alerts by enhancing test precision when targeting specific deployment alerts.

Pin all alerts-list interactions to the freshly deployed DSEQ row so
the toggle and close steps stop racing notifications-chain-events when
the alert hasn't propagated to /alerts within the default 15s action
timeout. Removes reliance on row 0, which is non-deterministic for
existing test users with prior alerts.
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 16d2ff80-c549-4ebc-886e-a8eb373e6b3d

📥 Commits

Reviewing files that changed from the base of the PR and between 6fca979 and deeb938.

📒 Files selected for processing (1)
  • apps/deploy-web/tests/ui/managed-wallet-alerts.spec.ts

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Walkthrough

The test refactoring updates managed-wallet-alerts to operate on the specific deployment alert row identified by dseq instead of the first alert row. The deploymentAlertRow variable is now reused for both the alert toggle interaction and the close deployment action, eliminating redundant table filtering.

Changes

UI test targeting refinement

Layer / File(s) Summary
Alert row targeting and close deployment action
apps/deploy-web/tests/ui/managed-wallet-alerts.spec.ts
Test now filters the alerts table for the row containing dseq, waits for visibility, and reuses deploymentAlertRow for alert toggle retrieval and close deployment action instead of targeting a generic/first row.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • akash-network/console#3215: Backend changes that alter how dseq is generated/validated for deployments, complementing the test's refined dseq-based targeting.
  • akash-network/console#3181: Prior modification to the same test file around alert toggle flow, including expected toggle state and threshold updates.

Suggested labels

size: XS, experienced-contributor

Suggested reviewers

  • stalniy
  • ygrishajev
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/alert-e2e-wait-for-new-row

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

@baktun14
baktun14 merged commit 48cbffd into main Jun 3, 2026
45 of 46 checks passed
@baktun14
baktun14 deleted the fix/alert-e2e-wait-for-new-row branch June 3, 2026 03:23
@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.73%. Comparing base (6fca979) to head (deeb938).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3256      +/-   ##
==========================================
- Coverage   66.42%   65.73%   -0.69%     
==========================================
  Files        1036      996      -40     
  Lines       25425    24403    -1022     
  Branches     6133     5971     -162     
==========================================
- Hits        16888    16041     -847     
+ Misses       7459     7296     -163     
+ Partials     1078     1066      -12     
Flag Coverage Δ *Carryforward flag
api 84.72% <ø> (ø) Carriedforward from 6fca979
deploy-web 51.42% <ø> (ø)
log-collector ?
notifications 91.06% <ø> (ø) Carriedforward from 6fca979
provider-console 81.38% <ø> (ø) Carriedforward from 6fca979
provider-proxy 86.37% <ø> (ø) Carriedforward from 6fca979
tx-signer ?

*This pull request uses carry forward flags. Click here to find out more.
see 40 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant