Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -348,27 +348,9 @@ def _wait_for_search_list(driver):
_wait_for_search_list, msg="No values found in SingleSelect search"
)

def is_editable(self):
def is_editable(self) -> bool:
"""
Returns True if the Textbox is editable, False otherwise
Returns True if the SingleSelect is editable, False otherwise
"""
if self.searchable:
if self.allow_new_values:
self.elements.update(
{
"input": Selector(
select=self.container.select + ' [data-test="textbox"]'
)
}
)
else:
self.root.click()
popover_id = "#" + self.root.get_attribute("data-test-popover-id")
self.elements.update(
{"input": Selector(select=popover_id + ' [data-test="textbox"]')}
)
return not bool(
self.input.get_attribute("readonly")
or self.input.get_attribute("readOnly")
or self.input.get_attribute("disabled")
)
self.get_element("root")
return True if self.allow_new_values else False
15 changes: 15 additions & 0 deletions tests/ui/test_splunk_ta_example_addon_input_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -1351,3 +1351,18 @@ def test_inputs_textarea_scroll(
input_page.entity1.text_area.scroll("UP", 40)
screenshot_after = input_page.entity1.text_area.screenshot()
self.assert_util(screnshot_before, screenshot_after, operator="!=")

@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.input
def test_single_select_is_editable(
self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
"""
Verifies that SingleSelect value is editable or not
"""
input_page = InputPage(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
input_page.create_new_input.select("Example Input One")
self.assert_util(input_page.entity1.single_select_group_test.is_editable, True)
self.assert_util(input_page.entity1.index.is_editable, True)
self.assert_util(input_page.entity1.example_account.is_editable, False)