1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-07-07 00:56:53 +02:00
Files
ferret/pkg/drivers/cdp/dom/helpers_test.go
Tim Voronov e6dd5689b4 Bugfix/e2e tests (#648)
* Fixed logger level

* Fixed WAITFOR EVENT parser

* Added tracing to Network Manager

* Updated logging

* Swtitched to value type of logger

* Added tracing

* Increased websocket maximum buffer size

* Ignore unimportant error message

* Added support of new CDP API for layouts

* Switched to value type of logger

* Added log level

* Fixed early context cancellation

* Updated example of 'click' action

* Switched to val for elements lookup

* Fixed unit tests

* Refactored 'eval' module

* Fixed SetStyle eval expression

* Fixed style deletion

* Updated logic of setting multiple styles
2021-09-02 11:09:48 -04:00

56 lines
951 B
Go

package dom
import (
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func Test_toCamelCase(t *testing.T) {
Convey("toCamelCase", t, func() {
Convey("should format string into camel case", func() {
inputs := []struct {
actual string
expected string
}{
{
actual: "foo-bar",
expected: "fooBar",
},
{
actual: "foo-1-bar",
expected: "foo1Bar",
},
{
actual: "overscroll-behavior-x",
expected: "overscrollBehaviorX",
},
{
actual: "x",
expected: "x",
},
{
actual: "foo-x",
expected: "fooX",
},
{
actual: "foo-$",
expected: "foo",
},
{
actual: "color",
expected: "color",
},
{
actual: "textDecorationSkipInk",
expected: "textDecorationSkipInk",
},
}
for _, input := range inputs {
So(toCamelCase(input.actual), ShouldEqual, input.expected)
}
})
})
}