Skip to content

Commit b0c21bb

Browse files
committed
Cleanup dummy page object
1 parent 70300d7 commit b0c21bb

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

docs/test_page/test_page.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ <h4> CSS Dropdown </h4>
178178
</div>
179179
</div>
180180
<h4> Area </h4>
181+
<div data-test-id=="Stere_area_root_link"></div> <!-- Duplicated data-test-id. Used in a test to ensure Area searches relative to root. -->
181182
<div id="area_root" data-test-id="Stere_area_root">
182183
<a href="#" data-test-id="Stere_area_root_link"> I'm just a link in a div. </a>
183184
</div>

tests/splinter/pages/dummy.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,16 @@ def __init__(self):
9898

9999
# Same Field, different selectors
100100
self.removed_container_by_xpath = Field(
101-
'xpath', '//div[@id="removed_container"]')
101+
'xpath', '//div[@id="removed_container"]',
102+
)
102103
self.removed_container_by_css = Field('css', '#removed_container')
103104

104105
# Will be hidden after 10 seconds
105106
self.to_hide_container_by_id = Field('id', 'to_hide_container')
106107
self.to_hide_container_by_xpath = Field(
107108
'xpath',
108-
'//div[@id="to_hide_container"]')
109+
'//div[@id="to_hide_container"]',
110+
)
109111
self.to_hide_container_by_css = Field('css', '#to_hide_container')
110112

111113
self.area_with_root = Area(
@@ -119,22 +121,30 @@ def __init__(self):
119121
)
120122

121123
self.many_input_area = Area(
122-
first_name=Input('id', 'test_input_first_name',
123-
workflows=['workflow_test']),
124+
first_name=Input(
125+
'id',
126+
'test_input_first_name',
127+
workflows=['workflow_test'],
128+
),
124129
last_name=Input('id', 'test_input_last_name'),
125130
email=Input('id', 'test_input_email'),
126131
age=Input('id', 'test_input_age'),
127-
submit=Button('id', 'test_many_input_submit',
128-
workflows=['workflow_test']),
132+
submit=Button(
133+
'id',
134+
'test_many_input_submit',
135+
workflows=['workflow_test'],
136+
),
129137
)
130138
self.many_input_result = Text('id', 'many_input_result')
131139

132140
self.checkbox = Checkbox('id', 'test_checkbox')
133141
self.checkbox_checked = Checkbox(
134-
'id', 'test_checkbox_checked', default_checked=True)
142+
'id', 'test_checkbox_checked', default_checked=True,
143+
)
135144

136145
# Field for something on the page we know isn't unique.
137146
self.purposefully_non_unique_field = Field(
138-
'css', '.test_repeating_area_root')
147+
'css', '.test_repeating_area_root',
148+
)
139149

140150
self.money_field = Money('id', 'moneyMoney')

0 commit comments

Comments
 (0)