27
27
TEST_PLATFORMS = os .environ .get ('TEST_PLATFORMS' , 'linux/amd64' )
28
28
TEST_FIREFOX_INSTALL_LANG_PACKAGE = os .environ .get ('TEST_FIREFOX_INSTALL_LANG_PACKAGE' , 'false' ).lower () == 'true'
29
29
TEST_ADD_CAPS_RECORD_VIDEO = os .environ .get ('TEST_ADD_CAPS_RECORD_VIDEO' , 'true' ).lower () == 'true'
30
+ TEST_CUSTOM_SPECIFIC_NAME = os .environ .get ('TEST_CUSTOM_SPECIFIC_NAME' , 'false' ).lower () == 'true'
30
31
31
32
if SELENIUM_GRID_USERNAME and SELENIUM_GRID_PASSWORD :
32
33
SELENIUM_GRID_HOST = f"{ SELENIUM_GRID_USERNAME } :{ SELENIUM_GRID_PASSWORD } @{ SELENIUM_GRID_HOST } "
@@ -114,6 +115,9 @@ def test_download_file(self):
114
115
self .assertTrue (str (driver .get_downloadable_files ()[0 ]).endswith (file_name ))
115
116
116
117
def tearDown (self ):
118
+ if TEST_CUSTOM_SPECIFIC_NAME :
119
+ self .assertTrue (str (self .driver .capabilities ['myApp:version' ]) == 'beta' )
120
+ self .assertTrue (str (self .driver .capabilities ['myApp:publish' ]) == 'internal' )
117
121
try :
118
122
if TEST_DELAY_AFTER_TEST :
119
123
time .sleep (TEST_DELAY_AFTER_TEST )
@@ -133,6 +137,9 @@ def setUp(self):
133
137
options .add_argument ('disable-features=DownloadBubble,DownloadBubbleV2' )
134
138
if TEST_ADD_CAPS_RECORD_VIDEO :
135
139
options .set_capability ('se:recordVideo' , True )
140
+ if TEST_CUSTOM_SPECIFIC_NAME :
141
+ options .set_capability ('myApp:version' , 'beta' )
142
+ options .set_capability ('myApp:publish' , 'internal' )
136
143
options .set_capability ('se:name' , f"{ self ._testMethodName } ({ self .__class__ .__name__ } )" )
137
144
options .set_capability ('se:screenResolution' , '1920x1080' )
138
145
if SELENIUM_GRID_TEST_HEADLESS :
@@ -171,6 +178,9 @@ def setUp(self):
171
178
options .add_argument ('disable-features=DownloadBubble,DownloadBubbleV2' )
172
179
if TEST_ADD_CAPS_RECORD_VIDEO :
173
180
options .set_capability ('se:recordVideo' , True )
181
+ if TEST_CUSTOM_SPECIFIC_NAME :
182
+ options .set_capability ('myApp:version' , 'beta' )
183
+ options .set_capability ('myApp:publish' , 'internal' )
174
184
options .set_capability ('se:name' , f"{ self ._testMethodName } ({ self .__class__ .__name__ } )" )
175
185
options .set_capability ('se:screenResolution' , '1920x1080' )
176
186
if SELENIUM_GRID_TEST_HEADLESS :
@@ -201,6 +211,9 @@ def setUp(self):
201
211
options .profile = profile
202
212
if TEST_ADD_CAPS_RECORD_VIDEO :
203
213
options .set_capability ('se:recordVideo' , True )
214
+ if TEST_CUSTOM_SPECIFIC_NAME :
215
+ options .set_capability ('myApp:version' , 'beta' )
216
+ options .set_capability ('myApp:publish' , 'internal' )
204
217
options .set_capability ('se:name' , f"{ self ._testMethodName } ({ self .__class__ .__name__ } )" )
205
218
options .set_capability ('se:screenResolution' , '1920x1080' )
206
219
if SELENIUM_GRID_TEST_HEADLESS :
0 commit comments