-
Notifications
You must be signed in to change notification settings - Fork 9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21d3a70
commit ea44396
Showing
2 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
describe("#9158: Reset button creates invalid inputs in the Try It Out form", () => { | ||
it("it reset the user edited value and executes with the default value in case of try out reset. (#6517)", () => { | ||
cy | ||
.visit("?url=/documents/bugs/9158.yaml") | ||
.get("#operations-default-post_users") | ||
.click() | ||
// Expand Try It Out | ||
.get(".try-out__btn") | ||
.click() | ||
// replace multiple default values with bad value | ||
.get(`.parameters[data-property-name="name"] input[type=text]`) | ||
.type("{selectall}not the default name value") | ||
.get(`.parameters[data-property-name="badgeid"] input[type=text]`) | ||
.type("{selectall}not the default badge value") | ||
// Reset Try It Out | ||
.get(".try-out__btn.reset") | ||
.click() | ||
// Submit using default value | ||
.get(".btn.execute") | ||
.click() | ||
// No required validation error on body parameter | ||
.get(`.parameters[data-property-name="name"] input`) | ||
.should("have.value", "default name") | ||
.and("not.have.class", "invalid") | ||
.get(`.parameters[data-property-name="badgeid"] input`) | ||
.should("have.value", "12345") | ||
.and("not.have.class", "invalid") | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
openapi: 3.0.3 | ||
info: | ||
title: Test API | ||
version: 1.0.0 | ||
paths: | ||
/users: | ||
post: | ||
summary: Create a user | ||
description: Create a user, one of various ways | ||
requestBody: | ||
content: | ||
application/x-www-form-urlencoded: | ||
schema: | ||
$ref: '#/components/schemas/UserSource' | ||
responses: | ||
'204': | ||
description: Successfully opened document | ||
'400': | ||
description: Invalid request | ||
content: | ||
application/json: | ||
schema: | ||
properties: | ||
output: | ||
type: string | ||
example: "Invalid request" | ||
components: | ||
schemas: | ||
UserSource: | ||
type: object | ||
properties: | ||
name: | ||
description: Full name | ||
type: string | ||
example: "default name" | ||
badgeid: | ||
description: Badge number | ||
type: integer | ||
format: uint32 | ||
example: 12345 | ||
email: | ||
description: E-mail | ||
type: string | ||
example: "[email protected]" | ||
minProperties: 1 | ||
maxProperties: 3 |