]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/xul/staff_client/server/addon/pv_supa_goodstuff_tests/pv_supa_goodstuff_test1.expect
LP1615805 No inputs after submit in patron search (AngularJS)
[working/Evergreen.git] / Open-ILS / xul / staff_client / server / addon / pv_supa_goodstuff_tests / pv_supa_goodstuff_test1.expect
1 #!/usr/bin/expect -f
2 # This test simulates interaction with GoodStuff hardware for the purpose
3 # of RFID scanning a patron card.  The hardware is capable of fielding
4 # multiple such cards in one pass, but the staff client will close the
5 # connection after the first successful card.
6 #
7 # Prerequisites:
8 #
9 # Requires expect and netcat to be installed, and expects for a pristine
10 # load of EG's stock test data to be installed.  In the staff client,
11 # pv_supa_goodstuff should be listed in the Add-Ons list under Admin ->
12 # Workstation Administration -> Server Add-ons.  In the GoodStuff
13 # preferences section, Enabled should be checked, the IP/Hostname field
14 # should point to the server running this test script, and the port
15 # should be 5000.  Networking should be configured to allow the client
16 # machine to reach port 5000 on this server.  If netcat is not installed
17 # as /bin/nc, change the spawn line below as appropriate.
18 #
19 # Steps:
20 #
21 # 1) Ensure the staff client is configured as per the prerequisites, and
22 #    clear all tabs in the staff client.
23 # 2) Invoke this script.
24 # 3) In the staff client, press F1 or invoke Circulation -> Checkout
25 #    Items.  If the RFID checkbox is unchecked, check it.
26 # 4) The script should run without errors, and the staff client should
27 #    show an attempt at loading a patron with card "bad_card", and then
28 #    the patron with card "99999376669" should load.  The script should
29 #    end without errors.
30 #
31 set send_slow {1 .1}
32 proc send {ignore arg} {
33     sleep .1
34     exp_send -s -- $arg
35 }
36 set timeout -1
37 spawn "/bin/nc/" -l -p 5000
38 match_max 100000
39 expect "START|PATRON\r"
40 send -- "START|OK\r"
41 expect -exact "START|OK\r
42 "
43 send -- "bad_card\r"
44 expect -exact "bad_card\r
45 bad_card\r
46 "
47 send -- "99999376669\r"
48 expect -exact "99999376669\r
49 99999376669\r
50 END\r
51 "
52 expect eof