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

Prepare Locator for async migration #1330

Merged
merged 25 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2aa2a32
Refactor Locator.Dblclick to return err
inancgumus May 13, 2024
2354f14
Refactor Locator.Check to return err
inancgumus May 13, 2024
f6fbf0f
Refactor locator.Uncheck to return err
inancgumus May 13, 2024
6196eec
Refactor Locator.IsChecked to return err
inancgumus May 13, 2024
8a1f35c
Refactor Locator.IsEditable to return err
inancgumus May 13, 2024
2b0e941
Refactor Locator.IsEnabled to return err
inancgumus May 13, 2024
bf6e4df
Refactor Locator.IsDisabled to return err
inancgumus May 13, 2024
acd1f2f
Refactor Locator.IsVisible to return err
inancgumus May 13, 2024
1d6bd5b
Refactor Locator.IsHidden to return err
inancgumus May 13, 2024
d2a2204
Refactor Locator.Fill to return err
inancgumus May 13, 2024
671f0e1
Refactor Locator.Focus to return err
inancgumus May 13, 2024
bc9daca
Refactor Locator.GetAttribute to return err
inancgumus May 13, 2024
bab1b4c
Refactor Locator.InnerHTML to return err
inancgumus May 14, 2024
06cfcd0
Refactor Locator.InnerText to return err
inancgumus May 14, 2024
cefdc6b
Refactor Locator.TextContent to return err
inancgumus May 14, 2024
4df9d5c
Refactor Locator.InputValue to return err
inancgumus May 14, 2024
e2b6ffc
Refactor Locator.SelectOption to return err
inancgumus May 14, 2024
77fe038
Refactor Locator.Press to return err
inancgumus May 14, 2024
22a1c4e
Refactor Locator.Type to return err
inancgumus May 14, 2024
bf473ec
Refactor Locator.Hover to return err
inancgumus May 14, 2024
5f36d18
Refactor Locator.DispatchEvent to return err
inancgumus May 14, 2024
0ddbb61
Refactor Locator.WaitFor to return err
inancgumus May 14, 2024
84d64e9
Refactor Locator tests to return err
inancgumus May 14, 2024
668c3bb
Fix tap mapping tests
inancgumus May 14, 2024
8e45ae6
Refactor TestLocatorElementState to check errs
inancgumus May 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions browser/mapping_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ type pageAPI interface {
SetExtraHTTPHeaders(headers map[string]string)
SetInputFiles(selector string, files goja.Value, opts goja.Value)
SetViewportSize(viewportSize goja.Value)
Tap(selector string, opts goja.Value) (*goja.Promise, error)
Tap(selector string, opts goja.Value) error
TextContent(selector string, opts goja.Value) string
ThrottleCPU(common.CPUProfile) error
ThrottleNetwork(common.NetworkProfile) error
Expand Down Expand Up @@ -405,7 +405,7 @@ type frameAPI interface {
SelectOption(selector string, values goja.Value, opts goja.Value) []string
SetContent(html string, opts goja.Value)
SetInputFiles(selector string, files goja.Value, opts goja.Value)
Tap(selector string, opts goja.Value) (*goja.Promise, error)
Tap(selector string, opts goja.Value) error
TextContent(selector string, opts goja.Value) string
Title() string
Type(selector string, text string, opts goja.Value)
Expand Down Expand Up @@ -450,7 +450,7 @@ type elementHandleAPI interface {
SelectOption(values goja.Value, opts goja.Value) []string
SelectText(opts goja.Value)
SetInputFiles(files goja.Value, opts goja.Value)
Tap(opts goja.Value) (*goja.Promise, error)
Tap(opts goja.Value) error
TextContent() string
Type(text string, opts goja.Value)
Uncheck(opts goja.Value)
Expand Down Expand Up @@ -500,29 +500,29 @@ type responseAPI interface {
type locatorAPI interface {
Clear(opts *common.FrameFillOptions) error
Click(opts goja.Value) error
Dblclick(opts goja.Value)
Check(opts goja.Value)
Uncheck(opts goja.Value)
IsChecked(opts goja.Value) bool
IsEditable(opts goja.Value) bool
IsEnabled(opts goja.Value) bool
IsDisabled(opts goja.Value) bool
IsVisible(opts goja.Value) bool
IsHidden(opts goja.Value) bool
Fill(value string, opts goja.Value)
Focus(opts goja.Value)
GetAttribute(name string, opts goja.Value) goja.Value
InnerHTML(opts goja.Value) string
InnerText(opts goja.Value) string
TextContent(opts goja.Value) string
InputValue(opts goja.Value) string
SelectOption(values goja.Value, opts goja.Value) []string
Press(key string, opts goja.Value)
Type(text string, opts goja.Value)
Hover(opts goja.Value)
Tap(opts goja.Value) (*goja.Promise, error)
Dblclick(opts goja.Value) error
Check(opts goja.Value) error
Uncheck(opts goja.Value) error
IsChecked(opts goja.Value) (bool, error)
IsEditable(opts goja.Value) (bool, error)
IsEnabled(opts goja.Value) (bool, error)
IsDisabled(opts goja.Value) (bool, error)
IsVisible(opts goja.Value) (bool, error)
IsHidden(opts goja.Value) (bool, error)
Fill(value string, opts goja.Value) error
Focus(opts goja.Value) error
GetAttribute(name string, opts goja.Value) (any, error)
InnerHTML(opts goja.Value) (string, error)
InnerText(opts goja.Value) (string, error)
TextContent(opts goja.Value) (string, error)
InputValue(opts goja.Value) (string, error)
SelectOption(values goja.Value, opts goja.Value) ([]string, error)
Press(key string, opts goja.Value) error
Type(text string, opts goja.Value) error
Hover(opts goja.Value) error
Tap(opts goja.Value) error
DispatchEvent(typ string, eventInit, opts goja.Value)
WaitFor(opts goja.Value)
WaitFor(opts goja.Value) error
}

// keyboardAPI is the interface of a keyboard input device.
Expand All @@ -536,7 +536,7 @@ type keyboardAPI interface {

// touchscreenAPI is the interface of a touchscreen.
type touchscreenAPI interface {
Tap(x float64, y float64) *goja.Promise
Tap(x float64, y float64) error
}

// mouseAPI is the interface of a mouse input device.
Expand Down
Loading
Loading