Skip to content

Commit

Permalink
Cleanup dummy page object
Browse files Browse the repository at this point in the history
  • Loading branch information
jsfehler committed Nov 16, 2019
1 parent 70300d7 commit b0c21bb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
1 change: 1 addition & 0 deletions docs/test_page/test_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ <h4> CSS Dropdown </h4>
</div>
</div>
<h4> Area </h4>
<div data-test-id=="Stere_area_root_link"></div> <!-- Duplicated data-test-id. Used in a test to ensure Area searches relative to root. -->
<div id="area_root" data-test-id="Stere_area_root">
<a href="#" data-test-id="Stere_area_root_link"> I'm just a link in a div. </a>
</div>
Expand Down
26 changes: 18 additions & 8 deletions tests/splinter/pages/dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,16 @@ def __init__(self):

# Same Field, different selectors
self.removed_container_by_xpath = Field(
'xpath', '//div[@id="removed_container"]')
'xpath', '//div[@id="removed_container"]',
)
self.removed_container_by_css = Field('css', '#removed_container')

# Will be hidden after 10 seconds
self.to_hide_container_by_id = Field('id', 'to_hide_container')
self.to_hide_container_by_xpath = Field(
'xpath',
'//div[@id="to_hide_container"]')
'//div[@id="to_hide_container"]',
)
self.to_hide_container_by_css = Field('css', '#to_hide_container')

self.area_with_root = Area(
Expand All @@ -119,22 +121,30 @@ def __init__(self):
)

self.many_input_area = Area(
first_name=Input('id', 'test_input_first_name',
workflows=['workflow_test']),
first_name=Input(
'id',
'test_input_first_name',
workflows=['workflow_test'],
),
last_name=Input('id', 'test_input_last_name'),
email=Input('id', 'test_input_email'),
age=Input('id', 'test_input_age'),
submit=Button('id', 'test_many_input_submit',
workflows=['workflow_test']),
submit=Button(
'id',
'test_many_input_submit',
workflows=['workflow_test'],
),
)
self.many_input_result = Text('id', 'many_input_result')

self.checkbox = Checkbox('id', 'test_checkbox')
self.checkbox_checked = Checkbox(
'id', 'test_checkbox_checked', default_checked=True)
'id', 'test_checkbox_checked', default_checked=True,
)

# Field for something on the page we know isn't unique.
self.purposefully_non_unique_field = Field(
'css', '.test_repeating_area_root')
'css', '.test_repeating_area_root',
)

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

0 comments on commit b0c21bb

Please sign in to comment.