Skip to content

Commit

Permalink
Remove .js in OSD in sync with OS removing .html ext
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon committed Oct 16, 2024
1 parent 8a8c3d1 commit 9295f3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/report_workflow/test_report_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def get_failed_tests(product_name: str, test_result: str, test_result_files: lis
class_name = "DefaultClassName"
for testsuite in soup.find_all("testsuite"):
if testsuite["name"] == "Root Suite":
class_name = testsuite["file"].replace("cypress/", "")
class_name = testsuite["file"].replace("cypress/", "").replace(".js", "")
testsuite_failures = int(testsuite["failures"])
if testsuite_failures > 0:
for testcase in testsuite.find_all("testcase"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ def test_runner_component_entry_url_failed_test(self, report_args_mock: MagicMoc
test_report_component_dict = TestReportRunner(report_args_mock, self.TEST_MANIFEST_OPENSEARCH_DASHBOARDS).component_entry("alertingDashboards")
self.assertEqual(test_report_component_dict.get("configs")[0]["status"], "FAIL")
self.assertEqual(test_report_component_dict.get("configs")[0]["name"], "with-security")
self.assertEqual(test_report_component_dict.get("configs")[0]["failed_test"][0], "integration/plugins/alerting-dashboards-plugin/acknowledge_alerts_modal_spec.js#AcknowledgeAlertsModal "
self.assertEqual(test_report_component_dict.get("configs")[0]["failed_test"][0], "integration/plugins/alerting-dashboards-plugin/acknowledge_alerts_modal_spec#AcknowledgeAlertsModal "
"\"before all\" hook for \"Acknowledge button disabled when more than 1 trigger selected\"")

self.assertEqual(test_report_component_dict.get("configs")[1]["status"], "FAIL")
self.assertEqual(test_report_component_dict.get("configs")[1]["name"], "without-security")
self.assertEqual(test_report_component_dict.get("configs")[1]["failed_test"][1], "integration/plugins/alerting-dashboards-plugin/alert_spec.js#Alerts can be in 'Active' state "
self.assertEqual(test_report_component_dict.get("configs")[1]["failed_test"][1], "integration/plugins/alerting-dashboards-plugin/alert_spec#Alerts can be in 'Active' state "
"\"before each\" hook for \"after the monitor starts running\"")

@patch("report_workflow.report_args.ReportArgs")
Expand Down Expand Up @@ -181,10 +181,10 @@ def test_runner_component_entry_local_failed_test(self, report_args_mock: MagicM
test_report_component_dict = TestReportRunner(report_args_mock, self.TEST_MANIFEST_OPENSEARCH_DASHBOARDS).component_entry("indexManagementDashboards")
self.assertEqual(test_report_component_dict.get("configs")[0]["status"], "FAIL")
self.assertEqual(test_report_component_dict.get("configs")[0]["name"], "with-security")
self.assertEqual(test_report_component_dict.get("configs")[0]["failed_test"][0], "integration/plugins/index-management-dashboards-plugin/aliases.js#Aliases can be "
self.assertEqual(test_report_component_dict.get("configs")[0]["failed_test"][0], "integration/plugins/index-management-dashboards-plugin/aliases#Aliases can be "
"searched / sorted / paginated \"before each\" hook for \"successfully\"")

self.assertEqual(test_report_component_dict.get("configs")[1]["status"], "FAIL")
self.assertEqual(test_report_component_dict.get("configs")[1]["name"], "without-security")
self.assertEqual(test_report_component_dict.get("configs")[1]["failed_test"][1], "integration/plugins/index-management-dashboards-plugin/create_index.js#Create Index "
self.assertEqual(test_report_component_dict.get("configs")[1]["failed_test"][1], "integration/plugins/index-management-dashboards-plugin/create_index#Create Index "
"can be created and updated \"before each\" hook for \"Create a index successfully\"")

0 comments on commit 9295f3b

Please sign in to comment.