Skip to content

Commit 6ac58c1

Browse files
committed
MOB-44726: Unit test
1 parent e783e33 commit 6ac58c1

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

tests/unit/modules/_selenium/test_javascript.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,35 @@ def test_command_line(self):
263263
self.assertIn("--repeat-each 30", self.CMD_LINE)
264264
self.assertIn("--workers 10", self.CMD_LINE)
265265
self.assertIn("-project=firefox", self.CMD_LINE)
266+
self.assertIn("-reporter \"@taurus/playwright-custom-reporter\"", self.CMD_LINE)
267+
self.assertIn("-g 'has title'", self.CMD_LINE)
268+
self.assertEqual('60000', self.ENV.get("TAURUS_PWREPORT_DURATION", "undefined"))
269+
270+
def test_command_line_additional_reporter(self):
271+
self.simple_run({
272+
'execution': {
273+
'iterations': 3,
274+
'concurrency': 10,
275+
'hold-for': '1m',
276+
'settings': {
277+
'env': {
278+
'BASE_URL': 'https://blazedemo.com/'
279+
}
280+
},
281+
'scenario': {
282+
"script": RESOURCES_DIR + "playwright",
283+
'browser': 'firefox',
284+
'test': 'has title',
285+
'reporters': ['"json" ']
286+
},
287+
'executor': 'playwright',
288+
},
289+
})
290+
self.assertIn("npx playwright test", self.CMD_LINE)
291+
self.assertIn("--repeat-each 30", self.CMD_LINE)
292+
self.assertIn("--workers 10", self.CMD_LINE)
293+
self.assertIn("-project=firefox", self.CMD_LINE)
294+
self.assertIn("-reporter \"@taurus/playwright-custom-reporter,json\"", self.CMD_LINE)
266295
self.assertIn("-g 'has title'", self.CMD_LINE)
267296
self.assertEqual('60000', self.ENV.get("TAURUS_PWREPORT_DURATION", "undefined"))
268297

0 commit comments

Comments
 (0)