   (input-text "//input[@name='tags']" "tag1, tag2")
   (input-text "//input[@name='amount']" "20")
   (click "//button[contains(text(), 'Cancel')]")
-  (wait-until (present? "//li[@class='component'][1]"))
-
-  (is (present? "//li[@class='component'][1]//span[@class='value' and contains(text(), 'EPR212A408000Z')]"))
+
+  (wait-until (present? "//li[@class='component'][1]//span[@class='value' and contains(text(), 'EPR212A408000Z')]"))
   (is (present? "//li[@class='component'][1]//span[@class='value' and contains(text(), 'optocoupler')]"))
   (is (present? "//li[@class='component'][1]//span[@class='value' and contains(text(), '7')]"))
 
   ;;;;;;;;;;;;; Edit form with save ;;;;;;;;;;;;;
 
-  (to "http://localhost:3449")
-  (is (present? "//li[@class='component'][1]//span[@class='value' and contains(text(), 'EPR212A408000Z')]"))
-  (is (present? "//li[@class='component'][1]//span[@class='value' and contains(text(), 'optocoupler')]"))
-  (is (present? "//li[@class='component'][1]//span[@class='value' and contains(text(), '7')]"))
   (click "//button[contains(text(), 'Edit')]")
-  (wait-until (present? "//input[@name]"))
-
-  (is (present? "//input[@name='name' and @value='EPR212A408000Z']"))
+
+  (wait-until (present? "//input[@name='name' and @value='EPR212A408000Z']"))
   (is (present? "//input[@name='tags' and @value='optocoupler']"))
   (is (present? "//input[@name='amount' and @value='7']"))
 


(set-driver! browser-spec)
(set-finder! xpath-finder)

;(implicit-wait 3000)

(def params {:base-url "http://localhost:3449"})



  ;;;;;;;;;;;;; Edit form with cancel ;;;;;;;;;;;;;

  (is (present? "//li[@class='component'][1]//span[@class='value' and contains(text(), 'EPR212A408000Z')]"))
  (is (present? "//li[@class='component'][1]//span[@class='value' and contains(text(), 'optocoupler')]"))
  (is (present? "//li[@class='component'][1]//span[@class='value' and contains(text(), '7')]"))
  (click "//button[contains(text(), 'Edit')]")

  (wait-until (present? "//input[@name='name' and @value='EPR212A408000Z']"))
  (is (present? "//input[@name='tags' and @value='optocoupler']"))
  (is (present? "//input[@name='amount' and @value='7']"))

