-
Notifications
You must be signed in to change notification settings - Fork 37
feat(fake-browser): action API in-memory implementation. #101
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
base: main
Are you sure you want to change the base?
Conversation
aklinker1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting back to github after my long break. Couple of changes on this PR then it's good to go.
| }); | ||
|
|
||
| describe('setBadgeTextColor / getBadgeTextColor', () => { | ||
| it('should set and get global badge text color', async () => { | ||
| const color = '#0000FF'; | ||
| fakeBrowser.action.setBadgeTextColor({ color }); | ||
| //@ts-ignore | ||
| fakeBrowser.action.getBadgeTextColor({}, result => { | ||
| expect(result).toEqual(color); | ||
| }); | ||
| }); | ||
|
|
||
| it('should set and get tab-specific badge text color', async () => { | ||
| const tabId = 123; | ||
| const color = '#00FFFF'; | ||
| fakeBrowser.action.setBadgeTextColor({ tabId, color }); | ||
| //@ts-ignore | ||
| fakeBrowser.action.getBadgeTextColor({ tabId }, result => { | ||
| expect(result).toBe(color); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's up with these @ts-ignores? Is it a conflict with @types/webextension-polyfill vs chrome?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, It is a conflict between two types.
This is being implemented in response to this issue from WXT. wxt-dev/wxt#1569