O'Reilly logo

Isomorphic Go by Kamesh Balasubramanian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Verifying the carousel cog

Verifying the functionality for the carousel cog consists of providing sufficient time for the images of the carousel to load, and for the first image, the watch.jpg image file to appear on the web page.

Here is the test suite for the carousel cog, which is implemented in the carouselcog_test.go source file, located in the client/tests/go directory:

package mainimport (  "github.com/EngineerKamesh/igb/igweb/client/tests/go/caspertest"  "github.com/gopherjs/gopherjs/js")var wait = js.MakeFunc(func(this *js.Object, arguments []*js.Object) interface{} {  this.Call("waitForSelector", "#carousel")  return nil})var casper = js.Global.Get("casper")func main() {  viewportParams := &caspertest.ViewportParams{Object:  js.Global.Get("Object").New()} ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required