@@ -31,7 +31,7 @@ class Error:
31
31
32
32
# XPATH constants
33
33
class Xpath :
34
- ANYTHING_OPT_LIST = '//option[contains(@value, "anything ")]'
34
+ DUMMY_OPT_LIST = '//option[contains(@value, "Dummy ")]'
35
35
CLICK_OK_SUBMIT = '//*[@id="modal"]/div/div/form/div[3]/input'
36
36
CLONE_CHILD = '//select[contains(@data-help-filter, ".row.resource") and contains(@name, "clone[child]")]'
37
37
CLONE_DATA_HELP_FILTER = '//a[contains(@data-help-filter, ".clone")]'
@@ -602,13 +602,8 @@ def test_add_primitive(self, primitive):
602
602
print (f"ERROR: Couldn't find element [primitive[type]]. Cannot add primitive [{ primitive } ]." )
603
603
return False
604
604
elem .click ()
605
- self .check_and_click_by_xpath ("Couldn't find value [anything] for primitive type" ,
606
- [Xpath .ANYTHING_OPT_LIST ])
607
- elem = self .find_element (By .NAME , 'primitive[params][binfile]' )
608
- if not elem :
609
- print ("ERROR: Couldn't find element [primitive[params][binfile]]" )
610
- return False
611
- elem .send_keys ("file" )
605
+ self .check_and_click_by_xpath ("Couldn't find value [Dummy] for primitive type" ,
606
+ [Xpath .DUMMY_OPT_LIST ])
612
607
# Set start timeout value in 35s
613
608
self .check_and_click_by_xpath ("Couldn't find edit button for start operation" ,
614
609
[Xpath .EDIT_START_TIMEOUT , Xpath .MODAL_TIMEOUT ])
@@ -642,7 +637,7 @@ def test_add_primitive(self, primitive):
642
637
elem .click ()
643
638
status = self .verify_success ()
644
639
if status :
645
- print (f"INFO: Successfully added primitive [{ primitive } ] of class [ocf:heartbeat:anything ]" )
640
+ print (f"INFO: Successfully added primitive [{ primitive } ] of class [ocf:heartbeat:Dummy ]" )
646
641
else :
647
642
print (f"ERROR: Could not create primitive [{ primitive } ]" )
648
643
return status
@@ -662,7 +657,7 @@ def remove_rsc(self, name):
662
657
self .check_and_click_by_xpath (f"Cannot delete resource [{ name } ]" , [Xpath .HREF_DELETE_FORMAT .format (name )])
663
658
time .sleep (2 )
664
659
self .check_and_click_by_xpath (f"Cannot confirm delete of resource [{ name } ]" , [Xpath .COMMIT_BTN_DANGER ])
665
- time .sleep (2 )
660
+ time .sleep (20 )
666
661
self .check_and_click_by_xpath ("Couldn't find Edit Configuration element" , [Xpath .HREF_CONFIG_EDIT ])
667
662
time .sleep (3 )
668
663
if not self .test_status :
0 commit comments