Skip to content

Commit

Permalink
Map Locator.setChecked
Browse files Browse the repository at this point in the history
  • Loading branch information
inancgumus committed Aug 6, 2024
1 parent 3e70eef commit 603cec9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions browser/locator_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ func mapLocator(vu moduleVU, lo *common.Locator) mapping { //nolint:funlen
return nil, lo.Dblclick(opts) //nolint:wrapcheck
})
},
"setChecked": func(checked bool, opts sobek.Value) *sobek.Promise {
return k6ext.Promise(vu.Context(), func() (any, error) {
return nil, lo.SetChecked(checked, opts) //nolint:wrapcheck
})
},
"check": func(opts sobek.Value) *sobek.Promise {
return k6ext.Promise(vu.Context(), func() (any, error) {
return nil, lo.Check(opts) //nolint:wrapcheck
Expand Down
1 change: 1 addition & 0 deletions browser/mapping_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ type locatorAPI interface {
Clear(opts *common.FrameFillOptions) error
Click(opts sobek.Value) error
Dblclick(opts sobek.Value) error
SetChecked(checked bool, opts sobek.Value) error
Check(opts sobek.Value) error
Uncheck(opts sobek.Value) error
IsChecked(opts sobek.Value) (bool, error)
Expand Down

0 comments on commit 603cec9

Please sign in to comment.