Skip to content

Commit

Permalink
feat: add get & post example
Browse files Browse the repository at this point in the history
  - GET api example
  - POST api example
  - Form
  • Loading branch information
Pouiiro committed May 2, 2024
1 parent a6a9f08 commit d4c4393
Show file tree
Hide file tree
Showing 32 changed files with 4,367 additions and 96 deletions.
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"biomejs.biome",
"ms-playwright.playwright"
]
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ The plate currently includes:
- Bun testing
- React testing library
- Playwright
- GET example
- POST example

## Getting Started <a name = "getting_started"></a>

Expand Down
11 changes: 5 additions & 6 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
},
"formatter": {
"enabled": true,
"ignore": ["node_modules", "public", "dist", "bin"]
"ignore": ["node_modules", "public", "dist", "bin"],
"formatWithErrors": true
},
"linter": {
"ignore": ["node_modules", "public", "dist", "bin"],
Expand All @@ -22,8 +23,6 @@
"useConsistentArrayType": "error"
},
"nursery": {
"noUselessTernary": "error",
"useJsxKeyInIterable": "error",
"noDuplicateJsonKeys": "error"
}
}
Expand All @@ -33,15 +32,15 @@
"arrowParentheses": "always",
"bracketSameLine": true,
"bracketSpacing": true,
"jsxQuoteStyle": "double",
"jsxQuoteStyle": "single",
"quoteProperties": "asNeeded",
"semicolons": "asNeeded",
"trailingComma": "none",
"enabled": true,
"attributePosition": "auto",
"indentStyle": "tab",
"quoteStyle": "double",
"indentWidth": 4
"quoteStyle": "single",
"indentWidth": 2
}
}
}
Binary file modified bun.lockb
Binary file not shown.
8 changes: 8 additions & 0 deletions e2e/test.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,12 @@ test("Test E2E", async ({ page }) => {
})

await page.getByRole("link", { name: "Go back home" }).click()
await expect(page).toHaveURL("/")
await page.goto("/UnknownPage404")
await expect(page.locator("h1")).toHaveText("404 - Not found")
await expect(page.locator("p")).toHaveText(
"The requested content is not available"
)
await page.getByRole("link", { name: "Go back home" }).click()
await expect(page).toHaveURL("/")
})
Loading

0 comments on commit d4c4393

Please sign in to comment.