Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async Frame #1367

Merged
merged 38 commits into from
Jun 6, 2024
Merged

Async Frame #1367

merged 38 commits into from
Jun 6, 2024

Conversation

inancgumus
Copy link
Member

@inancgumus inancgumus commented Jun 4, 2024

What?

  • There are a lot of commits. Luckily, each commit is small and corresponds to a method.
  • The PR removes panics from a few methods and turns them into async. I don't want to split the PR because of a few panicking methods. But I used different commits for revertability.

Why?

#1302

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

@inancgumus inancgumus added refactor async supports async (promises) mapping k6 browser to Goja mapping related. stability runtime stability improvements labels Jun 4, 2024
@inancgumus inancgumus self-assigned this Jun 4, 2024
Base automatically changed from async/js-handle to main-async June 5, 2024 07:58
@inancgumus inancgumus marked this pull request as ready for review June 5, 2024 08:08
@inancgumus inancgumus requested a review from ankur22 June 5, 2024 08:08
Previously, we can't detect a null value:

        v, _ := page.GetAttribute("#el", "missing", nil)
        assert.Nil(t, nil, v) // v is not nil

Now, `v` will be `nil` instead of "null" as a string. This enables us to
detect `nil` in methods like GetAttribute, TextNode, etc. to tell the
user that what they're looking for does not exist instead of returning
"null" or an empty string.
@inancgumus
Copy link
Member Author

inancgumus commented Jun 5, 2024

Ah, mistakenly merged #1369 into this one 🤦 Ignore the last commit.

@inancgumus inancgumus requested review from ankur22 and removed request for ankur22 June 5, 2024 17:45
Copy link
Collaborator

@ankur22 ankur22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 🚀 Let's GO!

common/frame.go Show resolved Hide resolved
browser/frame_mapping.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@ankur22 ankur22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@inancgumus inancgumus merged commit 9d11199 into main-async Jun 6, 2024
14 checks passed
@inancgumus inancgumus deleted the async/frame branch June 6, 2024 15:19
inancgumus added a commit that referenced this pull request Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
async supports async (promises) mapping k6 browser to Goja mapping related. refactor stability runtime stability improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants