0

I found quite strange behavior in Clojure/Cider. When I try to execute the same expression in two ways (to run a test and run in REPL), I have different results.

Here is an expression:

  (with-chrome {} driver
    (start)
    (doto driver
      (go "http://localhost:3000")
      (wait-visible {:id :domain})
      (fill {:id :domain} "foo")
      (click {:id :login_button})
      (wait 5))
    (stop))

The first way is I wrapped it with deftest. The second one I copy and paste it in REPL. The difference is when I run the test the click command does not work at all. While the REPL scenario works as well.

Could somebody give me a tip? PS: I use etaoin library in example above.

Ivan Grishaev
  • 1,583
  • 10
  • 15

1 Answers1

0

Well, the reason was I wrapped he whole code into DB transaction that locked tables due to TRUNCATE operation. That's why clicking on a button sent an ajax request that hanged forever.

Ivan Grishaev
  • 1,583
  • 10
  • 15