   (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']"))
 

    (create-component component)

    ; check values of created components
    (is (present? (component-value-selector (:id component) (:name component))))
    (is (present? (component-value-selector (:id component) (:expected-tags-string component))))
    (is (present? (component-value-selector (:id component) (:amount component))))


  (to (:base-url params))
  (execute-script "localStorage.clear();")

  (refresh)

  ; guard: there is zero components
  (is (empty? (elements "//li[@class='ccomponent']")))

  (upload-file (fixture-path "export.json"))

  (wait-until (not-empty? (elements "//li[@class='component']")))
  (refresh)
  (wait-until (not-empty? (elements "//li[@class='component']"))))

(defn create-component [component]
  (click "//button[contains(text(), 'Add new')]")
  (wait-until (present? "//input[@name='name']"))
  (input-text "//input[@name='name']" (:name component))
  (input-text "//input[@name='tags']" (:tags-string component))
  (clear "//input[@name='amount']")
  (input-text "//input[@name='amount']" (str (:amount component)))
  (click "//button[contains(text(), 'Save')]"))
