cucu 1.0.0__py3-none-any.whl → 1.0.4__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.
- cucu/steps/file_input_steps.py +11 -2
- cucu/utils.py +4 -0
- {cucu-1.0.0.dist-info → cucu-1.0.4.dist-info}/METADATA +10 -10
- {cucu-1.0.0.dist-info → cucu-1.0.4.dist-info}/RECORD +7 -7
- {cucu-1.0.0.dist-info → cucu-1.0.4.dist-info}/WHEEL +0 -0
- {cucu-1.0.0.dist-info → cucu-1.0.4.dist-info}/entry_points.txt +0 -0
- {cucu-1.0.0.dist-info → cucu-1.0.4.dist-info}/licenses/LICENSE +0 -0
cucu/steps/file_input_steps.py
CHANGED
|
@@ -2,7 +2,7 @@ import os
|
|
|
2
2
|
|
|
3
3
|
import humanize
|
|
4
4
|
|
|
5
|
-
from cucu import fuzzy, logger, step
|
|
5
|
+
from cucu import fuzzy, logger, retry, step
|
|
6
6
|
from cucu.utils import take_saw_element_screenshot
|
|
7
7
|
|
|
8
8
|
|
|
@@ -69,7 +69,6 @@ JS_DROP_FILE = """
|
|
|
69
69
|
"""
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
@step('I drag and drop the file "{filepath}" to "{name}"')
|
|
73
72
|
def drag_and_drop_file(ctx, name, filepath):
|
|
74
73
|
drop_target = fuzzy.find(ctx.browser, name, ["*"])
|
|
75
74
|
drop_target_html = drop_target.get_attribute("outerHTML")
|
|
@@ -78,3 +77,13 @@ def drag_and_drop_file(ctx, name, filepath):
|
|
|
78
77
|
)
|
|
79
78
|
file_input = ctx.browser.execute(JS_DROP_FILE, drop_target, 0, 0)
|
|
80
79
|
file_input.send_keys(os.path.abspath(filepath))
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
@step('I drag and drop the file "{filepath}" to "{name}"')
|
|
83
|
+
def should_drag_and_drop_file(ctx, filepath, name):
|
|
84
|
+
drag_and_drop_file(ctx, name, filepath)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
@step('I wait to drag and drop the file "{filepath}" to "{name}"')
|
|
88
|
+
def wait_to_drag_and_drop_file(ctx, filepath, name):
|
|
89
|
+
retry(drag_and_drop_file)(ctx, name, filepath)
|
cucu/utils.py
CHANGED
|
@@ -11,6 +11,8 @@ import shutil
|
|
|
11
11
|
import humanize
|
|
12
12
|
from tabulate import DataRow, TableFormat, tabulate
|
|
13
13
|
from tenacity import (
|
|
14
|
+
after_log,
|
|
15
|
+
before_log,
|
|
14
16
|
before_sleep_log,
|
|
15
17
|
retry_if_not_exception_type,
|
|
16
18
|
stop_after_delay,
|
|
@@ -119,6 +121,8 @@ def retry(func, wait_up_to_s=None, retry_after_s=None):
|
|
|
119
121
|
stop=stop_after_delay(wait_up_to_s),
|
|
120
122
|
wait=wait_fixed(retry_after_s),
|
|
121
123
|
retry=retry_if_not_exception_type(StopRetryException),
|
|
124
|
+
before=before_log(logger, logging.DEBUG),
|
|
125
|
+
after=after_log(logger, logging.DEBUG),
|
|
122
126
|
before_sleep=before_sleep_log(logger, logging.DEBUG),
|
|
123
127
|
)
|
|
124
128
|
def new_decorator(*args, **kwargs):
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: cucu
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.4
|
|
4
4
|
Summary: Easy BDD web testing
|
|
5
|
-
|
|
5
|
+
Project-URL: Homepage, https://github.com/dominodatalab/cucu
|
|
6
|
+
Project-URL: Download, https://pypi.org/project/cucu/
|
|
7
|
+
Project-URL: Source Code, https://github.com/dominodatalab/cucu
|
|
8
|
+
Author-email: Domino Data Lab <open-source@dominodatalab.com>, Rodney Gomes <107359+rlgomes@users.noreply.github.com>, Cedric Young <4129217+ccedricyoung@users.noreply.github.com>, Xin Dong <104880864+ddl-xin@users.noreply.github.com>, Kavya <91882851+ddl-kavya@users.noreply.github.com>, Kevin Garton <71028750+ddl-kgarton@users.noreply.github.com>, Joy Liao <107583686+ddl-joy-liao@users.noreply.github.com>
|
|
9
|
+
Maintainer-email: Domino Data Lab <open-source@dominodatalab.com>, Cedric Young <4129217+ccedricyoung@users.noreply.github.com>, Kevin Garton <71028750+ddl-kgarton@users.noreply.github.com>, Brian Colby <92048365+ddl-bcolby@users.noreply.github.com>
|
|
6
10
|
License: The Clear BSD License
|
|
7
11
|
License-File: LICENSE
|
|
8
12
|
Keywords: behave,cucumber,selenium
|
|
@@ -43,14 +47,14 @@ Requires-Dist: tabulate~=0.9.0
|
|
|
43
47
|
Requires-Dist: tenacity~=9.0.0
|
|
44
48
|
Description-Content-Type: text/markdown
|
|
45
49
|
|
|
46
|
-
#  **CUCU** - Easy BDD web testing
|
|
50
|
+
#  **CUCU** - Easy BDD web testing <!-- omit from toc -->
|
|
47
51
|
|
|
48
52
|
End-to-end testing framework that uses [gherkin](https://cucumber.io/docs/gherkin/)
|
|
49
53
|
to drive various underlying tools/frameworks to create real world testing scenarios.
|
|
50
54
|
|
|
51
55
|
[](https://dl.circleci.com/status-badge/redirect/gh/dominodatalab/cucu/tree/main)
|
|
52
56
|
|
|
53
|
-
## Why cucu?
|
|
57
|
+
## Why cucu? <!-- omit from toc -->
|
|
54
58
|
1. Cucu avoids unnecessary abstractions (i.e. no Page Objects!) while keeping scenarios readable.
|
|
55
59
|
```gherkin
|
|
56
60
|
Feature: My First Cucu Test
|
|
@@ -70,19 +74,15 @@ to drive various underlying tools/frameworks to create real world testing scenar
|
|
|
70
74
|
7. Enables hierarchical configuration and env var and **CLI arg overrides**
|
|
71
75
|
8. Comes with a linter that is **customizable**
|
|
72
76
|
|
|
73
|
-
## Supporting docs
|
|
77
|
+
## Supporting docs <!-- omit from toc -->
|
|
74
78
|
1. [CHANGELOG.md](CHANGELOG.md) - for latest news
|
|
75
79
|
2. [CONTRIBUTING.md](CONTRIBUTING.md) - how we develop and test the library
|
|
76
80
|
3. [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
|
|
77
81
|
4. [CONTRIBUTORS.md](CONTRIBUTORS.md)
|
|
78
82
|
5. [LICENSE](LICENSE)
|
|
79
83
|
|
|
80
|
-
# Table of Contents
|
|
84
|
+
# Table of Contents <!-- omit from toc -->
|
|
81
85
|
|
|
82
|
-
- [ **CUCU** - Easy BDD web testing](#-cucu---easy-bdd-web-testing)
|
|
83
|
-
- [Why cucu?](#why-cucu)
|
|
84
|
-
- [Supporting docs](#supporting-docs)
|
|
85
|
-
- [Table of Contents](#table-of-contents)
|
|
86
86
|
- [Installation](#installation)
|
|
87
87
|
- [Requirements](#requirements)
|
|
88
88
|
- [Install Walkthrough](#install-walkthrough)
|
|
@@ -7,7 +7,7 @@ cucu/helpers.py,sha256=l_YMmbuXjtBRo-MER-qe6soUIyjt0ey2BoSgWs4zYwA,36285
|
|
|
7
7
|
cucu/hooks.py,sha256=3Z1mavU42XMQ0DZ7lVWwTB-BJYHRyYUOzzOtmkdIsow,7117
|
|
8
8
|
cucu/logger.py,sha256=LjJEzAKySlEiSmarpoeiMN4c29RIfrrERIk1swbdU4s,3343
|
|
9
9
|
cucu/page_checks.py,sha256=vkkZ9EyLCNBAwriED8ur3zS3flOYchXx-mMcrZF5dgY,2176
|
|
10
|
-
cucu/utils.py,sha256=
|
|
10
|
+
cucu/utils.py,sha256=608b28WVWgzmFMAMLXpFWeXe3NjRZEhpEfcTnYy2JRM,8611
|
|
11
11
|
cucu/browser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
cucu/browser/core.py,sha256=YAHhj6AMf7kpZR57thQaPHVHVHwnMBzCI0yofIYtfaY,2355
|
|
13
13
|
cucu/browser/frames.py,sha256=IW7kzRJn5PkbMaovIelAeCWO-T-2sOTwqaYBw-0-LKU,3545
|
|
@@ -60,7 +60,7 @@ cucu/steps/command_steps.py,sha256=nVCc8-TEitetk-zhk4z1wa0owqLQyHeQVH5THioUw-k,5
|
|
|
60
60
|
cucu/steps/comment_steps.py,sha256=KcU0Ya8XSjYEh8gdUGh0qsAxgB_Ru977E84yJaXrvz0,379
|
|
61
61
|
cucu/steps/draggable_steps.py,sha256=lnQLicp0GZJaxD_Qm2P13ruUZAsl3mptwaI5-SQ6XJ0,4655
|
|
62
62
|
cucu/steps/dropdown_steps.py,sha256=abykG--m79kDQ4LU1tm73fNLFPmrKDavyFzJb2MYCu0,15601
|
|
63
|
-
cucu/steps/file_input_steps.py,sha256=
|
|
63
|
+
cucu/steps/file_input_steps.py,sha256=U-glhJN62cBGZMsqhegoCVvqo_GLGQowVb9VO2WmQ98,2812
|
|
64
64
|
cucu/steps/filesystem_steps.py,sha256=8l37A-yPxT4Mzdi1JNSTShZkwyFxgSwnh6C0V-hM_RA,4741
|
|
65
65
|
cucu/steps/flow_control_steps.py,sha256=vlW0CsphVS9NvrOnpT8wSS2ngHmO3Z87H9siKIQwsAw,6365
|
|
66
66
|
cucu/steps/image_steps.py,sha256=4X6bdumsIybcJBuao83TURxWAIshZyCvKi1uTJEoy1k,941
|
|
@@ -76,8 +76,8 @@ cucu/steps/tables.js,sha256=Os2a7Fo-cg03XVli7USvcnBVad4N7idXr-HBuzdLvVQ,945
|
|
|
76
76
|
cucu/steps/text_steps.py,sha256=Jj_GHoHeemNwVdUOdqcehArNp7WM-WMjljA4w0pLXuw,2576
|
|
77
77
|
cucu/steps/variable_steps.py,sha256=WSctH3_xcxjijGPYZlxp-foC_SIAAKtF__saNtgZJbk,2966
|
|
78
78
|
cucu/steps/webserver_steps.py,sha256=_bvqJxF8BSIIufNItZMSyjijEJEEPJbEvwnqPHoM9Tg,1259
|
|
79
|
-
cucu-1.0.
|
|
80
|
-
cucu-1.0.
|
|
81
|
-
cucu-1.0.
|
|
82
|
-
cucu-1.0.
|
|
83
|
-
cucu-1.0.
|
|
79
|
+
cucu-1.0.4.dist-info/METADATA,sha256=yLEP4pCBUrnEfeASyxMahBAy6SEX47S_hAt5HzkmPOk,16238
|
|
80
|
+
cucu-1.0.4.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
81
|
+
cucu-1.0.4.dist-info/entry_points.txt,sha256=YEXTyEfIZbcV0GJ9R3Gfu3j6DcOJJK7_XHkJqE3Yiao,39
|
|
82
|
+
cucu-1.0.4.dist-info/licenses/LICENSE,sha256=WfgJYF9EaQoL_OeWr2Qd0MxhhFegDfzWSUmvDTwFxis,1721
|
|
83
|
+
cucu-1.0.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|