@@ -519,6 +519,49 @@ def test_create_finding_from_template(self):
519
519
self .assertTrue (self .is_success_message_present (text = "Finding from template added successfully." ))
520
520
self .assertTrue (self .is_text_present_on_page (text = "App Vulnerable to XSS From Template" ))
521
521
522
+ @on_exception_html_source_logger
523
+ def test_create_finding_with_unqiue_characters (self ):
524
+ driver = self .driver
525
+ # Navigate to All Finding page
526
+ # goto engagemnent list (and wait for javascript to load)
527
+ self .goto_all_engagements_overview (driver )
528
+
529
+ # Select a previously created engagement title
530
+ driver .find_element (By .PARTIAL_LINK_TEXT , "Ad Hoc Engagement" ).click ()
531
+ driver .find_element (By .PARTIAL_LINK_TEXT , "Pen Test" ).click ()
532
+
533
+ # Click on the 'dropdownMenu1 button'
534
+ # logger.info("\nClicking on dropdown menu \n")
535
+ driver .find_element (By .ID , "dropdownMenu_test_add" ).click ()
536
+ self .assertNoConsoleErrors ()
537
+ # Click on `Apply Template to Finding`
538
+ driver .find_element (By .LINK_TEXT , "Finding From Template" ).click ()
539
+ self .assertNoConsoleErrors ()
540
+ # click on the template of 'App Vulnerable to XSS'
541
+ logger .info ("\n Clicking on the template \n " )
542
+ driver .find_element (By .LINK_TEXT , "Use This Template" ).click ()
543
+ self .assertNoConsoleErrors ()
544
+ driver .find_element (By .ID , "id_title" ).clear ()
545
+ # Backslash causes error
546
+ driver .find_element (By .ID , "id_title" ).send_keys ("App Vulnerable to XSS from \\ Template" )
547
+ self .assertNoConsoleErrors ()
548
+ # Click the 'finished' button to submit
549
+ driver .find_element (By .ID , "id_finished" ).click ()
550
+ self .assertNoConsoleErrors ()
551
+ # Query the site to determine if the finding has been added
552
+ # Assert to the query to determine status of failure
553
+ self .assertTrue (self .is_success_message_present (text = "Finding from template added successfully." ))
554
+ self .assertTrue (self .is_text_present_on_page (text = "App Vulnerable to XSS From \\ Template" ))
555
+
556
+ # Navigate back to the finding list
557
+ driver .find_element (By .LINK_TEXT , "Findings" ).click ()
558
+ self .assertNoConsoleErrors ()
559
+ driver .find_element (By .LINK_TEXT , "App Vulnerable to XSS from \\ Template" ).click ()
560
+ self .assertNoConsoleErrors ()
561
+
562
+ # Assert that the finding is present
563
+ self .assertTrue (self .is_text_present_on_page (text = "App Vulnerable to XSS from \\ Template" ))
564
+
522
565
@on_exception_html_source_logger
523
566
def test_delete_finding_template (self ):
524
567
driver = self .driver
0 commit comments