Skip to content

Commit

Permalink
Remove .html from opensearch related class names
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon committed Oct 14, 2024
1 parent 0e31166 commit 3f95a00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/report_workflow/test_report_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,13 @@ def get_failed_tests(base_path: str, test_number: str, test_type: str, component
target_div = soup.find("div", {"id": "tab0"})
target_a_hash = [a for li in target_div.find_all("li") for a in li.find_all("a", href=True) if "#" in a["href"]]
for a in target_a_hash:
failed_test_list.append(a["href"].replace("classes/", ""))
failed_test_list.append(a["href"].replace("classes/", "").replace(".html", ""))
else:
soup = BeautifulSoup(result_content, "xml")
class_name = "DefaultClassName"
for testsuite in soup.find_all("testsuite"):
if testsuite["name"] == "Root Suite":
class_name = testsuite["file"]
class_name = testsuite["file"].replace("cypress/", "")
testsuite_failures = int(testsuite["failures"])
if testsuite_failures > 0:
for testcase in testsuite.find_all("testcase"):
Expand Down

0 comments on commit 3f95a00

Please sign in to comment.