widgetastic.patternfly5 23.8.25.0__py3-none-any.whl → 23.8.28.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.8.28.0.dist-info/METADATA +146 -0
- {widgetastic.patternfly5-23.8.25.0.dist-info → widgetastic.patternfly5-23.8.28.0.dist-info}/RECORD +6 -6
- widgetastic.patternfly5-23.8.28.0.dist-info/licenses/LICENSE +13 -0
- widgetastic_patternfly5/__init__.py +6 -0
- widgetastic_patternfly5/components/card.py +48 -1
- widgetastic.patternfly5-23.8.25.0.dist-info/METADATA +0 -807
- widgetastic.patternfly5-23.8.25.0.dist-info/licenses/LICENSE +0 -674
- {widgetastic.patternfly5-23.8.25.0.dist-info → widgetastic.patternfly5-23.8.28.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: widgetastic.patternfly5
|
|
3
|
+
Version: 23.8.28.0
|
|
4
|
+
Summary: Patternfly5 widget library for Widgetastic.
|
|
5
|
+
Project-URL: repository, https://github.com/RedHatQE/widgetastic.patternfly5
|
|
6
|
+
Maintainer-email: Nikhil Dhandre <ndhandre@redhat.com>, Egor Shamardin <eshamard@redhat.com>, Mike Shriver <mshriver@redhat.com>
|
|
7
|
+
License: Copyright 2023 Red Hat, Inc. and/or its affiliates
|
|
8
|
+
|
|
9
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
you may not use this file except in compliance with the License.
|
|
11
|
+
You may obtain a copy of the License at
|
|
12
|
+
|
|
13
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
|
|
15
|
+
Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
See the License for the specific language governing permissions and
|
|
19
|
+
limitations under the License.
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Keywords: patternfly,patternfly5,widgetastic
|
|
22
|
+
Classifier: Programming Language :: Python
|
|
23
|
+
Classifier: Programming Language :: Python :: 3
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
27
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
28
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
29
|
+
Classifier: Topic :: Software Development :: Testing
|
|
30
|
+
Requires-Python: >=3.8
|
|
31
|
+
Requires-Dist: widgetastic-core>=1.0.5
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: codecov; extra == 'dev'
|
|
34
|
+
Requires-Dist: pre-commit; extra == 'dev'
|
|
35
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
36
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
37
|
+
Requires-Dist: pytest-xdist; extra == 'dev'
|
|
38
|
+
Provides-Extra: doc
|
|
39
|
+
Requires-Dist: sphinx; extra == 'doc'
|
|
40
|
+
Description-Content-Type: text/markdown
|
|
41
|
+
|
|
42
|
+
<h1 align="center"> widgetastic.patternfly5 </h1>
|
|
43
|
+
|
|
44
|
+
<p align="center">
|
|
45
|
+
<a href="https://pypi.org/project/widgetastic.patternfly5/">
|
|
46
|
+
<img alt="Python Versions" src="https://img.shields.io/pypi/pyversions/widgetastic.patternfly5.svg?style=flat">
|
|
47
|
+
</a>
|
|
48
|
+
<a href="https://pypi.org/project/widgetastic.patternfly5/#history">
|
|
49
|
+
<img alt="PyPI version" src="https://badge.fury.io/py/widgetastic.patternfly5.svg">
|
|
50
|
+
</a>
|
|
51
|
+
<a href="https://codecov.io/github/RedHatQE/widgetastic.patternfly5">
|
|
52
|
+
<img src="https://codecov.io/github/RedHatQE/widgetastic.patternfly5/graph/badge.svg?token=cWuTXniIPm"/>
|
|
53
|
+
</a>
|
|
54
|
+
<a href="https://github.com/RedHatQE/widgetastic.patternfly5/actions/workflows/tests.yaml">
|
|
55
|
+
<img alt="github actions" src="https://github.com/RedHatQE/widgetastic.patternfly5/actions/workflows/tests.yaml/badge.svg">
|
|
56
|
+
</a>
|
|
57
|
+
<a href="https://pypi.org/project/black">
|
|
58
|
+
<img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg">
|
|
59
|
+
</a>
|
|
60
|
+
</p>
|
|
61
|
+
|
|
62
|
+
This library offers Widgetastic Widgets for [PatternFly v5](https://www.patternfly.org/), serving as an extended
|
|
63
|
+
itteration of [widgetastic.patternfly4](https://github.com/RedHatQE/widgetastic.patternfly4).
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Components:
|
|
67
|
+
- [alert](https://www.patternfly.org/components/alert)
|
|
68
|
+
- [breadcrumb](https://www.patternfly.org/components/breadcrumb)
|
|
69
|
+
- [button](https://www.patternfly.org/components/button)
|
|
70
|
+
- [card](https://www.patternfly.org/components/card)
|
|
71
|
+
- [chip](https://www.patternfly.org/components/chip)
|
|
72
|
+
- [clipboard-copy](https://www.patternfly.org/components/clipboard-copy)
|
|
73
|
+
- date and time
|
|
74
|
+
- [calendar-month](https://www.patternfly.org/components/date-and-time/calendar-month)
|
|
75
|
+
- [description-list](https://www.patternfly.org/components/description-list)
|
|
76
|
+
- [drawer](https://www.patternfly.org/components/drawer)
|
|
77
|
+
- [dual-list-selector](https://www.patternfly.org/components/dual-list-selector)
|
|
78
|
+
- forms
|
|
79
|
+
- [form-select](https://www.patternfly.org/components/forms/form-select)
|
|
80
|
+
- [radio](https://www.patternfly.org/components/forms/radio)
|
|
81
|
+
- menus
|
|
82
|
+
- [dropdown](https://www.patternfly.org/components/menus/dropdown)
|
|
83
|
+
- [menu](https://www.patternfly.org/components/menus/menu)
|
|
84
|
+
- [menu-toggle](https://www.patternfly.org/components/menus/menu-toggle)
|
|
85
|
+
- [options-menu](https://www.patternfly.org/components/menus/options-menu/)
|
|
86
|
+
- [select](https://www.patternfly.org/components/menus/select)
|
|
87
|
+
- [modal](https://www.patternfly.org/components/modal)
|
|
88
|
+
- [navigation](https://www.patternfly.org/components/navigation)
|
|
89
|
+
- [pagination](https://www.patternfly.org/components/pagination/)
|
|
90
|
+
- [popover](https://www.patternfly.org/components/popover)
|
|
91
|
+
- [progress](https://www.patternfly.org/components/progress)
|
|
92
|
+
- [slider](https://www.patternfly.org/components/slider)
|
|
93
|
+
- [switch](https://www.patternfly.org/components/switch)
|
|
94
|
+
- [table](https://www.patternfly.org/components/table)
|
|
95
|
+
- [tabs](https://www.patternfly.org/components/tabs)
|
|
96
|
+
- [title](https://www.patternfly.org/components/title)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
### Charts:
|
|
100
|
+
- [bullet-chart](https://www.patternfly.org/charts/bullet-chart)
|
|
101
|
+
- [donut-chart](https://www.patternfly.org/charts/donut-chart)
|
|
102
|
+
- [legends](https://www.patternfly.org/charts/legends)
|
|
103
|
+
- [line-chart](https://www.patternfly.org/charts/line-chart)
|
|
104
|
+
- [pie-chart](https://www.patternfly.org/charts/pie-chart)
|
|
105
|
+
|
|
106
|
+
### Patterns:
|
|
107
|
+
- [card-view](https://patternfly-react-main.surge.sh/patterns/card-view)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
### Contribution guide
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# clone the repo
|
|
114
|
+
git clone https://github.com/RedHatQE/widgetastic.patternfly5.git
|
|
115
|
+
cd widgetastic.patternfly5
|
|
116
|
+
|
|
117
|
+
# create a virtual environment
|
|
118
|
+
python3 -m venv .venv_pfy5
|
|
119
|
+
source .venv_pfy5/bin/activate
|
|
120
|
+
|
|
121
|
+
# update pip and its friends
|
|
122
|
+
pip install -U pip setuptools wheel
|
|
123
|
+
|
|
124
|
+
# install the package in editable mode
|
|
125
|
+
pip install -e .[dev]
|
|
126
|
+
pre-commit install
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Testing
|
|
130
|
+
|
|
131
|
+
The library has selenium tests that are performed against [Patternfly React docs](https://patternfly-react-main.surge.sh).
|
|
132
|
+
It's also configured to run the tests every time when a new version of that page is released.
|
|
133
|
+
|
|
134
|
+
Tests spawn a container from official selenium image - [selenium/standalone-{chrome/firefox}](https://hub.docker.com/u/selenium).
|
|
135
|
+
We can check local runs via vnc `http://localhost:7900`
|
|
136
|
+
|
|
137
|
+
**Note:** Tests use `podman` to manage containers. Please install it before running.
|
|
138
|
+
|
|
139
|
+
It's possible to run tests in parallel to speed up the execution. Make sure that you have **xdist** python plugin installed.
|
|
140
|
+
|
|
141
|
+
Use `-n` key to specify a number
|
|
142
|
+
of workers:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
BROWSER=firefox pytest -v testing -n 4
|
|
146
|
+
```
|
{widgetastic.patternfly5-23.8.25.0.dist-info → widgetastic.patternfly5-23.8.28.0.dist-info}/RECORD
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
widgetastic_patternfly5/__init__.py,sha256=
|
|
1
|
+
widgetastic_patternfly5/__init__.py,sha256=R3zeri7LfNyVbt-jNeRnHpns4aZkYLWCiwF23RjmM9M,4620
|
|
2
2
|
widgetastic_patternfly5/ouia.py,sha256=e5eGepCYPB4oSc52h43e3xWaGhKtGMvyNsx07m27jgM,3622
|
|
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=Fo8r4gA-JpYlUg1xwqWzLpiBm2xS74og1EX98Mpwaxc,2787
|
|
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
|
|
@@ -36,7 +36,7 @@ widgetastic_patternfly5/components/menus/menu.py,sha256=0cUb5V1y3RgRpdAB8DlPIL9O
|
|
|
36
36
|
widgetastic_patternfly5/components/menus/menu_toggle.py,sha256=PBwNvg6E2RPdCG6ALBUqyTZxCwThJgk5S-9ghTiZ9hM,1029
|
|
37
37
|
widgetastic_patternfly5/components/menus/options_menu.py,sha256=c5L4MhXazdLnfBO9mf4-2UsZa7NGW9yJ6_aDDtHdXAc,1231
|
|
38
38
|
widgetastic_patternfly5/components/menus/select.py,sha256=2nb78mGsdzgmYrtdvvRf2N51iKUDl2VeyE7qEjWl4qQ,5711
|
|
39
|
-
widgetastic.patternfly5-23.8.
|
|
40
|
-
widgetastic.patternfly5-23.8.
|
|
41
|
-
widgetastic.patternfly5-23.8.
|
|
42
|
-
widgetastic.patternfly5-23.8.
|
|
39
|
+
widgetastic.patternfly5-23.8.28.0.dist-info/METADATA,sha256=2F8FUbVRIHibZyBJDjbRuIHE-8w8i5w2v8QZgb02L9U,6416
|
|
40
|
+
widgetastic.patternfly5-23.8.28.0.dist-info/WHEEL,sha256=9QBuHhg6FNW7lppboF2vKVbCGTVzsFykgRQjjlajrhA,87
|
|
41
|
+
widgetastic.patternfly5-23.8.28.0.dist-info/licenses/LICENSE,sha256=nDhhj8jp0XsTdmvWpTWFpOKVn0LPXPb6ecA9zFF3Exk,576
|
|
42
|
+
widgetastic.patternfly5-23.8.28.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright 2023 Red Hat, Inc. and/or its affiliates
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
|
@@ -8,6 +8,9 @@ from .components.alert import Alert
|
|
|
8
8
|
from .components.breadcrumb import BreadCrumb
|
|
9
9
|
from .components.button import Button
|
|
10
10
|
from .components.card import Card
|
|
11
|
+
from .components.card import CardCheckBox
|
|
12
|
+
from .components.card import CardForCardGroup
|
|
13
|
+
from .components.card import CardGroup
|
|
11
14
|
from .components.card import CardWithActions
|
|
12
15
|
from .components.chip import CategoryChipGroup
|
|
13
16
|
from .components.chip import Chip
|
|
@@ -71,6 +74,9 @@ __all__ = [
|
|
|
71
74
|
"Button",
|
|
72
75
|
"CalendarMonth",
|
|
73
76
|
"Card",
|
|
77
|
+
"CardCheckBox",
|
|
78
|
+
"CardForCardGroup",
|
|
79
|
+
"CardGroup",
|
|
74
80
|
"CardWithActions",
|
|
75
81
|
"CategoryChipGroup",
|
|
76
82
|
"CheckboxMenu",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
from widgetastic.utils import ParametrizedLocator
|
|
2
2
|
from widgetastic.widget import Checkbox
|
|
3
3
|
from widgetastic.widget import GenericLocatorWidget
|
|
4
|
+
from widgetastic.widget import ParametrizedView
|
|
5
|
+
from widgetastic.widget import View
|
|
4
6
|
|
|
5
7
|
from widgetastic_patternfly5.components.menus.dropdown import Dropdown
|
|
6
8
|
|
|
@@ -32,13 +34,58 @@ class BaseCard:
|
|
|
32
34
|
|
|
33
35
|
|
|
34
36
|
class Card(BaseCard, GenericLocatorWidget):
|
|
37
|
+
DEFAULT_LOCATOR = (
|
|
38
|
+
".//div[@data-ouia-component-type='PF5/Card'] | .//article[contains(@class, 'pf-c-card')]"
|
|
39
|
+
)
|
|
40
|
+
|
|
35
41
|
def __init__(self, parent, locator=None, logger=None):
|
|
36
|
-
locator = locator or
|
|
42
|
+
locator = locator or self.DEFAULT_LOCATOR
|
|
37
43
|
super().__init__(parent, locator, logger=logger)
|
|
38
44
|
|
|
39
45
|
ROOT = ParametrizedLocator("{@locator}")
|
|
40
46
|
|
|
41
47
|
|
|
48
|
+
class CardForCardGroup(BaseCard, ParametrizedView):
|
|
49
|
+
DEFAULT_LOCATOR = (
|
|
50
|
+
"(.//div[@data-ouia-component-type='PF5/Card'] | .//article[contains(@class, 'pf-c-card')])"
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
def __init__(self, parent, locator=None, logger=None, **kwargs):
|
|
54
|
+
View.__init__(self, parent, logger=logger, **kwargs)
|
|
55
|
+
self.locator = locator or self.DEFAULT_LOCATOR
|
|
56
|
+
|
|
57
|
+
PARAMETERS = ("position",)
|
|
58
|
+
|
|
59
|
+
ROOT = ParametrizedLocator("{@locator}[{position}]")
|
|
60
|
+
|
|
61
|
+
def __locator__(self):
|
|
62
|
+
return self.ROOT
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def all(cls, browser):
|
|
66
|
+
# todo: OUIA versions should return component ids
|
|
67
|
+
elements = browser.elements(cls.DEFAULT_LOCATOR)
|
|
68
|
+
result = []
|
|
69
|
+
for index, item in enumerate(elements):
|
|
70
|
+
result.append((index + 1,))
|
|
71
|
+
return result
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class CardGroup(GenericLocatorWidget, View):
|
|
75
|
+
def __init__(self, parent, locator=None, logger=None, **kwargs):
|
|
76
|
+
View.__init__(self, parent, logger=logger, **kwargs)
|
|
77
|
+
self.locator = locator
|
|
78
|
+
|
|
79
|
+
cards = ParametrizedView.nested(CardForCardGroup)
|
|
80
|
+
|
|
81
|
+
def __iter__(self):
|
|
82
|
+
return iter(self.cards)
|
|
83
|
+
|
|
84
|
+
|
|
42
85
|
class CardWithActions(Card):
|
|
43
86
|
dropdown = Dropdown(locator=".//div[contains(@class, '-c-card__actions')]")
|
|
44
87
|
checkbox = Checkbox(locator=".//input[contains(@class, '-c-check__input')]")
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
class CardCheckBox(Checkbox):
|
|
91
|
+
ROOT = ".//input[contains(@class, '-c-check__input')]"
|