-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.ts
More file actions
97 lines (90 loc) · 1.79 KB
/
Copy pathconstants.ts
File metadata and controls
97 lines (90 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/**
* Custom waits for various test scenarios
* Unit: milliseconds
*/
export enum CUSTOM_WAIT {
QUICK_WAIT = 2500,
MEDIUM_WAIT = 10000,
SLOW_WAIT = 15000,
VERY_SLOW_WAIT = 25000,
}
/**
* Test Tags for categorizing and filtering tests
* Usage: test('@smoke', () => { ... })
*/
export enum TestTags {
SMOKE = '@smoke',
REGRESSION = '@regression',
SANITY = '@sanity',
E2E = '@e2e',
API = '@api',
INTEGRATION = '@integration',
CRITICAL = '@critical',
SLOW = '@slow',
FLAKY = '@flaky',
}
/**
* Test timeouts for different test categories
* Unit: milliseconds
*/
export enum TestTimeouts {
QUICK = 5000, // Quick unit tests
STANDARD = 30000, // Standard API/E2E tests
EXTENDED = 60000, // Slow operations, uploads, downloads
VERY_SLOW = 120000, // Very slow operations
}
/**
* Default waits between actions
* Unit: milliseconds
*/
export enum DefaultWaits {
QUICK = 500,
SHORT = 1000,
MEDIUM = 2000,
NORMAL = 3000,
LONG = 5000,
VERY_LONG = 10000,
}
/**
* HTTP Status Codes for API testing
*/
export enum APIResponseCodes {
OK = 200,
CREATED = 201,
ACCEPTED = 202,
NO_CONTENT = 204,
BAD_REQUEST = 400,
UNAUTHORIZED = 401,
FORBIDDEN = 403,
NOT_FOUND = 404,
CONFLICT = 409,
UNPROCESSABLE_ENTITY = 422,
INTERNAL_SERVER_ERROR = 500,
SERVICE_UNAVAILABLE = 503,
}
/**
* Allure Severity levels for test categorization
*/
export enum AllureSeverity {
BLOCKER = 'blocker',
CRITICAL = 'critical',
MAJOR = 'major',
MINOR = 'minor',
TRIVIAL = 'trivial',
}
/**
* Browser context isolation levels
*/
export enum ContextIsolation {
NONE = 'none',
SESSION = 'session',
FULL = 'full',
}
/**
* Retry strategies for flaky operations
*/
export const RETRY_CONFIG = {
API_RETRIES: 3,
E2E_RETRIES: 1,
WAIT_BETWEEN_RETRIES: 1000,
} as const;