We decided to introduce an enum that contains a list of the status codes currently in use.
This will improve the overall project maintainability, and at the same time save us from code repetition.
enums directory created in src\api\enums
enum file created: src\api\enums\api-status-code.enum.ts with 5 status codes: 200, 400, 401, 404, 422
How to use it in tests
import file via:
import { HttpStatusCode } from "@_src_api/enums/api-status-code.enum";
when writing assertion use enum name and enum's member name, e.g.:
Closing due to the incorrect branch creation. Instead of creating a branch from main, I created it from my feature branch and it contained unrelated changes
Resolves #48
Scope of changes
We decided to introduce an enum that contains a list of the status codes currently in use. This will improve the overall project maintainability, and at the same time save us from code repetition.
src\api\enums
src\api\enums\api-status-code.enum.ts
with 5 status codes: 200, 400, 401, 404, 422How to use it in tests
import file via:
when writing assertion use enum name and enum's member name, e.g.:
PR steps completed:
kawqa-gad-playwright
project's git commit message formatAdditional scope of changes - not related to the initial PR