Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

Refactor isHidden to return an error #1109

Merged
merged 2 commits into from
Nov 23, 2023
Merged

Refactor isHidden to return an error #1109

merged 2 commits into from
Nov 23, 2023

Conversation

ankur22
Copy link
Collaborator

@ankur22 ankur22 commented Nov 22, 2023

What?

This refactors isHidden for locator, page, frame and elementHandle.

Why?

Returning an error is a safer way to work instead pf performing a panic which could have unexpected consequences.

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes
  • I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

Updates: grafana/k6#4403
Updates: #981

tests/locator_test.go Show resolved Hide resolved
@ankur22 ankur22 force-pushed the fix/isVisible branch 2 times, most recently from 9e1d3ed to b971314 Compare November 23, 2023 09:46
@ankur22 ankur22 force-pushed the fix/isVisible branch 2 times, most recently from be914dc to 317efca Compare November 23, 2023 10:44
Base automatically changed from fix/isVisible to main-next November 23, 2023 10:57
@ankur22 ankur22 merged commit a86503d into main-next Nov 23, 2023
13 checks passed
@ankur22 ankur22 deleted the fix/isHidden branch November 23, 2023 15:08
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants