Skip to content

Commit

Permalink
fix(playwrighttesting): suiteId to use hash instead of classname (#47513
Browse files Browse the repository at this point in the history
)

* fix(playwrighttesting): suiteId to use hash instead of classname

* updated

---------

Co-authored-by: guptakashish <[email protected]>
  • Loading branch information
kashish2508 and guptakashish authored Dec 12, 2024
1 parent 45f3d44 commit b547930
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public TestResults GetTestCaseResultData(TestResult? testResultSource)
testCaseResultData.TestTitle = testResultSource.TestCase.DisplayName;
var className = FetchTestClassName(testResultSource.TestCase.FullyQualifiedName);
testCaseResultData.SuiteTitle = className;
testCaseResultData.SuiteId = className;
testCaseResultData.SuiteId = ReporterUtils.CalculateSha1Hash(className);
testCaseResultData.FileName = FetchFileName(testResultSource.TestCase.Source);
testCaseResultData.LineNumber = testResultSource.TestCase.LineNumber;
testCaseResultData.Retry = 0; // TODO Retry and PreviousRetries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public void GetTestCaseResultData_WithNonNullTestResult_ReturnsTestResults()
Assert.IsNotNull(result.TestId);
Assert.AreEqual(testResult.TestCase.DisplayName, result.TestTitle);
Assert.AreEqual("Test", result.SuiteTitle);
Assert.AreEqual("Test", result.SuiteId);
Assert.AreEqual(ReporterUtils.CalculateSha1Hash("Test"), result.SuiteId);
Assert.AreEqual("TestNamespace.TestClass", result.FileName);
Assert.AreEqual(testResult.TestCase.LineNumber, result.LineNumber);
Assert.AreEqual(0, result.Retry);
Expand Down

0 comments on commit b547930

Please sign in to comment.