forked from ng2-ui/auto-complete
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webtest.txt
59 lines (53 loc) · 1.67 KB
/
webtest.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
This is webtest commands running on 127.0.0.1:9002/app
To run this file, please run `npm test` or `webtest webtest.txt`
Test with Array of strings
open browser
go to http://localhost:9002
verify text 'selected model1: "is"' present
click #model1
clear "#model1"
press "t" into "#model1"
verify element "ul li:nth-child(1)" text is "this"
press "e" into "#model1"
verify element "ul li:nth-child(1)" text is "text"
press ENTER into "#model1"
verify element #model1 value is "text"
enter "invalid" into "#model1"
click "body"
verify element #model1 value is "text"
Test with array of id/value
verify element #model2 value is "One"
click link "Change It"
verify element #model2 value is "it"
click #model2
clear #model2
press "o" into "#model2"
verify element "ul li:nth-child(1)" text is "Select One"
verify element "ul li:nth-child(2)" text is "(1) One"
see "Select One"
click
verify element #model2 value is ""
enter text "four" into #model2
click "ul li:nth-child(2)"
verify element #model2 value is "Four"
Test with array of key/name
verify element #model3 value is "(3) Key Three"
click #model3
clear #model3
click body
click #model3
press ARROW_DOWN into "#model3"
press ARROW_DOWN into "#model3"
press ARROW_DOWN into "#model3"
press ENTER into "#model3"
verify element #model3 value is "(4) Key Four"
Test With Remote Source as HTTP URI String
click #model4
enter text "the white house" into "#model4"
verify text "DC 20500" present
Test With Remote Source as Observable
click #model5
enter text "hulk/Bruce" into "#model5"
verify text "Hulk/Bruce Banner" present
press ENTER into "#model5"
close browser