cucu 1.3.17__py3-none-any.whl → 1.3.18__py3-none-any.whl

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.

Potentially problematic release.


This version of cucu might be problematic. Click here for more details.

@@ -152,7 +152,7 @@
152
152
  {% for image in step['screenshots'] %}
153
153
  <img class="mx-auto d-block img-fluid shadow bg-white rounded" id="{{ image['html_id'] }}" style="margin-bottom:15px" alt="{{ escape(image['label']) }}" title="{{ escape(image['label']) }}" src="{{ image['html_src'] }}"></img>
154
154
  {% if image['highlight'] %}
155
- <div class="step-image-highlight" id="{{ image['id']}}-highlight" height-ratio="{{ image['highlight']['height_ratio'] }}" width-ratio="{{ image['highlight']['width_ratio'] }}" top-ratio="{{ image['highlight']['top_ratio'] }}" left-ratio="{{ image['highlight']['left_ratio'] }}"></div>
155
+ <div class="step-image-highlight" id="{{ image['html_id']}}-highlight" height-ratio="{{ image['highlight']['height_ratio'] }}" width-ratio="{{ image['highlight']['width_ratio'] }}" top-ratio="{{ image['highlight']['top_ratio'] }}" left-ratio="{{ image['highlight']['left_ratio'] }}"></div>
156
156
  {% endif %}
157
157
  {% endfor %}
158
158
  </div>
@@ -1,5 +1,6 @@
1
1
  import base64
2
2
  import os
3
+ import re
3
4
 
4
5
  from selenium.webdriver.common.keys import Keys
5
6
 
@@ -81,6 +82,23 @@ def wait_to_see_the_current_url_is(ctx, value):
81
82
  retry(assert_url_is)(ctx, value)
82
83
 
83
84
 
85
+ def assert_url_matches(ctx, regex):
86
+ ctx.check_browser_initialized()
87
+ url = ctx.browser.get_current_url()
88
+ if not re.search(regex, url):
89
+ raise RuntimeError(f"current url {url} does not match {regex}")
90
+
91
+
92
+ @step('I should see the current url matches "{regex}"')
93
+ def should_see_the_current_url_matches(ctx, regex):
94
+ assert_url_matches(ctx, regex)
95
+
96
+
97
+ @step('I wait to see the current url matches "{regex}"')
98
+ def wait_to_see_the_current_url_matches(ctx, regex):
99
+ retry(assert_url_matches)(ctx, regex)
100
+
101
+
84
102
  @step('I save the current url to the variable "{variable}"')
85
103
  def save_current_url_to_variable(ctx, variable):
86
104
  ctx.check_browser_initialized()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: cucu
3
- Version: 1.3.17
3
+ Version: 1.3.18
4
4
  Summary: Easy BDD web testing
5
5
  Keywords: cucumber,selenium,behave
6
6
  Author: Domino Data Lab, Rodney Gomes, Cedric Young, Xin Dong, Kavya Yakkati, Kevin Garton, Joy Liao
@@ -62,10 +62,10 @@ cucu/reporter/templates/feature.html,sha256=UKnQKsCiU7MFm1QJscoyDYc-kbolaxJ9D6qq
62
62
  cucu/reporter/templates/flat.html,sha256=TGNwMxtqAmNbuxnBpWRKRTzo70Md1q_4tl0YnZW-iKY,2535
63
63
  cucu/reporter/templates/index.html,sha256=2rLHG0zKp7i9JFmCpL76ITy-uOd7atBm8PieIvkN_9o,2768
64
64
  cucu/reporter/templates/layout.html,sha256=2iDRbm8atO8mgHWgijIvDCrBMKvcP6YHrmr95WtJiE4,4561
65
- cucu/reporter/templates/scenario.html,sha256=X7nBlKR147idHZlbX3lJsH75_lHijeZBzCgADbcCsGk,12290
65
+ cucu/reporter/templates/scenario.html,sha256=lBR4-GE5GHoVuk2Ej2KjsrIUsG5tCNeVYTSDVPchpmw,12295
66
66
  cucu/steps/__init__.py,sha256=seSmASBlWu6-6wbFbvEbPwigBcRXiYP18C4X_2cW8Ng,753
67
67
  cucu/steps/base_steps.py,sha256=0fPvdaKoan8lMAKrDnK0-zrALpxm11P1zVAY5CN7iXA,1893
68
- cucu/steps/browser_steps.py,sha256=rI4QvNQVPTZrPhUmg2Qe7aCLQejVEGwWG2asensIcRg,12687
68
+ cucu/steps/browser_steps.py,sha256=wYtgGgDGIf_y5-4YzlYIaMj6ZYGlbUbv3n2bjc3pe24,13216
69
69
  cucu/steps/button_steps.py,sha256=ej3urWbdffi7HimmPbrdUBkdLIA_xYcfLlsqOF-5_5s,2713
70
70
  cucu/steps/checkbox_steps.py,sha256=B2HKFA-uwsrCa1DmzS7u1o1XH12b5BzLPg5qY1c445E,3386
71
71
  cucu/steps/command_steps.py,sha256=nVCc8-TEitetk-zhk4z1wa0owqLQyHeQVH5THioUw-k,5094
@@ -89,7 +89,7 @@ cucu/steps/text_steps.py,sha256=Jj_GHoHeemNwVdUOdqcehArNp7WM-WMjljA4w0pLXuw,2576
89
89
  cucu/steps/variable_steps.py,sha256=WSctH3_xcxjijGPYZlxp-foC_SIAAKtF__saNtgZJbk,2966
90
90
  cucu/steps/webserver_steps.py,sha256=i11xOmSjhhrQ-2QrDfpjDhWroeJuuGKvbYEsHV1cioI,1406
91
91
  cucu/utils.py,sha256=ixJS5wG8GFuZfHE-gRk0dG4lJXjyjQFbq3hJzLG0Uvw,11409
92
- cucu-1.3.17.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
93
- cucu-1.3.17.dist-info/entry_points.txt,sha256=11WRIhQM7LuUnQg1lAoZQoNvvBvYNN1maDgQS4djwJo,40
94
- cucu-1.3.17.dist-info/METADATA,sha256=O90o0Zasx0GHY9tJNFId4XttTZOfNo05KA74bdneKxQ,16722
95
- cucu-1.3.17.dist-info/RECORD,,
92
+ cucu-1.3.18.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
93
+ cucu-1.3.18.dist-info/entry_points.txt,sha256=11WRIhQM7LuUnQg1lAoZQoNvvBvYNN1maDgQS4djwJo,40
94
+ cucu-1.3.18.dist-info/METADATA,sha256=W3A4IBtW4Ne1F7dJs81zrbiI3DH4_kVgzMiGOPS57RE,16722
95
+ cucu-1.3.18.dist-info/RECORD,,
File without changes