Skip to content

Commit

Permalink
disable new sidebar step
Browse files Browse the repository at this point in the history
  • Loading branch information
pajlada committed Nov 16, 2024
1 parent ee9f88f commit 44af4ad
Showing 1 changed file with 53 additions and 53 deletions.
106 changes: 53 additions & 53 deletions src/test/java/com/questhelper/questhelpers/QuestHelperTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,57 +174,57 @@ void ensureAllVariablesCorrectlySet()
}
}

@Test
void ensureAllStepsHaveSidebarLink()
{
when(questHelperConfig.solvePuzzles()).thenReturn(true);

AchievementDiaryStepManager.setup(configManager);

for (var quest : QuestHelperQuest.values())
{
var helper = quest.getQuestHelper();
helper.setQuest(quest);
if (quest.getPlayerQuests() != null)
{
continue;
}

this.injector.injectMembers(helper);
helper.setQuestHelperPlugin(questHelperPlugin);
helper.setConfig(questHelperConfig);
helper.init();

if (quest != QuestHelperQuest.THE_CURSE_OF_ARRAV) {
continue;
}

if (helper instanceof BasicQuestHelper) {
var basicHelper = (BasicQuestHelper) helper;
var panels = helper.getPanels();
var panelSteps = panels.stream().flatMap(panelDetails -> panelDetails.getSteps().stream()).collect(Collectors.toList());
var steps = basicHelper.getStepList().values();
for (var step : steps) {
assertNotNull(step);
var rawText = step.getText();
var text = rawText == null ? "" : String.join("\n", step.getText());
if (step instanceof ConditionalStep) {
//
} else {
var isInPanelSteps = panelSteps.contains(step);
/* TODO
var isSubstepOf = steps.stream().filter(questStep -> {
if (questStep instanceof BasicQuest) {
return questStep.getSubSteps();
}
return null;
});
*/
var isInAnyStepSubStepsThatIsInPanelSteps = true; // todo
assertTrue(isInPanelSteps);
}
}
}
}
}
// @Test
// void ensureAllStepsHaveSidebarLink()
// {
// when(questHelperConfig.solvePuzzles()).thenReturn(true);

// AchievementDiaryStepManager.setup(configManager);

// for (var quest : QuestHelperQuest.values())
// {
// var helper = quest.getQuestHelper();
// helper.setQuest(quest);
// if (quest.getPlayerQuests() != null)
// {
// continue;
// }

// this.injector.injectMembers(helper);
// helper.setQuestHelperPlugin(questHelperPlugin);
// helper.setConfig(questHelperConfig);
// helper.init();

// if (quest != QuestHelperQuest.THE_CURSE_OF_ARRAV) {
// continue;
// }

// if (helper instanceof BasicQuestHelper) {
// var basicHelper = (BasicQuestHelper) helper;
// var panels = helper.getPanels();
// var panelSteps = panels.stream().flatMap(panelDetails -> panelDetails.getSteps().stream()).collect(Collectors.toList());
// var steps = basicHelper.getStepList().values();
// for (var step : steps) {
// assertNotNull(step);
// var rawText = step.getText();
// var text = rawText == null ? "" : String.join("\n", step.getText());
// if (step instanceof ConditionalStep) {
// //
// } else {
// var isInPanelSteps = panelSteps.contains(step);
// /* TODO
// var isSubstepOf = steps.stream().filter(questStep -> {
// if (questStep instanceof BasicQuest) {
// return questStep.getSubSteps();
// }
// return null;
// });
// */
// var isInAnyStepSubStepsThatIsInPanelSteps = true; // todo
// assertTrue(isInPanelSteps);
// }
// }
// }
// }
// }
}

0 comments on commit 44af4ad

Please sign in to comment.