1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-06-23 00:28:10 +02:00

Integration tests (#170)

This commit is contained in:
Tim Voronov
2018-11-12 14:53:36 -05:00
committed by GitHub
parent 423d84cd07
commit de774ba03e
50 changed files with 695 additions and 60 deletions

View File

@ -30,7 +30,6 @@ func Input(_ context.Context, args ...core.Value) (core.Value, error) {
switch args[0].(type) {
case *dynamic.HTMLDocument:
doc, ok := arg1.(*dynamic.HTMLDocument)
if !ok {
@ -46,6 +45,7 @@ func Input(_ context.Context, args ...core.Value) (core.Value, error) {
}
delay := values.Int(0)
if len(args) == 4 {
arg4 := args[3]
@ -58,7 +58,6 @@ func Input(_ context.Context, args ...core.Value) (core.Value, error) {
}
return doc.InputBySelector(arg2.(values.String), args[2], delay)
case *dynamic.HTMLElement:
el, ok := arg1.(*dynamic.HTMLElement)
@ -67,6 +66,7 @@ func Input(_ context.Context, args ...core.Value) (core.Value, error) {
}
delay := values.Int(0)
if len(args) == 3 {
arg3 := args[2]