widgetastic.patternfly5 25.5.16.1__py3-none-any.whl → 25.12.11.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/charts/donut_chart.py +10 -4
- widgetastic_patternfly5/charts/legend.py +7 -4
- widgetastic_patternfly5/components/date_and_time/calendar_month.py +7 -5
- {widgetastic.patternfly5-25.5.16.1.dist-info → widgetastic_patternfly5-25.12.11.0.dist-info}/METADATA +2 -2
- {widgetastic.patternfly5-25.5.16.1.dist-info → widgetastic_patternfly5-25.12.11.0.dist-info}/RECORD +7 -7
- {widgetastic.patternfly5-25.5.16.1.dist-info → widgetastic_patternfly5-25.12.11.0.dist-info}/WHEEL +1 -1
- {widgetastic.patternfly5-25.5.16.1.dist-info → widgetastic_patternfly5-25.12.11.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -5,9 +5,9 @@ from widgetastic.xpath import quote
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class DonutLegendItem(ParametrizedView, ClickableMixin):
|
|
8
|
-
PARAMETERS = ("
|
|
8
|
+
PARAMETERS = ("label_name",)
|
|
9
9
|
ROOT = ParametrizedLocator(
|
|
10
|
-
".//*[name()='text']/*[name()='tspan' and contains(., '{
|
|
10
|
+
".//*[name()='text']/*[name()='tspan' and contains(., '{label_name}:')]"
|
|
11
11
|
)
|
|
12
12
|
ALL_ITEMS = ".//*[name()='text']/*[name()='tspan']"
|
|
13
13
|
LEGEND_ITEM_REGEX = re.compile(r"(.*?): ([\d]+)")
|
|
@@ -32,8 +32,14 @@ class DonutLegendItem(ParametrizedView, ClickableMixin):
|
|
|
32
32
|
|
|
33
33
|
@classmethod
|
|
34
34
|
def all(cls, browser):
|
|
35
|
-
"""Returns a list of all
|
|
36
|
-
|
|
35
|
+
"""Returns a list of all item labels"""
|
|
36
|
+
result = []
|
|
37
|
+
for el in browser.elements(cls.ALL_ITEMS):
|
|
38
|
+
text = browser.text(el)
|
|
39
|
+
# Extract just the label
|
|
40
|
+
label, _ = cls._get_legend_item(text)
|
|
41
|
+
result.append((label,))
|
|
42
|
+
return result
|
|
37
43
|
|
|
38
44
|
|
|
39
45
|
class DonutLegend(View):
|
|
@@ -85,13 +85,16 @@ class DataPoint:
|
|
|
85
85
|
self.value = value
|
|
86
86
|
self.color = color
|
|
87
87
|
|
|
88
|
-
def __gt__(self,
|
|
89
|
-
return
|
|
88
|
+
def __gt__(self, other):
|
|
89
|
+
return isinstance(other, DataPoint) and self.value > other.value
|
|
90
90
|
|
|
91
|
-
def __eq__(self,
|
|
91
|
+
def __eq__(self, other):
|
|
92
92
|
return (
|
|
93
|
-
|
|
93
|
+
isinstance(other, DataPoint) and self.label == other.label and self.value == other.value
|
|
94
94
|
)
|
|
95
95
|
|
|
96
|
+
def __hash__(self):
|
|
97
|
+
return hash((self.label, self.value))
|
|
98
|
+
|
|
96
99
|
def __repr__(self):
|
|
97
100
|
return f"DataPoint({self.label}: {self.value})"
|
|
@@ -23,7 +23,9 @@ class BaseCalendarMonth:
|
|
|
23
23
|
YEAR_INPUT_LOCATOR = (
|
|
24
24
|
f"{CALENDAR_HEADER}//div[contains(@class, '-c-calendar-month__header-year')]//input"
|
|
25
25
|
)
|
|
26
|
-
DATE_LOCATOR =
|
|
26
|
+
DATE_LOCATOR = (
|
|
27
|
+
".//button[text()={date} and not(ancestor::td[contains(@class, 'pf-m-adjacent-month')])]"
|
|
28
|
+
)
|
|
27
29
|
|
|
28
30
|
PREV_BUTTON_LOCATOR = f"{CALENDAR_HEADER}//div[contains(@class, 'prev-month')]"
|
|
29
31
|
NEXT_BUTTON_LOCATOR = f"{CALENDAR_HEADER}//div[contains(@class, 'next-month')]"
|
|
@@ -85,12 +87,12 @@ class BaseCalendarMonth:
|
|
|
85
87
|
"""
|
|
86
88
|
if type(items) is not dict:
|
|
87
89
|
raise TypeError("'items' value has to be dictionary type. ")
|
|
88
|
-
if "day" in items:
|
|
89
|
-
self.day = items["day"]
|
|
90
|
-
if "month" in items:
|
|
91
|
-
self.month = items["month"]
|
|
92
90
|
if "year" in items:
|
|
93
91
|
self.year = items["year"]
|
|
92
|
+
if "month" in items:
|
|
93
|
+
self.month = items["month"]
|
|
94
|
+
if "day" in items:
|
|
95
|
+
self.day = items["day"]
|
|
94
96
|
|
|
95
97
|
|
|
96
98
|
class CalendarMonth(BaseCalendarMonth, Widget):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: widgetastic.patternfly5
|
|
3
|
-
Version: 25.
|
|
3
|
+
Version: 25.12.11.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>
|
|
@@ -28,7 +28,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
28
28
|
Classifier: Topic :: Software Development :: Quality Assurance
|
|
29
29
|
Classifier: Topic :: Software Development :: Testing
|
|
30
30
|
Requires-Python: >=3.11
|
|
31
|
-
Requires-Dist: widgetastic-core
|
|
31
|
+
Requires-Dist: widgetastic-core~=1.1.0
|
|
32
32
|
Provides-Extra: dev
|
|
33
33
|
Requires-Dist: codecov; extra == 'dev'
|
|
34
34
|
Requires-Dist: pre-commit; extra == 'dev'
|
{widgetastic.patternfly5-25.5.16.1.dist-info → widgetastic_patternfly5-25.12.11.0.dist-info}/RECORD
RENAMED
|
@@ -4,8 +4,8 @@ widgetastic_patternfly5/charts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
|
|
|
4
4
|
widgetastic_patternfly5/charts/alerts_timeline_chart.py,sha256=U7hJvxAG1Wgj9WFt5QxAmLh9cJm2qzs2YHs2wfEW0Pk,2377
|
|
5
5
|
widgetastic_patternfly5/charts/boxplot_chart.py,sha256=6Ek6gwbmwNeazy-5o2fVfvkjpd6bhbTyitiPomvLBts,405
|
|
6
6
|
widgetastic_patternfly5/charts/bullet_chart.py,sha256=zfAdvxzPFqeGFzDoqJIUxwkERUlHfPohHOjzPJEjVdw,3680
|
|
7
|
-
widgetastic_patternfly5/charts/donut_chart.py,sha256=
|
|
8
|
-
widgetastic_patternfly5/charts/legend.py,sha256=
|
|
7
|
+
widgetastic_patternfly5/charts/donut_chart.py,sha256=ilDQR8ErGp4NqfkbHyvzIKKYVADk5rZkHy9U_BaT2Os,2750
|
|
8
|
+
widgetastic_patternfly5/charts/legend.py,sha256=nLv2dEXTICsIT3PJfYn4Ko2WvvgFFggaXVedRTZ3NkE,3057
|
|
9
9
|
widgetastic_patternfly5/charts/line_chart.py,sha256=9gjoUqWopSYTng0iRpvppm-CL-QA8H_HpTvFddg0sB4,3995
|
|
10
10
|
widgetastic_patternfly5/charts/pie_chart.py,sha256=rIxMv6vPERj9FnTp8daejL7MxUTKFCTj9057C1KuuKw,218
|
|
11
11
|
widgetastic_patternfly5/components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -29,7 +29,7 @@ widgetastic_patternfly5/components/switch.py,sha256=7-ezYAQ3T_cz70GBIW78vTlVaDmR
|
|
|
29
29
|
widgetastic_patternfly5/components/table.py,sha256=fA5LM7buASXOH3z32t1D5ZkFXyMa3ZZmzFJ6kjF73ZQ,17183
|
|
30
30
|
widgetastic_patternfly5/components/tabs.py,sha256=tSuS6x3_rnc5z8yUW_75ZtkdFOzzWPMmMa48VEEZWQk,2260
|
|
31
31
|
widgetastic_patternfly5/components/title.py,sha256=bIUzFaptG2i84CF4-AMfjbmdVeKYR32wkOBH9P6V3XQ,920
|
|
32
|
-
widgetastic_patternfly5/components/date_and_time/calendar_month.py,sha256=
|
|
32
|
+
widgetastic_patternfly5/components/date_and_time/calendar_month.py,sha256=WwpfHWei2GsWxqcvwys9DbxSbzICTBsU2VLgkaqrVns,3386
|
|
33
33
|
widgetastic_patternfly5/components/forms/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
34
34
|
widgetastic_patternfly5/components/forms/form_select.py,sha256=ht_go5lOXhMzq_FyLxS1ny9jaiBkRI6K_5vMv1DASaw,3531
|
|
35
35
|
widgetastic_patternfly5/components/forms/radio.py,sha256=d1fpzoicgSDgoV8K9bHlXFvHEjH3zw59t_WbxTGZyQ8,2009
|
|
@@ -40,7 +40,7 @@ widgetastic_patternfly5/components/menus/menu.py,sha256=sRkb46XWMNGueDCkOjs4vyb9
|
|
|
40
40
|
widgetastic_patternfly5/components/menus/menu_toggle.py,sha256=PBwNvg6E2RPdCG6ALBUqyTZxCwThJgk5S-9ghTiZ9hM,1029
|
|
41
41
|
widgetastic_patternfly5/components/menus/options_menu.py,sha256=-7pRukhgxln0rMV77VhNyQ-njLPAE6Wnp2vNAoJUXZk,1474
|
|
42
42
|
widgetastic_patternfly5/components/menus/select.py,sha256=X8DApXg_7tLIOulpmEP-f09bDShYL8jcEb1tYvNHwrE,6482
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
widgetastic_patternfly5-25.12.11.0.dist-info/METADATA,sha256=o7MHF81w5zLi3xth-5qOzNUbjc8UJlhEfvIK_FtrBNw,6911
|
|
44
|
+
widgetastic_patternfly5-25.12.11.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
45
|
+
widgetastic_patternfly5-25.12.11.0.dist-info/licenses/LICENSE,sha256=nDhhj8jp0XsTdmvWpTWFpOKVn0LPXPb6ecA9zFF3Exk,576
|
|
46
|
+
widgetastic_patternfly5-25.12.11.0.dist-info/RECORD,,
|
|
File without changes
|