screenshot plugin: fix hunter level up screenshots
Co-authored-by: Magic fTail <runecnielsen3132@gmail.com>
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user