-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpaths.ts
More file actions
153 lines (133 loc) · 3.83 KB
/
Copy pathpaths.ts
File metadata and controls
153 lines (133 loc) · 3.83 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
import {join, relative} from 'node:path';
import type {
AbsolutePathToDirectory,
DirectoryPathFromRoot,
FilePathFromRoot,
} from '../types/internal';
/**
* Absolute path to the directory with installed e2ed package (usually in node_modules).
* @internal
*/
export const ABSOLUTE_PATH_TO_INSTALLED_E2ED_DIRECTORY = join(
__dirname,
'..',
) as AbsolutePathToDirectory;
/**
* Absolute path to the project root directory.
* @internal
*/
export const ABSOLUTE_PATH_TO_PROJECT_ROOT_DIRECTORY = process.cwd() as AbsolutePathToDirectory;
/**
* Relative (from root) path to installed e2ed package directory.
* @internal
*/
export const INSTALLED_E2ED_DIRECTORY_PATH = relative(
ABSOLUTE_PATH_TO_PROJECT_ROOT_DIRECTORY,
ABSOLUTE_PATH_TO_INSTALLED_E2ED_DIRECTORY,
) as DirectoryPathFromRoot;
/**
* Relative (from root) path to directory with autotests.
* @internal
*/
export const AUTOTESTS_DIRECTORY_PATH = 'autotests' as DirectoryPathFromRoot;
/**
* Relative (from root) path to `variables.env` file in directory with autotests.
* @internal
*/
export const DOT_ENV_PATH = join(AUTOTESTS_DIRECTORY_PATH, 'variables.env') as FilePathFromRoot;
/**
* Relative (from root) path to reports directory.
* @internal
*/
export const REPORTS_DIRECTORY_PATH = join(
AUTOTESTS_DIRECTORY_PATH,
'reports',
) as DirectoryPathFromRoot;
/**
* Name of internal directory with tests artifacts.
* @internal
*/
export const INTERNAL_DIRECTORY_NAME = 'internal';
/**
* Relative (from root) path to internal directory with tests artifacts.
* @internal
*/
export const INTERNAL_REPORTS_DIRECTORY_PATH = join(
REPORTS_DIRECTORY_PATH,
INTERNAL_DIRECTORY_NAME,
) as DirectoryPathFromRoot;
/**
* Relative (from root) path to directory with tests itself.
* @internal
*/
export const TESTS_DIRECTORY_PATH = join(
AUTOTESTS_DIRECTORY_PATH,
'tests',
) as DirectoryPathFromRoot;
/**
* Relative (from root) path to temporary directory.
* @internal
*/
export const TMP_DIRECTORY_PATH = join(REPORTS_DIRECTORY_PATH, 'tmp') as DirectoryPathFromRoot;
/**
* Relative (from root) path to file with total API statistics of run.
* @internal
*/
export const API_STATISTICS_PATH = join(
TMP_DIRECTORY_PATH,
'apiStatistics.txt',
) as FilePathFromRoot;
/**
* Relative (from root) path to directory with compiled pack configuration files.
* @internal
*/
export const COMPILED_USERLAND_CONFIG_DIRECTORY = join(
TMP_DIRECTORY_PATH,
'config',
) as DirectoryPathFromRoot;
/**
* Relative (from root) path to `config` file,
* that plays the role of the internal Playwright config.
* @internal
*/
export const CONFIG_PATH = join(INSTALLED_E2ED_DIRECTORY_PATH, 'config.js') as FilePathFromRoot;
/**
* Relative (from root) path to events directory.
* @internal
*/
export const EVENTS_DIRECTORY_PATH = join(TMP_DIRECTORY_PATH, 'events') as DirectoryPathFromRoot;
/**
* Relative (from root) path to temporary directory with expected screenshots
* (for `toMatchScreenshot` assert).
* @internal
*/
export const EXPECTED_SCREENSHOTS_DIRECTORY_PATH = join(
TMP_DIRECTORY_PATH,
'expectedScreenshots',
) as DirectoryPathFromRoot;
/**
* Relative (from root) path to file with global errors of run.
* @internal
*/
export const GLOBAL_ERRORS_PATH = join(TMP_DIRECTORY_PATH, 'globalErrors.txt') as FilePathFromRoot;
/**
* Relative (from root) path to file with global warnings of run.
* @internal
*/
export const GLOBAL_WARNINGS_PATH = join(
TMP_DIRECTORY_PATH,
'globalWarnings.txt',
) as FilePathFromRoot;
/**
* Relative (from root) path to directory with tests screenshots.
* @internal
*/
export const SCREENSHOTS_DIRECTORY_PATH = join(
REPORTS_DIRECTORY_PATH,
'screenshots',
) as DirectoryPathFromRoot;
/**
* Relative (from root) path to start info JSON file.
* @internal
*/
export const START_INFO_PATH = join(TMP_DIRECTORY_PATH, 'startInfo.json') as FilePathFromRoot;