This commit is contained in:
tastybento 2024-10-23 14:35:18 -07:00
parent 618a86b464
commit fdd8b7f894

View File

@ -280,7 +280,7 @@ public abstract class AbstractCommonSetup {
List<TextComponent> capturedMessages = captor.getAllValues();
// Count the number of occurrences of the expectedMessage in the captured messages
long actualOccurrences = capturedMessages.stream().map(component -> component.toPlainText()) // Convert each TextComponent to plain text
long actualOccurrences = capturedMessages.stream().map(component -> component.toLegacyText()) // Convert each TextComponent to plain text
.filter(messageText -> messageText.contains(expectedMessage)) // Check if the message contains the expected text
.count(); // Count how many times the expected message appears