Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cypress): flakiness in oas3-multiple-media-types test #6571

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 40 additions & 40 deletions test/e2e-cypress/tests/features/oas3-multiple-media-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ describe("OpenAPI 3.0 Multiple Media Types with different schemas", () => {
it("should execute multipart/form-data", () => {
cy.get("@selectMediaType")
.select(mediaTypeFormData)
cy.get("@executeBtn")
.get("@executeBtn")
.click()
// cURL component
cy.get(".responses-wrapper .curl-command")
// cURL component
.get(".responses-wrapper .curl-command")
.should("exist")
.get(".responses-wrapper .curl-command span")
.should("contains.text", "bar")
Expand All @@ -42,14 +42,14 @@ describe("OpenAPI 3.0 Multiple Media Types with different schemas", () => {
it("should execute application/x-www-form-urlencoded THEN execute multipart/form-data", () => {
cy.get("@selectMediaType")
.select(mediaTypeUrlencoded)
cy.get("@executeBtn")
.get("@executeBtn")
.click()
cy.get("@selectMediaType")
.get("@selectMediaType")
.select(mediaTypeFormData)
cy.get("@executeBtn")
.get("@executeBtn")
.click()
// cURL component
cy.get(".responses-wrapper .curl-command")
// cURL component
.get(".responses-wrapper .curl-command")
.should("exist")
.get(".responses-wrapper .curl-command span")
.should("contains.text", "bar")
Expand All @@ -58,14 +58,14 @@ describe("OpenAPI 3.0 Multiple Media Types with different schemas", () => {
it("should execute application/json THEN execute multipart/form-data", () => {
cy.get("@selectMediaType")
.select(mediaTypeJson)
cy.get("@executeBtn")
.get("@executeBtn")
.click()
cy.get("@selectMediaType")
.get("@selectMediaType")
.select(mediaTypeFormData)
cy.get("@executeBtn")
.get("@executeBtn")
.click()
// cURL component
cy.get(".responses-wrapper .curl-command")
// cURL component
.get(".responses-wrapper .curl-command")
.should("exist")
.get(".responses-wrapper .curl-command span")
.should("contains.text", "bar")
Expand All @@ -77,10 +77,10 @@ describe("OpenAPI 3.0 Multiple Media Types with different schemas", () => {
it("should execute application/x-www-form-urlencoded", () => {
cy.get("@selectMediaType")
.select(mediaTypeUrlencoded)
cy.get("@executeBtn")
.get("@executeBtn")
.click()
// cURL component
cy.get(".responses-wrapper .curl-command")
// cURL component
.get(".responses-wrapper .curl-command")
.should("exist")
.get(".responses-wrapper .curl-command span")
.should("contains.text", "foo")
Expand All @@ -89,14 +89,14 @@ describe("OpenAPI 3.0 Multiple Media Types with different schemas", () => {
it("should execute multipart/form-data THEN execute application/x-www-form-urlencoded", () => {
cy.get("@selectMediaType")
.select(mediaTypeFormData)
cy.get("@executeBtn")
.get("@executeBtn")
.click()
cy.get("@selectMediaType")
.get("@selectMediaType")
.select(mediaTypeUrlencoded)
cy.get("@executeBtn")
.get("@executeBtn")
.click()
// cURL component
cy.get(".responses-wrapper .curl-command")
// cURL component
.get(".responses-wrapper .curl-command")
.should("exist")
.get(".responses-wrapper .curl-command span")
.should("contains.text", "foo")
Expand All @@ -105,14 +105,14 @@ describe("OpenAPI 3.0 Multiple Media Types with different schemas", () => {
it("should execute application/json THEN execute application/x-www-form-urlencoded", () => {
cy.get("@selectMediaType")
.select(mediaTypeJson)
cy.get("@executeBtn")
.get("@executeBtn")
.click()
cy.get("@selectMediaType")
.get("@selectMediaType")
.select(mediaTypeUrlencoded)
cy.get("@executeBtn")
.get("@executeBtn")
.click()
// cURL component
cy.get(".responses-wrapper .curl-command")
// cURL component
.get(".responses-wrapper .curl-command")
.should("exist")
.get(".responses-wrapper .curl-command span")
.should("contains.text", "foo")
Expand All @@ -126,12 +126,12 @@ describe("OpenAPI 3.0 Multiple Media Types with different schemas", () => {
// final curl should have both "bar" and "foo"
cy.get("@selectMediaType")
.select(mediaTypeJson)
cy.get("@executeBtn")
.get("@executeBtn")
.click()
cy.get("@executeBtn")
.get("@executeBtn")
.click()
// cURL component
cy.get(".responses-wrapper .curl-command")
// cURL component
.get(".responses-wrapper .curl-command")
.should("exist")
.get(".responses-wrapper .curl-command span")
.should("contains.text", "foo")
Expand All @@ -140,14 +140,14 @@ describe("OpenAPI 3.0 Multiple Media Types with different schemas", () => {
it("should execute multipart/form-data THEN execute application/json", () => {
cy.get("@selectMediaType")
.select(mediaTypeFormData)
cy.get("@executeBtn")
.get("@executeBtn")
.click()
cy.get("@selectMediaType")
.get("@selectMediaType")
.select(mediaTypeJson)
cy.get("@executeBtn")
.get("@executeBtn")
.click()
// cURL component
cy.get(".responses-wrapper .curl-command")
// cURL component
.get(".responses-wrapper .curl-command")
.should("exist")
.get(".responses-wrapper .curl-command span")
.should("contains.text", "foo")
Expand All @@ -157,14 +157,14 @@ describe("OpenAPI 3.0 Multiple Media Types with different schemas", () => {
// final curl should have both "bar" and "foo"
cy.get("@selectMediaType")
.select(mediaTypeUrlencoded)
cy.get("@executeBtn")
.get("@executeBtn")
.click()
cy.get("@selectMediaType")
.get("@selectMediaType")
.select(mediaTypeJson)
cy.get("@executeBtn")
.get("@executeBtn")
.click()
// cURL component
cy.get(".responses-wrapper .curl-command")
// cURL component
.get(".responses-wrapper .curl-command")
.should("exist")
.get(".responses-wrapper .curl-command span")
.should("contains.text", "foo")
Expand Down