From b0c21bbb92071a571046b7701e56be2fdb09d8d1 Mon Sep 17 00:00:00 2001 From: Joshua Fehler Date: Sat, 16 Nov 2019 16:44:33 -0500 Subject: [PATCH] Cleanup dummy page object --- docs/test_page/test_page.html | 1 + tests/splinter/pages/dummy.py | 26 ++++++++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/docs/test_page/test_page.html b/docs/test_page/test_page.html index 2b6bdd69..e6f3cbe8 100644 --- a/docs/test_page/test_page.html +++ b/docs/test_page/test_page.html @@ -178,6 +178,7 @@

CSS Dropdown

Area

+
I'm just a link in a div.
diff --git a/tests/splinter/pages/dummy.py b/tests/splinter/pages/dummy.py index 01071ec8..a3c9f0ff 100644 --- a/tests/splinter/pages/dummy.py +++ b/tests/splinter/pages/dummy.py @@ -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( @@ -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')