Started working on test script
This commit is contained in:
123
project.clj
123
project.clj
@@ -106,68 +106,83 @@
|
|||||||
"fig:min" ["run" "-m" "figwheel.main" "-O" "advanced" "-bo" "min"]}
|
"fig:min" ["run" "-m" "figwheel.main" "-O" "advanced" "-bo" "min"]}
|
||||||
|
|
||||||
|
|
||||||
:profiles
|
:profiles {
|
||||||
{:dev
|
:dev
|
||||||
{:resource-paths ["resources" "target"]
|
{:resource-paths ["resources" "target"]
|
||||||
:dependencies [[binaryage/devtools "1.0.2"]
|
:dependencies [[binaryage/devtools "1.0.2"]
|
||||||
[postgresql/postgresql "9.3-1102.jdbc41"]
|
[postgresql/postgresql "9.3-1102.jdbc41"]
|
||||||
[org.clojure/java.jdbc "0.7.11"]
|
[org.clojure/java.jdbc "0.7.11"]
|
||||||
[com.bhauman/figwheel-main "0.2.12" :exclusions [org.clojure/clojurescript
|
[etaoin "0.4.1"]
|
||||||
ring
|
[com.bhauman/figwheel-main "0.2.12" :exclusions [org.clojure/clojurescript
|
||||||
ring/ring-core
|
ring
|
||||||
ring/ring-codec
|
ring/ring-core
|
||||||
ring/ring-defaults
|
ring/ring-codec
|
||||||
ring/ring-devel
|
ring/ring-defaults
|
||||||
org.clojure/tools.cli
|
ring/ring-devel
|
||||||
binaryage/devtools
|
org.clojure/tools.cli
|
||||||
commons-io
|
binaryage/devtools
|
||||||
commons-codec
|
commons-io
|
||||||
com.fasterxml.jackson.core/jackson-core
|
commons-codec
|
||||||
org.clojure/tools.namespace
|
com.fasterxml.jackson.core/jackson-core
|
||||||
org.eclipse.jetty.websocket/websocket-server
|
org.clojure/tools.namespace
|
||||||
org.eclipse.jetty.websocket/websocket-servlet
|
org.eclipse.jetty.websocket/websocket-server
|
||||||
args4j]]
|
org.eclipse.jetty.websocket/websocket-servlet
|
||||||
[com.bhauman/rebel-readline-cljs "0.1.4" :exclusions [org.clojure/clojurescript]]
|
args4j]]
|
||||||
[javax.servlet/servlet-api "2.5"]]
|
[com.bhauman/rebel-readline-cljs "0.1.4" :exclusions [org.clojure/clojurescript]]
|
||||||
:plugins [[lein-pdo "0.1.1"]]
|
[javax.servlet/servlet-api "2.5"]]
|
||||||
:jvm-opts ["-Dconfig=config/dev.edn" "-Dlogback.configurationFile=logback.xml"]}
|
:plugins [[lein-pdo "0.1.1"]]
|
||||||
|
:jvm-opts ["-Dconfig=config/dev.edn" "-Dlogback.configurationFile=logback.xml"]}
|
||||||
|
|
||||||
|
|
||||||
:uberjar {:prep-tasks ["fig:min" ]
|
:uberjar
|
||||||
:dependencies [[com.bhauman/figwheel-main "0.2.12" :exclusions [org.clojure/clojurescript
|
{:prep-tasks ["fig:min" ]
|
||||||
ring
|
:dependencies [[com.bhauman/figwheel-main "0.2.12" :exclusions [org.clojure/clojurescript
|
||||||
ring/ring-core
|
ring
|
||||||
ring/ring-codec
|
ring/ring-core
|
||||||
ring/ring-defaults
|
ring/ring-codec
|
||||||
ring/ring-devel
|
ring/ring-defaults
|
||||||
org.clojure/tools.cli
|
ring/ring-devel
|
||||||
ring.adapter.jetty
|
org.clojure/tools.cli
|
||||||
binaryage/devtools
|
ring.adapter.jetty
|
||||||
commons-io
|
binaryage/devtools
|
||||||
commons-codec
|
commons-io
|
||||||
com.fasterxml.jackson.core/jackson-core
|
commons-codec
|
||||||
org.clojure/tools.namespace
|
com.fasterxml.jackson.core/jackson-core
|
||||||
org.eclipse.jetty.websocket/websocket-server
|
org.clojure/tools.namespace
|
||||||
org.eclipse.jetty.websocket/websocket-servlet
|
org.eclipse.jetty.websocket/websocket-server
|
||||||
args4j]]]}
|
org.eclipse.jetty.websocket/websocket-servlet
|
||||||
:provided {:dependencies [[org.clojure/clojurescript "1.10.773"
|
args4j]]]}
|
||||||
:exclusions [com.google.code.findbugs/jsr305
|
:provided {:dependencies [[org.clojure/clojurescript "1.10.773"
|
||||||
com.fasterxml.jackson.core/jackson-core]]
|
:exclusions [com.google.code.findbugs/jsr305
|
||||||
[reagent "1.0.0" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server] ]
|
com.fasterxml.jackson.core/jackson-core]]
|
||||||
[re-frame "1.1.2"
|
[reagent "1.0.0" :exclusions [cljsjs/react cljsjs/react-dom cljsjs/react-dom-server] ]
|
||||||
:exclusions
|
[re-frame "1.1.2"
|
||||||
[reagent
|
:exclusions
|
||||||
org.clojure/clojurescript]]
|
[reagent
|
||||||
[re-frame-utils "0.1.0"]
|
org.clojure/clojurescript]]
|
||||||
[com.andrewmcveigh/cljs-time "0.5.2"]
|
[re-frame-utils "0.1.0"]
|
||||||
[cljs-http "0.1.46"]
|
[com.andrewmcveigh/cljs-time "0.5.2"]
|
||||||
[kibu/pushy "0.3.8"]]}}
|
[cljs-http "0.1.46"]
|
||||||
|
[kibu/pushy "0.3.8"]]}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
:main auto-ap.server
|
:main auto-ap.server
|
||||||
|
|
||||||
:aot [auto-ap.server auto-ap.datomic.migrate auto-ap.time clj-time.core clj-time.coerce clj-time.format clojure.tools.logging.impl]
|
:aot [auto-ap.server auto-ap.datomic.migrate auto-ap.time clj-time.core clj-time.coerce clj-time.format clojure.tools.logging.impl]
|
||||||
|
|
||||||
:uberjar-name "auto-ap.jar"
|
:uberjar-name "auto-ap.jar"
|
||||||
|
:test-paths ["test/clj"]
|
||||||
|
:test-selectors {:integration (fn [m]
|
||||||
|
(or (clojure.string/includes? (str (:ns m))
|
||||||
|
"integration")
|
||||||
|
(clojure.string/includes? (str (:name m))
|
||||||
|
"integration")))
|
||||||
|
:functional (fn [m]
|
||||||
|
(or (clojure.string/includes? (str (:ns m))
|
||||||
|
"functional")
|
||||||
|
(clojure.string/includes? (str (:name m))
|
||||||
|
"functional")))}
|
||||||
|
|
||||||
:prep-tasks [ "compile"])
|
:prep-tasks [ "compile"])
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
(client-override i)
|
(client-override i)
|
||||||
(:name client))])
|
(:name client))])
|
||||||
[grid/cell {} (:name vendor)]
|
[grid/cell {} (:name vendor)]
|
||||||
[glast-updatedrid/cell {} invoice-number]
|
[grid/cell {} invoice-number]
|
||||||
[grid/cell {} (date->str date) ]
|
[grid/cell {} (date->str date) ]
|
||||||
[grid/cell {}
|
[grid/cell {}
|
||||||
(when due
|
(when due
|
||||||
|
|||||||
52
test/clj/auto_ap/functional/test.clj
Normal file
52
test/clj/auto_ap/functional/test.clj
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
(ns auto-ap.functional.test
|
||||||
|
(:require [clojure.test :as t :refer :all]
|
||||||
|
[etaoin.api :as e]
|
||||||
|
[etaoin.keys :as k]
|
||||||
|
[config.core :refer [env]]
|
||||||
|
[clj-time.core :as time]
|
||||||
|
[buddy.sign.jwt :as jwt]))
|
||||||
|
|
||||||
|
(def base-url "https://staging3.app.integreatconsult.com")
|
||||||
|
(defn login-admin [driver]
|
||||||
|
(let [jwt-token (jwt/sign {:user "Automated Tests"
|
||||||
|
:exp (time/plus (time/now) (time/days 30))
|
||||||
|
:user/role "admin"
|
||||||
|
:user/name "Automated Tests"}
|
||||||
|
(:jwt-secret env)
|
||||||
|
{:alg :hs512})]
|
||||||
|
(e/go driver (str base-url "/?jwt=" jwt-token))
|
||||||
|
(e/wait-visible driver {:tag :h1
|
||||||
|
:class "title"})))
|
||||||
|
|
||||||
|
(deftest create-invoice
|
||||||
|
(testing "Creating a new invoice"
|
||||||
|
(e/with-wait-timeout 10
|
||||||
|
(e/with-firefox {} driver
|
||||||
|
(login-admin driver)
|
||||||
|
(e/click driver {:tag :a :fn/text "Invoices"})
|
||||||
|
(e/wait-visible driver {:tag :h1
|
||||||
|
:class "title"
|
||||||
|
:fn/text "Unpaid Invoices"})))))
|
||||||
|
|
||||||
|
|
||||||
|
(deftest edit-client
|
||||||
|
(testing "Editing a client"
|
||||||
|
(e/with-wait-timeout 10
|
||||||
|
(e/with-firefox {} driver
|
||||||
|
(login-admin driver)
|
||||||
|
|
||||||
|
(e/click driver {:tag :a :class "navbar-link login"})
|
||||||
|
(e/click driver {:tag :a :fn/text "Administration"})
|
||||||
|
|
||||||
|
(e/wait-visible driver {:tag :h1
|
||||||
|
:class "title"
|
||||||
|
:fn/text "Admin"})
|
||||||
|
(e/click driver {:tag :span :fn/text "Clients"})
|
||||||
|
(e/wait-visible driver {:tag :h1
|
||||||
|
:class "title"
|
||||||
|
:fn/text "Clients"})
|
||||||
|
(e/click driver {:tag :i :class "fa fa-pencil"})
|
||||||
|
(e/wait-visible driver {:tag :button
|
||||||
|
:fn/text "Save"})
|
||||||
|
(e/click driver {:tag :button :fn/text "Save"})
|
||||||
|
(e/wait-invisible driver {:tag :form})))))
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
(ns test.auto-ap.graphql
|
(ns auto-ap.integration.graphql
|
||||||
(:require [auto-ap.graphql :as sut]
|
(:require [auto-ap.graphql :as sut]
|
||||||
[auto-ap.datomic.migrate :as m]
|
[auto-ap.datomic.migrate :as m]
|
||||||
[venia.core :as v]
|
[venia.core :as v]
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
(ns clj.auto-ap.graphql.vendors
|
(ns auto-ap.integration.graphql.vendors
|
||||||
(:require [auto-ap.graphql.vendors :as sut2]
|
(:require [auto-ap.graphql.vendors :as sut2]
|
||||||
[auto-ap.datomic :refer [uri conn]]
|
[auto-ap.datomic :refer [uri conn]]
|
||||||
[auto-ap.datomic.migrate :as m]
|
[auto-ap.datomic.migrate :as m]
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
(ns test.auto-ap.yodlee.import
|
(ns auto-ap.integration.yodlee.import
|
||||||
(:require [auto-ap.yodlee.import :as sut]
|
(:require [auto-ap.yodlee.import :as sut]
|
||||||
[auto-ap.yodlee.core :as c]
|
[auto-ap.yodlee.core :as c]
|
||||||
[datomic.api :as d]
|
[datomic.api :as d]
|
||||||
Reference in New Issue
Block a user