File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ describe ( "#9158: Reset button creates invalid inputs in the Try It Out form" , ( ) => {
2+ it ( "it reset the user edited value and executes with the default value in case of try out reset. (#6517)" , ( ) => {
3+ cy
4+ . visit ( "?url=/documents/bugs/9158.yaml" )
5+ . get ( "#operations-default-post_users" )
6+ . click ( )
7+ // Expand Try It Out
8+ . get ( ".try-out__btn" )
9+ . click ( )
10+ // replace multiple default values with bad value
11+ . get ( `.parameters[data-property-name="name"] input[type=text]` )
12+ . type ( "{selectall}not the default name value" )
13+ . get ( `.parameters[data-property-name="badgeid"] input[type=text]` )
14+ . type ( "{selectall}not the default badge value" )
15+ // Reset Try It Out
16+ . get ( ".try-out__btn.reset" )
17+ . click ( )
18+ // Submit using default value
19+ . get ( ".btn.execute" )
20+ . click ( )
21+ // No required validation error on body parameter
22+ . get ( `.parameters[data-property-name="name"] input` )
23+ . should ( "have.value" , "default name" )
24+ . and ( "not.have.class" , "invalid" )
25+ . get ( `.parameters[data-property-name="badgeid"] input` )
26+ . should ( "have.value" , "12345" )
27+ . and ( "not.have.class" , "invalid" )
28+ } )
29+ } )
Original file line number Diff line number Diff line change 1+ openapi : 3.0.3
2+ info :
3+ title : Test API
4+ version : 1.0.0
5+ paths :
6+ /users :
7+ post :
8+ summary : Create a user
9+ description : Create a user, one of various ways
10+ requestBody :
11+ content :
12+ application/x-www-form-urlencoded :
13+ schema :
14+ $ref : ' #/components/schemas/UserSource'
15+ responses :
16+ ' 204 ' :
17+ description : Successfully opened document
18+ ' 400 ' :
19+ description : Invalid request
20+ content :
21+ application/json :
22+ schema :
23+ properties :
24+ output :
25+ type : string
26+ example : " Invalid request"
27+ components :
28+ schemas :
29+ UserSource :
30+ type : object
31+ properties :
32+ name :
33+ description : Full name
34+ type : string
35+ example : " default name"
36+ badgeid :
37+ description : Badge number
38+ type : integer
39+ format : uint32
40+ example : 12345
41+ email :
42+ description : E-mail
43+ type : string
44+ example : " jsmith@business.com"
45+ minProperties : 1
46+ maxProperties : 3
You can’t perform that action at this time.
0 commit comments