use of org.jetbrains.plugins.cucumber.inspections.CucumberStepInspection in project intellij-plugins by JetBrains.
the class CucumberHighlightingTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
myFixture.allowTreeAccessForAllFiles();
CucumberStepsIndex.getInstance(getProject()).reset();
myFixture.enableInspections(new CucumberStepInspection());
myFixture.copyDirectoryToProject(getTestName(true), "");
myFixture.configureByFile(getTestName(true) + "/test.feature");
}
use of org.jetbrains.plugins.cucumber.inspections.CucumberStepInspection in project intellij-plugins by JetBrains.
the class CucumberJavaCreateStepTest method doTest.
private void doTest(boolean createAll) {
CucumberStepsIndex.getInstance(getProject()).reset();
myFixture.enableInspections(new CucumberStepInspection());
myFixture.copyDirectoryToProject("createStep/" + getTestName(true), "");
myFixture.configureByFile("createStep/" + getTestName(true) + "/test.feature");
myFixture.checkHighlighting(true, false, false);
final String fixName = createAll ? "Create All" : "Create step";
final IntentionAction quickFix = ContainerUtil.find(myFixture.getAvailableIntentions(), intentionAction -> intentionAction instanceof QuickFixWrapper && intentionAction.getText().contains(fixName));
if (quickFix != null) {
myFixture.launchAction(quickFix);
VirtualFile expectedFile = myFixture.findFileInTempDir("StepDefs.java");
myFixture.openFileInEditor(expectedFile);
myFixture.checkResultByFile("createStep/" + getTestName(true) + "/StepDefs_fixed.txt");
}
}
Aggregations