widgetastic.patternfly5 25.2.17.1__py3-none-any.whl → 25.7.30.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: widgetastic.patternfly5
3
- Version: 25.2.17.1
3
+ Version: 25.7.30.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>
@@ -127,6 +127,9 @@ pip install -U pip setuptools wheel
127
127
 
128
128
  # install the package in editable mode
129
129
  pip install -e .[dev]
130
+ # if you use zsh, pip install will fail. Use this instead:
131
+ pip install -e ".[dev]"
132
+
130
133
  pre-commit install
131
134
  ```
132
135
 
@@ -5,7 +5,7 @@ widgetastic_patternfly5/charts/alerts_timeline_chart.py,sha256=U7hJvxAG1Wgj9WFt5
5
5
  widgetastic_patternfly5/charts/boxplot_chart.py,sha256=6Ek6gwbmwNeazy-5o2fVfvkjpd6bhbTyitiPomvLBts,405
6
6
  widgetastic_patternfly5/charts/bullet_chart.py,sha256=zfAdvxzPFqeGFzDoqJIUxwkERUlHfPohHOjzPJEjVdw,3680
7
7
  widgetastic_patternfly5/charts/donut_chart.py,sha256=RmDKyWjhKnGWQwZ1twPN837LYuvlF1inQlYhIgJgFxU,2570
8
- widgetastic_patternfly5/charts/legend.py,sha256=fhAg-FhsWpvi91BZ29EztKO3QfANRW-hnfzIkq45q3Y,2983
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
@@ -16,7 +16,7 @@ widgetastic_patternfly5/components/card.py,sha256=YScmzLsxO72ITZFz9u3vyxpD2r0QAz
16
16
  widgetastic_patternfly5/components/chip.py,sha256=t5_9oTJ__9ccwrCMzVYllDFY7oyJcMwwWKbr3jiIK0w,11218
17
17
  widgetastic_patternfly5/components/clipboard_copy.py,sha256=r9RESokgZ7s5C2_ByOGLqfIjUx15-ZzFi5usSTdb-ac,1292
18
18
  widgetastic_patternfly5/components/description_list.py,sha256=sVhKwKnvJguZh9FqyPC1NU2UA_w7uA3ugkY5eoVRlPk,989
19
- widgetastic_patternfly5/components/drawer.py,sha256=kr2q042x4ghxu6T_C13mlRZZ-gZavGsVvM9a1GVYZZA,1084
19
+ widgetastic_patternfly5/components/drawer.py,sha256=TKunpAtEyTZSSuOgL5y--lbuUcj5Eiqrm60ICi9O620,1172
20
20
  widgetastic_patternfly5/components/dual_list_selector.py,sha256=jL1SOfnR5z_rWniN-KU9a26n-0HxBcL2pJbBcOFT2b8,4839
21
21
  widgetastic_patternfly5/components/expandable_section.py,sha256=QCqonn1kiYfL-mGcjwrG6x4TiJBr9RKXZvyDerVTUmQ,1876
22
22
  widgetastic_patternfly5/components/modal.py,sha256=uaOsMxWvgCKrF61YX5Dh9z4YCtB0uheQdQTF6cMswxY,2000
@@ -29,18 +29,18 @@ 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=zGIgIsYEWH3VPVNBVIPVaKlnRY61648tM8rGtohmy7s,3307
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
36
36
  widgetastic_patternfly5/components/menus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  widgetastic_patternfly5/components/menus/context_selector.py,sha256=Bqj8MrxJypLfjcqrrKQj9jfFWHeSWbHIVcH2aA6sRQ8,1156
38
- widgetastic_patternfly5/components/menus/dropdown.py,sha256=NUPpKIV-mBzmFVRPjWu0FiCWc9DjcRErK_FOxfag8y0,10471
38
+ widgetastic_patternfly5/components/menus/dropdown.py,sha256=uP1bUVqc7b2FxnVHJ7SO8lD-zTlZOz1WQp5GdGFCBt8,10472
39
39
  widgetastic_patternfly5/components/menus/menu.py,sha256=sRkb46XWMNGueDCkOjs4vyb9Ehjiru71DY3MD2qsorM,8138
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
- widgetastic.patternfly5-25.2.17.1.dist-info/METADATA,sha256=u3xxVUmW53slGMz9XD6BL7XP-TIGG1sH5Khopll1Vw8,6826
44
- widgetastic.patternfly5-25.2.17.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
45
- widgetastic.patternfly5-25.2.17.1.dist-info/licenses/LICENSE,sha256=nDhhj8jp0XsTdmvWpTWFpOKVn0LPXPb6ecA9zFF3Exk,576
46
- widgetastic.patternfly5-25.2.17.1.dist-info/RECORD,,
43
+ widgetastic.patternfly5-25.7.30.0.dist-info/METADATA,sha256=K5-Y-AiWsKPfFl7Yr21erTcYeGA4YMH_0fiSqxPQmOg,6910
44
+ widgetastic.patternfly5-25.7.30.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
45
+ widgetastic.patternfly5-25.7.30.0.dist-info/licenses/LICENSE,sha256=nDhhj8jp0XsTdmvWpTWFpOKVn0LPXPb6ecA9zFF3Exk,576
46
+ widgetastic.patternfly5-25.7.30.0.dist-info/RECORD,,
@@ -85,13 +85,16 @@ class DataPoint:
85
85
  self.value = value
86
86
  self.color = color
87
87
 
88
- def __gt__(self, leg):
89
- return self.__class__ == leg.__class__ and self.value > leg.value
88
+ def __gt__(self, other):
89
+ return isinstance(other, DataPoint) and self.value > other.value
90
90
 
91
- def __eq__(self, leg):
91
+ def __eq__(self, other):
92
92
  return (
93
- self.__class__ == self.__class__ and self.label == leg.label and self.value == leg.value
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 = ".//button[text()={date}]"
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,4 +1,3 @@
1
- from wait_for import wait_for
2
1
  from widgetastic.utils import ParametrizedLocator
3
2
  from widgetastic.widget import View
4
3
 
@@ -21,8 +20,12 @@ class BaseDrawer:
21
20
  def close(self):
22
21
  """Close drawer."""
23
22
  if self.is_open:
24
- self.close_btn.click()
25
- wait_for(lambda: not self.is_open, num_sec=10)
23
+ for _ in range(3):
24
+ if self.close_btn.is_displayed:
25
+ self.close_btn.click()
26
+ if not self.is_open:
27
+ return True
28
+ return False
26
29
 
27
30
 
28
31
  class Drawer(BaseDrawer, View):
@@ -58,7 +58,7 @@ class BaseDropdown:
58
58
  def is_enabled(self):
59
59
  """Returns if the dropdown itself is enabled and therefore interactive."""
60
60
  btn_classes = self.browser.classes(self.BUTTON_LOCATOR)
61
- return "disabled" not in btn_classes or "pf-m-disabled" not in btn_classes
61
+ return "disabled" not in btn_classes and "pf-m-disabled" not in btn_classes
62
62
 
63
63
  def _verify_enabled(self):
64
64
  if not self.is_enabled: