Skip to content

cursivecode/protractor-cljs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

protractor-cljs

protractor-cljs is a library for working with the protractor testing framework

Installation

Add the following dependency to your project.clj file:

  [protractor-cljs "0.1.3"]

Usage

protractor-cljs uses jasmine-cljs

(ns yourapp
  (:require-macros [jasmine-cljs.macros :refer [describe it expect dont-expect
                                                before-each after-each xit xdescribe]]
                   [protractor-cljs.macros :refer [by get-elem browser]]))

protractor-cljs - Protractor test

(describe "angularjs homepage - cljs"
  (it "should greet the named user"
      (browser :get "http://www.angularjs.org")

      (-> (get-elem (by :model "yourName"))
          (.sendKeys "Julie"))

      (let [greeting (get-elem (by :binding "yourName"))]
        (expect (.getText greeting) :to-equal "Hello Julie!"))))

Differences

  • The global variable element provided by protractor is get-elem
  • The global variables by and browser are functions that take a keyword and args

License

Copyright © 2013 Michael Doaty

Distributed under the Eclipse Public License, same as Clojure.

About

Library for working with Protractor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published