Skip to content

Commit 787b1aa

Browse files
author
Pau Tena
committed
Fix plywright tests
1 parent 21e440f commit 787b1aa

File tree

5 files changed

+45
-3
lines changed

5 files changed

+45
-3
lines changed

.github/workflows/deploy-staging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- staging
1515
env:
1616
ENVIRONMENT: staging
17-
PROJECT_NAME: my-full-stack-fastapi-template-staging
17+
PROJECT_NAME: my-full-stack-template-staging
1818
steps:
1919
- name: Checkout
2020
uses: actions/checkout@v4

docker-compose.override.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ services:
8484
SMTP_HOST: "mailcatcher"
8585
SMTP_PORT: "1025"
8686
SMTP_TLS: "false"
87+
SMTP_USER: ""
88+
SMTP_PASSWORD: ""
8789
EMAILS_FROM_EMAIL: "[email protected]"
8890

8991
mailcatcher:
@@ -113,14 +115,14 @@ services:
113115
depends_on:
114116
- backend
115117
- mailcatcher
116-
env_file:
117-
- .env
118118
environment:
119119
- VITE_API_URL=http://backend:8000
120120
- MAILCATCHER_HOST=http://mailcatcher:1080
121121
# For the reports when run locally
122122
- PLAYWRIGHT_HTML_HOST=0.0.0.0
123123
- CI=${CI}
124+
- FIRST_SUPERUSER=${FIRST_SUPERUSER}
125+
- FIRST_SUPERUSER_PASSWORD=${FIRST_SUPERUSER_PASSWORD}
124126
volumes:
125127
- ./frontend/blob-report:/app/blob-report
126128
- ./frontend/test-results:/app/test-results

frontend/src/client/sdk.gen.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ import type {
2323
LoginResetPasswordResponse,
2424
LoginRecoverPasswordHtmlContentData,
2525
LoginRecoverPasswordHtmlContentResponse,
26+
PrivateCreateUserData,
27+
PrivateCreateUserResponse,
2628
UsersReadUsersData,
2729
UsersReadUsersResponse,
2830
UsersCreateUserData,
@@ -272,6 +274,30 @@ export class LoginService {
272274
}
273275
}
274276

277+
export class PrivateService {
278+
/**
279+
* Create User
280+
* Create a new user.
281+
* @param data The data for the request.
282+
* @param data.requestBody
283+
* @returns UserPublic Successful Response
284+
* @throws ApiError
285+
*/
286+
public static createUser(
287+
data: PrivateCreateUserData,
288+
): CancelablePromise<PrivateCreateUserResponse> {
289+
return __request(OpenAPI, {
290+
method: "POST",
291+
url: "/api/v1/private/users/",
292+
body: data.requestBody,
293+
mediaType: "application/json",
294+
errors: {
295+
422: "Validation Error",
296+
},
297+
})
298+
}
299+
}
300+
275301
export class UsersService {
276302
/**
277303
* Read Users

frontend/src/client/types.gen.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ export type NewPassword = {
4444
new_password: string
4545
}
4646

47+
export type PrivateUserCreate = {
48+
email: string
49+
password: string
50+
full_name: string
51+
is_verified?: boolean
52+
}
53+
4754
export type Token = {
4855
access_token: string
4956
token_type?: string
@@ -158,6 +165,12 @@ export type LoginRecoverPasswordHtmlContentData = {
158165

159166
export type LoginRecoverPasswordHtmlContentResponse = string
160167

168+
export type PrivateCreateUserData = {
169+
requestBody: PrivateUserCreate
170+
}
171+
172+
export type PrivateCreateUserResponse = UserPublic
173+
161174
export type UsersReadUsersData = {
162175
limit?: number
163176
skip?: number

frontend/tests/auth.setup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { firstSuperuser, firstSuperuserPassword } from "./config.ts"
44
const authFile = "playwright/.auth/user.json"
55

66
setup("authenticate", async ({ page }) => {
7+
console.log("firstSuperuser", firstSuperuser, firstSuperuserPassword)
78
await page.goto("/login")
89
await page.getByPlaceholder("Email").fill(firstSuperuser)
910
await page.getByPlaceholder("Password").fill(firstSuperuserPassword)

0 commit comments

Comments
 (0)