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.
Files changed (60) hide show
  1. {promium-3.7.0 → promium-3.7.2}/PKG-INFO +1 -1
  2. {promium-3.7.0 → promium-3.7.2}/Promium.egg-info/PKG-INFO +1 -1
  3. {promium-3.7.0 → promium-3.7.2}/promium/plugin.py +29 -25
  4. {promium-3.7.0 → promium-3.7.2}/setup.py +1 -1
  5. {promium-3.7.0 → promium-3.7.2}/LICENSE +0 -0
  6. {promium-3.7.0 → promium-3.7.2}/Promium.egg-info/SOURCES.txt +0 -0
  7. {promium-3.7.0 → promium-3.7.2}/Promium.egg-info/dependency_links.txt +0 -0
  8. {promium-3.7.0 → promium-3.7.2}/Promium.egg-info/entry_points.txt +0 -0
  9. {promium-3.7.0 → promium-3.7.2}/Promium.egg-info/requires.txt +0 -0
  10. {promium-3.7.0 → promium-3.7.2}/Promium.egg-info/top_level.txt +0 -0
  11. {promium-3.7.0 → promium-3.7.2}/README.rst +0 -0
  12. {promium-3.7.0 → promium-3.7.2}/doc/__init__.py +0 -0
  13. {promium-3.7.0 → promium-3.7.2}/doc/conf.py +0 -0
  14. {promium-3.7.0 → promium-3.7.2}/promium/__init__.py +0 -0
  15. {promium-3.7.0 → promium-3.7.2}/promium/_diag.py +0 -0
  16. {promium-3.7.0 → promium-3.7.2}/promium/assertions.py +0 -0
  17. {promium-3.7.0 → promium-3.7.2}/promium/base.py +0 -0
  18. {promium-3.7.0 → promium-3.7.2}/promium/browsers.py +0 -0
  19. {promium-3.7.0 → promium-3.7.2}/promium/common.py +0 -0
  20. {promium-3.7.0 → promium-3.7.2}/promium/device_config.py +0 -0
  21. {promium-3.7.0 → promium-3.7.2}/promium/elements/__init__.py +0 -0
  22. {promium-3.7.0 → promium-3.7.2}/promium/elements/checkbox.py +0 -0
  23. {promium-3.7.0 → promium-3.7.2}/promium/elements/drop_downs.py +0 -0
  24. {promium-3.7.0 → promium-3.7.2}/promium/elements/frame.py +0 -0
  25. {promium-3.7.0 → promium-3.7.2}/promium/elements/input_field.py +0 -0
  26. {promium-3.7.0 → promium-3.7.2}/promium/elements/link.py +0 -0
  27. {promium-3.7.0 → promium-3.7.2}/promium/elements/multiselect_listbox.py +0 -0
  28. {promium-3.7.0 → promium-3.7.2}/promium/elements/radio_button.py +0 -0
  29. {promium-3.7.0 → promium-3.7.2}/promium/elements/textarea_field.py +0 -0
  30. {promium-3.7.0 → promium-3.7.2}/promium/elements/upload_button.py +0 -0
  31. {promium-3.7.0 → promium-3.7.2}/promium/exceptions.py +0 -0
  32. {promium-3.7.0 → promium-3.7.2}/promium/expected_conditions.py +0 -0
  33. {promium-3.7.0 → promium-3.7.2}/promium/helpers.py +0 -0
  34. {promium-3.7.0 → promium-3.7.2}/promium/logger.py +0 -0
  35. {promium-3.7.0 → promium-3.7.2}/promium/support/__init__.py +0 -0
  36. {promium-3.7.0 → promium-3.7.2}/promium/support/settings.py +0 -0
  37. {promium-3.7.0 → promium-3.7.2}/promium/test_case.py +0 -0
  38. {promium-3.7.0 → promium-3.7.2}/promium/waits.py +0 -0
  39. {promium-3.7.0 → promium-3.7.2}/pyproject.toml +0 -0
  40. {promium-3.7.0 → promium-3.7.2}/setup.cfg +0 -0
  41. {promium-3.7.0 → promium-3.7.2}/tests/__init__.py +0 -0
  42. {promium-3.7.0 → promium-3.7.2}/tests/config.py +0 -0
  43. {promium-3.7.0 → promium-3.7.2}/tests/conftest.py +0 -0
  44. {promium-3.7.0 → promium-3.7.2}/tests/pages/__init__.py +0 -0
  45. {promium-3.7.0 → promium-3.7.2}/tests/pages/catalog_404_page.py +0 -0
  46. {promium-3.7.0 → promium-3.7.2}/tests/pages/catalog_gallery_page.py +0 -0
  47. {promium-3.7.0 → promium-3.7.2}/tests/settings/__init__.py +0 -0
  48. {promium-3.7.0 → promium-3.7.2}/tests/settings/test_base.py +0 -0
  49. {promium-3.7.0 → promium-3.7.2}/tests/settings/test_chrome.py +0 -0
  50. {promium-3.7.0 → promium-3.7.2}/tests/settings/test_edge.py +0 -0
  51. {promium-3.7.0 → promium-3.7.2}/tests/settings/test_firefox.py +0 -0
  52. {promium-3.7.0 → promium-3.7.2}/tests/settings/test_ie.py +0 -0
  53. {promium-3.7.0 → promium-3.7.2}/tests/settings/test_opera.py +0 -0
  54. {promium-3.7.0 → promium-3.7.2}/tests/test_catalog_404.py +0 -0
  55. {promium-3.7.0 → promium-3.7.2}/tests/test_catalog_gallery.py +0 -0
  56. {promium-3.7.0 → promium-3.7.2}/tests/test_enviroment.py +0 -0
  57. {promium-3.7.0 → promium-3.7.2}/tests/test_requests.py +0 -0
  58. {promium-3.7.0 → promium-3.7.2}/tests/test_soft_asserts.py +0 -0
  59. {promium-3.7.0 → promium-3.7.2}/tests/test_waits.py +0 -0
  60. {promium-3.7.0 → promium-3.7.2}/tests/urls.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Promium
3
- Version: 3.7.0
3
+ Version: 3.7.2
4
4
  Summary: Selenium wrapper for testing Web UI
5
5
  Author: Denis Korytkin, Nataliia Guieva, Roman Zaporozhets, Vladimir Kritov, Oleh Dykusha
6
6
  Project-URL: Home page, https://none
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Promium
3
- Version: 3.7.0
3
+ Version: 3.7.2
4
4
  Summary: Selenium wrapper for testing Web UI
5
5
  Author: Denis Korytkin, Nataliia Guieva, Roman Zaporozhets, Vladimir Kritov, Oleh Dykusha
6
6
  Project-URL: Home page, https://none
@@ -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 := os.getenv("PROMIUM_ASSERTION_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="[bold red]Soft Assertion Error[/bold red]",
301
- border_style="red",
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 := os.getenv("PROMIUM_ASSERTION_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="[bold red]"
336
- "Browser console js errors found"
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)
@@ -19,7 +19,7 @@ LONG_DESCRIPTION = Path("README.rst").read_text(encoding="utf-8")
19
19
 
20
20
  setup(
21
21
  name="Promium",
22
- version="3.7.0",
22
+ version="3.7.2",
23
23
  install_requires=REQUIREMENTS,
24
24
  author=(
25
25
  "Denis Korytkin, Nataliia Guieva, "
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