-
Notifications
You must be signed in to change notification settings - Fork 0
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
cd8d468
commit 7eae77c
Showing
3 changed files
with
22 additions
and
7 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
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,21 @@ | ||
import { expect, test } from "@playwright/test"; | ||
|
||
test("can load yaml spec", async ({ page }) => { | ||
await page.goto( | ||
"/x?url=https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml", | ||
); | ||
await expect(page.title()).resolves.toMatch("OpenAPI Petstore"); | ||
await expect(page.locator("meta[name=description]").first()).toHaveAttribute( | ||
"content", | ||
"This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.", | ||
); | ||
}); | ||
|
||
test("can load json spec", async ({ page }) => { | ||
await page.goto("/x?url=https://generator3.swagger.io/openapi.json"); | ||
await expect(page.title()).resolves.toMatch("Swagger Generator"); | ||
await expect(page.locator("meta[name=description]").first()).toHaveAttribute( | ||
"content", | ||
"This is an online swagger codegen server. You can find out more at https://github.com/swagger-api/swagger-codegen or on [irc.freenode.net, #swagger](http://swagger.io/irc/).", | ||
); | ||
}); |
This file was deleted.
Oops, something went wrong.