9043: Initial commit testing for container request editing
[arvados.git] / apps / workbench / test / integration / container_requests_test.rb
1 require 'integration_helper'
2
3 class ContainerRequestsTest < ActionDispatch::IntegrationTest
4   setup do
5     need_javascript
6   end
7
8   test "enter a float for a number workflow input" do
9     # Poltergeist either does not support the HTML 5 <input
10     # type="number">, or interferes with the associated X-Editable
11     # validation code.  If the input field has type=number (forcing an
12     # integer), this test will yield a false positive under
13     # Poltergeist.  --Brett, 2015-02-05
14     need_selenium "for strict X-Editable input validation"
15     request_uuid = api_fixture("container_requests", "uncommitted", "uuid")
16     visit page_with_token("active", "/container_requests/#{request_uuid}")
17     INPUT_SELECTOR =
18       ".editable[data-name='[mounts][/var/lib/cwl/cwl.input.json][content][ex_double]']"
19     find(INPUT_SELECTOR).click
20     find(".editable-input input").set("12.34")
21     find("#editable-submit").click
22     assert_no_selector(".editable-popup")
23     assert_selector(INPUT_SELECTOR, text: "12.34")
24   end
25
26 end