widgetastic.patternfly5 23.10.10.0__py3-none-any.whl → 24.2.15.0__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.
- {widgetastic.patternfly5-23.10.10.0.dist-info → widgetastic.patternfly5-24.2.15.0.dist-info}/METADATA +1 -1
- {widgetastic.patternfly5-23.10.10.0.dist-info → widgetastic.patternfly5-24.2.15.0.dist-info}/RECORD +9 -8
- {widgetastic.patternfly5-23.10.10.0.dist-info → widgetastic.patternfly5-24.2.15.0.dist-info}/WHEEL +1 -1
- widgetastic_patternfly5/__init__.py +2 -0
- widgetastic_patternfly5/components/card.py +2 -2
- widgetastic_patternfly5/components/menus/context_selector.py +32 -0
- widgetastic_patternfly5/components/menus/dropdown.py +5 -3
- widgetastic_patternfly5/components/menus/options_menu.py +3 -2
- {widgetastic.patternfly5-23.10.10.0.dist-info → widgetastic.patternfly5-24.2.15.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: widgetastic.patternfly5
|
|
3
|
-
Version:
|
|
3
|
+
Version: 24.2.15.0
|
|
4
4
|
Summary: Patternfly5 widget library for Widgetastic.
|
|
5
5
|
Project-URL: repository, https://github.com/RedHatQE/widgetastic.patternfly5
|
|
6
6
|
Maintainer-email: Nikhil Dhandre <ndhandre@redhat.com>, Egor Shamardin <eshamard@redhat.com>, Mike Shriver <mshriver@redhat.com>
|
{widgetastic.patternfly5-23.10.10.0.dist-info → widgetastic.patternfly5-24.2.15.0.dist-info}/RECORD
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
widgetastic_patternfly5/__init__.py,sha256=
|
|
1
|
+
widgetastic_patternfly5/__init__.py,sha256=Gd1zcwEgNJT7Xy-rA9kC6B7pkFbqz_wP9R9L6nccBrA,4706
|
|
2
2
|
widgetastic_patternfly5/ouia.py,sha256=QKgQzwuopZc_NhTqDa_fmxAbzOVElehfmnOE2JUm2VA,4128
|
|
3
3
|
widgetastic_patternfly5/charts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
widgetastic_patternfly5/charts/bullet_chart.py,sha256=G7-U1l9d8VlkiPKc3IfFtcleHAmM5WXsfAKwiyw5DEg,3737
|
|
@@ -10,7 +10,7 @@ widgetastic_patternfly5/components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQe
|
|
|
10
10
|
widgetastic_patternfly5/components/alert.py,sha256=lSh2TxSOxLob4VO0J7fr-W09R2_Sa4RLRtR5XBjA4_U,2613
|
|
11
11
|
widgetastic_patternfly5/components/breadcrumb.py,sha256=_lQ7pqmh2P9FSwMae_quUTteHsfXFlQvYaXE4Z1gK1g,2035
|
|
12
12
|
widgetastic_patternfly5/components/button.py,sha256=taiZYjFez5zVyOUBklIIz-kEGFLjigf0I97G2PYepCI,3621
|
|
13
|
-
widgetastic_patternfly5/components/card.py,sha256=
|
|
13
|
+
widgetastic_patternfly5/components/card.py,sha256=wwk9QqXl66ikvZ0Q40Sir0JWI2AHxtYSNCRZOJB1YfA,2783
|
|
14
14
|
widgetastic_patternfly5/components/chip.py,sha256=kLSoDHtc3IpayEupGap64cG3uCuroY7YMeG51-6_-ds,11047
|
|
15
15
|
widgetastic_patternfly5/components/clipboard_copy.py,sha256=klEgT2RN4Sc7pd7Erwlxyj6ahOwexeMkTzyn6cCHNRk,1352
|
|
16
16
|
widgetastic_patternfly5/components/description_list.py,sha256=sVhKwKnvJguZh9FqyPC1NU2UA_w7uA3ugkY5eoVRlPk,989
|
|
@@ -31,12 +31,13 @@ widgetastic_patternfly5/components/forms/__init__.py,sha256=47DEQpj8HBSa-_TImW-5
|
|
|
31
31
|
widgetastic_patternfly5/components/forms/form_select.py,sha256=jQUpwJnJnOl5_0XzeplpHx9vz-6GMXUETny-F1TAU-o,3649
|
|
32
32
|
widgetastic_patternfly5/components/forms/radio.py,sha256=9I7P9hsKRojGvTZtSsqVTI_4ek_qIYKEdamSdUfxsMA,2099
|
|
33
33
|
widgetastic_patternfly5/components/menus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
34
|
-
widgetastic_patternfly5/components/menus/
|
|
34
|
+
widgetastic_patternfly5/components/menus/context_selector.py,sha256=uMumIPxuY3f_r5o9JrMibiPQgpFjRaFQwwo08_rVeMQ,1150
|
|
35
|
+
widgetastic_patternfly5/components/menus/dropdown.py,sha256=5nCz0HRG4VcrzD1NFC9Hj1m2T4yHihfNf2MNQWnBOEk,9478
|
|
35
36
|
widgetastic_patternfly5/components/menus/menu.py,sha256=0cUb5V1y3RgRpdAB8DlPIL9OOl7IxBC8A1xjcZgfLBA,7949
|
|
36
37
|
widgetastic_patternfly5/components/menus/menu_toggle.py,sha256=PBwNvg6E2RPdCG6ALBUqyTZxCwThJgk5S-9ghTiZ9hM,1029
|
|
37
|
-
widgetastic_patternfly5/components/menus/options_menu.py,sha256=
|
|
38
|
+
widgetastic_patternfly5/components/menus/options_menu.py,sha256=43D0_JHeY-kPORQi54NL9OVmcMyAolVnI4dqHpo5omY,1353
|
|
38
39
|
widgetastic_patternfly5/components/menus/select.py,sha256=2nb78mGsdzgmYrtdvvRf2N51iKUDl2VeyE7qEjWl4qQ,5711
|
|
39
|
-
widgetastic.patternfly5-
|
|
40
|
-
widgetastic.patternfly5-
|
|
41
|
-
widgetastic.patternfly5-
|
|
42
|
-
widgetastic.patternfly5-
|
|
40
|
+
widgetastic.patternfly5-24.2.15.0.dist-info/METADATA,sha256=R4rs_a7VQOH4YHFBNBqb2N2CCbWXWBN9yGJk8sjAFPY,6640
|
|
41
|
+
widgetastic.patternfly5-24.2.15.0.dist-info/WHEEL,sha256=TJPnKdtrSue7xZ_AVGkp9YXcvDrobsjBds1du3Nx6dc,87
|
|
42
|
+
widgetastic.patternfly5-24.2.15.0.dist-info/licenses/LICENSE,sha256=nDhhj8jp0XsTdmvWpTWFpOKVn0LPXPb6ecA9zFF3Exk,576
|
|
43
|
+
widgetastic.patternfly5-24.2.15.0.dist-info/RECORD,,
|
|
@@ -30,6 +30,7 @@ from .components.forms.form_select import FormSelectDisabled
|
|
|
30
30
|
from .components.forms.form_select import FormSelectOptionDisabled
|
|
31
31
|
from .components.forms.form_select import FormSelectOptionNotFound
|
|
32
32
|
from .components.forms.radio import Radio
|
|
33
|
+
from .components.menus.context_selector import ContextSelector
|
|
33
34
|
from .components.menus.dropdown import Dropdown
|
|
34
35
|
from .components.menus.dropdown import DropdownDisabled
|
|
35
36
|
from .components.menus.dropdown import DropdownItemDisabled
|
|
@@ -90,6 +91,7 @@ __all__ = [
|
|
|
90
91
|
"ColumnNotExpandable",
|
|
91
92
|
"CompactPagination",
|
|
92
93
|
"CompoundExpandableTable",
|
|
94
|
+
"ContextSelector",
|
|
93
95
|
"DataPoint",
|
|
94
96
|
"DescriptionList",
|
|
95
97
|
"DonutChart",
|
|
@@ -35,7 +35,7 @@ class BaseCard:
|
|
|
35
35
|
|
|
36
36
|
class Card(BaseCard, GenericLocatorWidget):
|
|
37
37
|
DEFAULT_LOCATOR = (
|
|
38
|
-
".//div[@data-ouia-component-type='PF5/Card'] | .//article[contains(@class, '
|
|
38
|
+
".//div[@data-ouia-component-type='PF5/Card'] | .//article[contains(@class, '-c-card')]"
|
|
39
39
|
)
|
|
40
40
|
|
|
41
41
|
def __init__(self, parent, locator=None, logger=None):
|
|
@@ -47,7 +47,7 @@ class Card(BaseCard, GenericLocatorWidget):
|
|
|
47
47
|
|
|
48
48
|
class CardForCardGroup(BaseCard, ParametrizedView):
|
|
49
49
|
DEFAULT_LOCATOR = (
|
|
50
|
-
"(.//div[@data-ouia-component-type='PF5/Card'] | .//article[contains(@class, '
|
|
50
|
+
"(.//div[@data-ouia-component-type='PF5/Card'] | .//article[contains(@class, '-c-card')])"
|
|
51
51
|
)
|
|
52
52
|
|
|
53
53
|
def __init__(self, parent, locator=None, logger=None, **kwargs):
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from .select import Select
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class BaseContextSelector:
|
|
5
|
+
ITEMS_LOCATOR = (
|
|
6
|
+
".//ul[@class='pf-v5-c-menu__list' or @class='pf-c-context-selector__menu-list']/li"
|
|
7
|
+
)
|
|
8
|
+
ITEM_LOCATOR = (
|
|
9
|
+
".//*[(contains(@class, 'pf-v5-c-menu__item') or contains(@class, "
|
|
10
|
+
"'pf-c-context-selector__menu-list-item'))"
|
|
11
|
+
" and normalize-space(.)={}]"
|
|
12
|
+
)
|
|
13
|
+
SEARCH_INPUT_LOCATOR = ".//input[@type='search' or @type='text']"
|
|
14
|
+
SEARCH_BUTTON_LOCATOR = ".//button[contains(@aria-label, 'Search')]"
|
|
15
|
+
|
|
16
|
+
def item_select(self, item, use_search=False):
|
|
17
|
+
"""Opens the Context Selector and selects the desired item.
|
|
18
|
+
|
|
19
|
+
Args:
|
|
20
|
+
item: Item to be selected
|
|
21
|
+
use_search: whether to search for item before selecting it
|
|
22
|
+
"""
|
|
23
|
+
self.logger.info("Selecting %r in %r", item, self)
|
|
24
|
+
with self.opened():
|
|
25
|
+
if use_search:
|
|
26
|
+
self.browser.send_keys(item, self.SEARCH_INPUT_LOCATOR)
|
|
27
|
+
self.browser.click(self.SEARCH_BUTTON_LOCATOR)
|
|
28
|
+
self.browser.click(self.item_element(item, close=False))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class ContextSelector(BaseContextSelector, Select):
|
|
32
|
+
pass
|
|
@@ -65,9 +65,11 @@ class BaseDropdown:
|
|
|
65
65
|
@property
|
|
66
66
|
def is_open(self):
|
|
67
67
|
"""Returns True if the Dropdown is open"""
|
|
68
|
-
return
|
|
69
|
-
self.BUTTON_LOCATOR
|
|
70
|
-
|
|
68
|
+
return (
|
|
69
|
+
"pf-m-expanded" in self.browser.classes(self.BUTTON_LOCATOR)
|
|
70
|
+
or "pf-m-expanded" in self.browser.classes(self)
|
|
71
|
+
or self.browser.attributes(self.BUTTON_LOCATOR).get("aria-expanded") == "true"
|
|
72
|
+
)
|
|
71
73
|
|
|
72
74
|
def open(self):
|
|
73
75
|
"""Opens a dropdown."""
|
|
@@ -16,9 +16,10 @@ class BaseOptionsMenu:
|
|
|
16
16
|
TEXT_LOCATOR = (
|
|
17
17
|
'.//div[contains(@class, "-c-options-menu") and child::button[normalize-space(.)={}]]'
|
|
18
18
|
)
|
|
19
|
+
# PF4/5 backward compatibility locator
|
|
19
20
|
DEFAULT_LOCATOR = (
|
|
20
|
-
"
|
|
21
|
-
"contains(@class, '-c-options-menu')]/parent::div)[1]"
|
|
21
|
+
".//div[contains(@data-ouia-component-type, 'PaginationOptionsMenu')] | "
|
|
22
|
+
"(.//button[contains(@class, '-c-menu-toggle') or contains(@class, '-c-options-menu')]/parent::div)[1]" # noqa
|
|
22
23
|
)
|
|
23
24
|
|
|
24
25
|
SELECTED_ITEMS_LOCATOR = (
|
|
File without changes
|