Promium 3.7.0__tar.gz → 3.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {promium-3.7.0 → promium-3.7.2}/PKG-INFO +1 -1
- {promium-3.7.0 → promium-3.7.2}/Promium.egg-info/PKG-INFO +1 -1
- {promium-3.7.0 → promium-3.7.2}/promium/plugin.py +29 -25
- {promium-3.7.0 → promium-3.7.2}/setup.py +1 -1
- {promium-3.7.0 → promium-3.7.2}/LICENSE +0 -0
- {promium-3.7.0 → promium-3.7.2}/Promium.egg-info/SOURCES.txt +0 -0
- {promium-3.7.0 → promium-3.7.2}/Promium.egg-info/dependency_links.txt +0 -0
- {promium-3.7.0 → promium-3.7.2}/Promium.egg-info/entry_points.txt +0 -0
- {promium-3.7.0 → promium-3.7.2}/Promium.egg-info/requires.txt +0 -0
- {promium-3.7.0 → promium-3.7.2}/Promium.egg-info/top_level.txt +0 -0
- {promium-3.7.0 → promium-3.7.2}/README.rst +0 -0
- {promium-3.7.0 → promium-3.7.2}/doc/__init__.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/doc/conf.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/__init__.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/_diag.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/assertions.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/base.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/browsers.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/common.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/device_config.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/elements/__init__.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/elements/checkbox.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/elements/drop_downs.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/elements/frame.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/elements/input_field.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/elements/link.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/elements/multiselect_listbox.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/elements/radio_button.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/elements/textarea_field.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/elements/upload_button.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/exceptions.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/expected_conditions.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/helpers.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/logger.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/support/__init__.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/support/settings.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/test_case.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/promium/waits.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/pyproject.toml +0 -0
- {promium-3.7.0 → promium-3.7.2}/setup.cfg +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/__init__.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/config.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/conftest.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/pages/__init__.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/pages/catalog_404_page.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/pages/catalog_gallery_page.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/settings/__init__.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/settings/test_base.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/settings/test_chrome.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/settings/test_edge.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/settings/test_firefox.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/settings/test_ie.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/settings/test_opera.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/test_catalog_404.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/test_catalog_gallery.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/test_enviroment.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/test_requests.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/test_soft_asserts.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/test_waits.py +0 -0
- {promium-3.7.0 → promium-3.7.2}/tests/urls.py +0 -0
|
@@ -269,25 +269,39 @@ def logger(request: pytest.FixtureRequest) -> logging.Logger:
|
|
|
269
269
|
return logging.getLogger()
|
|
270
270
|
|
|
271
271
|
|
|
272
|
+
def color_msg(msg: str, color: str = "bold red") -> str:
|
|
273
|
+
if os.getenv("PROMIUM_ASSERTION_PANEL_MONO_COLOR", False): # noqa: PLW1508
|
|
274
|
+
return msg
|
|
275
|
+
return f"[{color}]{msg}[/{color}]"
|
|
276
|
+
|
|
277
|
+
|
|
272
278
|
@pytest.mark.trylast
|
|
273
279
|
def pytest_runtest_call(item: pytest.Item) -> None:
|
|
274
280
|
separator = "-" * 46
|
|
275
|
-
if os.getenv("PROMIUM_ASSERTION_PANEL_WIDTH"):
|
|
281
|
+
if PANEL_WIDTH := os.getenv("PROMIUM_ASSERTION_PANEL_WIDTH"):
|
|
276
282
|
from rich.console import Console # noqa: PLC0415
|
|
277
283
|
from rich.panel import Panel # noqa: PLC0415
|
|
278
284
|
from rich.text import Text # noqa: PLC0415
|
|
279
285
|
|
|
286
|
+
try:
|
|
287
|
+
terminal_width = os.get_terminal_size().columns
|
|
288
|
+
except Exception:
|
|
289
|
+
terminal_width = 120
|
|
290
|
+
|
|
291
|
+
try:
|
|
292
|
+
PANEL_WIDTH = int(PANEL_WIDTH)
|
|
293
|
+
if PANEL_WIDTH < 0 or terminal_width < PANEL_WIDTH:
|
|
294
|
+
PANEL_WIDTH = terminal_width
|
|
295
|
+
except Exception:
|
|
296
|
+
PANEL_WIDTH = terminal_width
|
|
297
|
+
if os.getenv("PROMIUM_ASSERTION_PANEL_MONO_COLOR", False): # noqa: PLW1508
|
|
298
|
+
border_style = "none"
|
|
299
|
+
else:
|
|
300
|
+
border_style = "red"
|
|
301
|
+
|
|
280
302
|
if hasattr(item.config, "assertion_errors"):
|
|
281
303
|
if item.config.assertion_errors:
|
|
282
|
-
if PANEL_WIDTH
|
|
283
|
-
terminal_width = os.get_terminal_size().columns
|
|
284
|
-
try:
|
|
285
|
-
PANEL_WIDTH = int(PANEL_WIDTH)
|
|
286
|
-
if PANEL_WIDTH < 0 or terminal_width < PANEL_WIDTH:
|
|
287
|
-
PANEL_WIDTH = terminal_width
|
|
288
|
-
except Exception:
|
|
289
|
-
PANEL_WIDTH = terminal_width
|
|
290
|
-
|
|
304
|
+
if PANEL_WIDTH:
|
|
291
305
|
string_io = io.StringIO()
|
|
292
306
|
console = Console(
|
|
293
307
|
file=string_io,
|
|
@@ -297,8 +311,8 @@ def pytest_runtest_call(item: pytest.Item) -> None:
|
|
|
297
311
|
for error_text in item.config.assertion_errors:
|
|
298
312
|
rich_panel = Panel(
|
|
299
313
|
Text(error_text.strip(), justify="left"),
|
|
300
|
-
title="
|
|
301
|
-
border_style=
|
|
314
|
+
title=color_msg("Soft Assertion Error"),
|
|
315
|
+
border_style=border_style,
|
|
302
316
|
padding=(1, 2),
|
|
303
317
|
)
|
|
304
318
|
console.print(rich_panel)
|
|
@@ -314,15 +328,7 @@ def pytest_runtest_call(item: pytest.Item) -> None:
|
|
|
314
328
|
if item.config.getoption("--check-console"):
|
|
315
329
|
if hasattr(item.config, "check_console_errors"):
|
|
316
330
|
if console_errors := item.config.check_console_errors(item):
|
|
317
|
-
if PANEL_WIDTH
|
|
318
|
-
terminal_width = os.get_terminal_size().columns
|
|
319
|
-
try:
|
|
320
|
-
PANEL_WIDTH = int(PANEL_WIDTH)
|
|
321
|
-
if PANEL_WIDTH < 0 or terminal_width < PANEL_WIDTH:
|
|
322
|
-
PANEL_WIDTH = terminal_width
|
|
323
|
-
except Exception:
|
|
324
|
-
PANEL_WIDTH = terminal_width
|
|
325
|
-
|
|
331
|
+
if PANEL_WIDTH:
|
|
326
332
|
string_io = io.StringIO()
|
|
327
333
|
console = Console(
|
|
328
334
|
file=string_io,
|
|
@@ -332,10 +338,8 @@ def pytest_runtest_call(item: pytest.Item) -> None:
|
|
|
332
338
|
for error_text in console_errors:
|
|
333
339
|
rich_panel = Panel(
|
|
334
340
|
Text(error_text.strip(), justify="left"),
|
|
335
|
-
title="
|
|
336
|
-
|
|
337
|
-
"[/bold red]",
|
|
338
|
-
border_style="red",
|
|
341
|
+
title=color_msg("Browser console js errors found"),
|
|
342
|
+
border_style=border_style,
|
|
339
343
|
padding=(1, 2),
|
|
340
344
|
)
|
|
341
345
|
console.print(rich_panel)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|