Skip to content

fix(e2e): await network device row lookup#3146

Open
voidmatcha wants to merge 1 commit into
DefGuard:stable/2.xfrom
voidmatcha:fix/network-device-row-lookup
Open

fix(e2e): await network device row lookup#3146
voidmatcha wants to merge 1 commit into
DefGuard:stable/2.xfrom
voidmatcha:fix/network-device-row-lookup

Conversation

@voidmatcha

@voidmatcha voidmatcha commented Jun 30, 2026

Copy link
Copy Markdown

Summary

Fixes the network device row lookup helper to await each row text comparison before selecting a row.

Array.prototype.find() does not await async predicates, so the previous helper could treat the returned Promise as truthy and select the wrong row. The updated code uses a small for...of loop so deviceName is compared against each row's text before returning the match.

Why

This keeps the helper's existing behavior but makes the async lookup effective, which avoids false positives when E2E tests need to interact with a specific network device row.

Test plan

  • Reviewed every line of the diff.
  • git diff --check origin/stable/2.x..HEAD
  • /Users/yongjae/Documents/e2e-skills/skills/e2e-reviewer/scripts/scan.sh e2e/utils/controllers/vpn/createNetworkDevice.ts — no P0 findings; two existing P1/P2 heuristics remain outside this async lookup fix.
  • pnpm --filter @defguard/e2e test ... targeted network-device flow — 2 passed locally.

Found while reviewing the test suite with e2e-skills/e2e-reviewer.

Signed-off-by: YONGJAE LEE <dev.yongjaelee@gmail.com>
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