screenshot plugin: fix hunter level up screenshots

Co-authored-by: Magic fTail <runecnielsen3132@gmail.com>
This commit is contained in:
Adam
2018-07-14 15:50:22 -04:00
parent dfa892c2bc
commit b1038142cb
2 changed files with 2 additions and 2 deletions

View File

@@ -107,7 +107,7 @@ public class ScreenshotPlugin extends Plugin
private static final DateFormat TIME_FORMAT = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss");
private static final Pattern NUMBER_PATTERN = Pattern.compile("([0-9]+)");
private static final Pattern LEVEL_UP_PATTERN = Pattern.compile("Your ([a-zA-Z]+) (?:level is|are)? now (\\d+)\\.");
private static final Pattern LEVEL_UP_PATTERN = Pattern.compile(".*Your ([a-zA-Z]+) (?:level is|are)? now (\\d+)\\.");
private static final ImmutableList<String> PET_MESSAGES = ImmutableList.of("You have a funny feeling like you're being followed",
"You feel something weird sneaking into your backpack",

View File

@@ -208,7 +208,7 @@ public class ScreenshotPluginTest
Widget levelChild = mock(Widget.class);
when(client.getWidget(Matchers.eq(DIALOG_SPRITE_TEXT))).thenReturn(levelChild);
when(levelChild.getText()).thenReturn("Your Hunter level is now 2.");
when(levelChild.getText()).thenReturn("<col=000080>Congratulations, you've just advanced a Hunter level.<col=000000><br><br>Your Hunter level is now 2.");
assertEquals("Hunter(2)", screenshotPlugin.parseLevelUpWidget(DIALOG_SPRITE_TEXT));