Skip to content

Commit 7af8d4f

Browse files
committed
test: ensure expected updates are made
1 parent 4c7270e commit 7af8d4f

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/system/alpha/select_panel_test.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,6 +1328,25 @@ def test_eventually_local_form_multi_select_pre_selection
13281328
assert_equal ["3", "4"], response.dig(*%w(form_params item))
13291329
end
13301330

1331+
def test_eventually_local_form_selection_updates_with_selection
1332+
visit_preview(:eventually_local_fetch_form, route_format: :json)
1333+
1334+
assert_selector "input[type='hidden'][name='item'][value='3']", visible: :hidden
1335+
assert_selector "button", text: "Item: Phaser"
1336+
1337+
click_on_invoker_button
1338+
click_on_first_item
1339+
1340+
assert_selector "button", text: "Item: Photon torpedo"
1341+
assert_selector "input[type='hidden'][name='item'][value='1']", visible: :hidden
1342+
1343+
refute_selector "button", text: "Item: Phaser"
1344+
refute_selector "input[type='hidden'][name='item'][value='3']", visible: :hidden
1345+
1346+
response = JSON.parse(find("pre").text)
1347+
assert_equal "1", response.dig(*%w(form_params item))
1348+
end
1349+
13311350
########## ANNOUNCEMENT TESTS ############
13321351

13331352
def test_ev_loc_announces_items

0 commit comments

Comments
 (0)