File tree Expand file tree Collapse file tree 2 files changed +19
-22
lines changed
pytest_splunk_addon_ui_smartx/components/controls Expand file tree Collapse file tree 2 files changed +19
-22
lines changed Original file line number Diff line number Diff line change @@ -348,27 +348,9 @@ def _wait_for_search_list(driver):
348
348
_wait_for_search_list , msg = "No values found in SingleSelect search"
349
349
)
350
350
351
- def is_editable (self ):
351
+ def is_editable (self ) -> bool :
352
352
"""
353
- Returns True if the Textbox is editable, False otherwise
353
+ Returns True if the SingleSelect is editable, False otherwise
354
354
"""
355
- if self .searchable :
356
- if self .allow_new_values :
357
- self .elements .update (
358
- {
359
- "input" : Selector (
360
- select = self .container .select + ' [data-test="textbox"]'
361
- )
362
- }
363
- )
364
- else :
365
- self .root .click ()
366
- popover_id = "#" + self .root .get_attribute ("data-test-popover-id" )
367
- self .elements .update (
368
- {"input" : Selector (select = popover_id + ' [data-test="textbox"]' )}
369
- )
370
- return not bool (
371
- self .input .get_attribute ("readonly" )
372
- or self .input .get_attribute ("readOnly" )
373
- or self .input .get_attribute ("disabled" )
374
- )
355
+ self .get_element ("root" )
356
+ return True if self .allow_new_values else False
Original file line number Diff line number Diff line change @@ -1351,3 +1351,18 @@ def test_inputs_textarea_scroll(
1351
1351
input_page .entity1 .text_area .scroll ("UP" , 40 )
1352
1352
screenshot_after = input_page .entity1 .text_area .screenshot ()
1353
1353
self .assert_util (screnshot_before , screenshot_after , operator = "!=" )
1354
+
1355
+ @pytest .mark .execute_enterprise_cloud_true
1356
+ @pytest .mark .forwarder
1357
+ @pytest .mark .input
1358
+ def test_single_select_is_editable (
1359
+ self , ucc_smartx_selenium_helper , ucc_smartx_rest_helper
1360
+ ):
1361
+ """
1362
+ Verifies that SingleSelect value is editable or not
1363
+ """
1364
+ input_page = InputPage (ucc_smartx_selenium_helper , ucc_smartx_rest_helper )
1365
+ input_page .create_new_input .select ("Example Input One" )
1366
+ self .assert_util (input_page .entity1 .single_select_group_test .is_editable , True )
1367
+ self .assert_util (input_page .entity1 .index .is_editable , True )
1368
+ self .assert_util (input_page .entity1 .example_account .is_editable , False )
You can’t perform that action at this time.
0 commit comments