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

Fix browserContext.clearPermissions #1077

Merged
merged 4 commits into from Oct 23, 2023
Merged

Fix browserContext.clearPermissions #1077

merged 4 commits into from Oct 23, 2023

Conversation

ankur22
Copy link
Collaborator

@ankur22 ankur22 commented Oct 19, 2023

What?

This fixes the error when browserContext.clearPermissions is called.

Why?

It was erroring due to the CDP request not being setup correctly.

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)

Closes: #443

@ankur22 ankur22 changed the base branch from main to refactor/grantPermissions October 19, 2023 15:15
inancgumus
inancgumus previously approved these changes Oct 20, 2023
Copy link
Member

@inancgumus inancgumus left a comment

Choose a reason for hiding this comment

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

Nice work 👍 Some suggestions for testing.

tests/browser_context_test.go Show resolved Hide resolved
tests/browser_context_test.go Show resolved Hide resolved
tests/browser_context_test.go Show resolved Hide resolved
ka3de
ka3de previously approved these changes Oct 20, 2023
Copy link
Collaborator

@ka3de ka3de left a comment

Choose a reason for hiding this comment

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

LGTM.

@ankur22 ankur22 force-pushed the refactor/grantPermissions branch 2 times, most recently from f7f3714 to 50992a9 Compare October 23, 2023 10:09
@ankur22 ankur22 force-pushed the fix/443-clearPermissions branch 2 times, most recently from 7768d01 to 3faf6ed Compare October 23, 2023 10:17
Base automatically changed from refactor/grantPermissions to main October 23, 2023 14:07
@ankur22 ankur22 dismissed stale reviews from ka3de and inancgumus October 23, 2023 14:07

The base branch was changed.

ankur22 and others added 4 commits October 23, 2023 15:08
Add the missing cdp executor which will be used to perform the cdp
request.

Related: #1040
Add a clearPermissions command which will ensure that we don't regress
the fix for clearPermissions.
This change adds code to assert on whether the permissions have been
granted before and after certain actions.

Co-authored-by: İnanç Gümüş <inanc.gumus@grafana.com>
Copy link
Member

@inancgumus inancgumus left a comment

Choose a reason for hiding this comment

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

🚀

Copy link
Collaborator

@ka3de ka3de left a comment

Choose a reason for hiding this comment

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

LGTM.

@ankur22 ankur22 merged commit 1ef72a0 into main Oct 23, 2023
17 checks passed
@ankur22 ankur22 deleted the fix/443-clearPermissions branch October 23, 2023 14:33
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.

Panics and errors when clearPermissions called on a BrowserContext
3 participants