use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class FlexExtractSuperTest method testInheritanceFromSdk.
@JSTestOptions(JSTestOption.WithGumboSdk)
public void testInheritanceFromSdk() throws Exception {
final Sdk sdk = FlexTestUtils.createSdk(FlexTestUtils.getPathToCompleteFlexSdk("4.6"), null, false);
doTest(new PerformAction() {
@Override
public void performAction(final VirtualFile rootDir, final VirtualFile rootAfter) throws Exception {
FlexTestUtils.modifyConfigs(myProject, editor -> {
ModifiableFlexBuildConfiguration bc1 = editor.getConfigurations(myModule)[0];
bc1.setName("1");
FlexTestUtils.setSdk(bc1, sdk);
});
FlexExtractSuperTest.this.performAction(false, "skins.MyNewSkin1", "skins.IMySkin", DocCommentPolicy.COPY, JSExtractSuperProcessor.Mode.ExtractSuperTurnRefs, new String[] { "updateDisplayList" }, ArrayUtil.EMPTY_STRING_ARRAY);
}
});
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class FlexCssNavigationTest method testCssStyleReference2.
@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithFlexFacet })
public void testCssStyleReference2() throws Exception {
PsiElement[] elements = findTargetElements(getTestName(false) + ".css");
boolean flag = false;
for (PsiElement element : elements) {
if (element instanceof CssSelectorSuffix) {
flag = true;
}
}
assertTrue(flag);
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class ActionScriptCompletionInTextFieldTest method testMoveMembersTargetClass.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testMoveMembersTargetClass() throws Exception {
configureByFiles(null, BASE_PATH + getTestName(false) + "_2.js2");
PsiFile fragment = ActionScriptMoveMembersDialog.createTargetClassField(myProject, "", ActionScriptMoveMembersDialog.getScope(myProject), myFile).getPsiFile();
String[] included = new String[] { "Z111", "Z222" };
String[] excluded = new String[] { "EventDispatcher", "int", "String", "uint", "Number", "public", "function", "while" };
checkTextFieldCompletion((JSExpressionCodeFragment) fragment, included, excluded, "Z222", BASE_PATH + getTestName(false) + ".txt");
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class ActionScriptCompletionInTextFieldTest method testIntroduceConstantTargetClass.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testIntroduceConstantTargetClass() throws Exception {
configureByFiles(null, BASE_PATH + getTestName(false) + "_2.js2");
// scope calculated same way as in constructor of JSIntroduceConstantDialog
Module module = ModuleUtilCore.findModuleForPsiElement(myFile);
GlobalSearchScope targetClassScope = module != null ? GlobalSearchScope.moduleWithDependenciesScope(module) : GlobalSearchScope.projectScope(myProject);
PsiFile fragment = JSIntroduceConstantDialog.createTargetClassField(myProject, "", targetClassScope).getPsiFile();
String[] included = new String[] { "Z111", "Z222", "com" };
String[] excluded = new String[] { "EventDispatcher", "int", "String", "uint", "Number", "public", "function", "while" };
checkTextFieldCompletion((JSExpressionCodeFragment) fragment, included, excluded, "Z222", BASE_PATH + getTestName(false) + ".txt");
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class ActionScriptCompletionInTextFieldTest method testComponentFromIndependentModule.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testComponentFromIndependentModule() throws Exception {
final Module module2 = doCreateRealModule("module2");
final VirtualFile contentRoot = LocalFileSystem.getInstance().findFileByPath(getTestDataPath() + getBasePath() + "/" + getTestName(false) + "_module2");
PsiTestUtil.addSourceRoot(module2, contentRoot);
configureByFiles(null, BASE_PATH + getTestName(false) + "_2.mxml");
PsiFile fragment = JSReferenceEditor.forClassName("", myProject, null, GlobalSearchScope.moduleScope(myModule), null, null, "").getPsiFile();
checkTextFieldCompletion((JSExpressionCodeFragment) fragment, new String[] { "ComponentFromIndependentModule_2" }, new String[] { "C1" }, null, BASE_PATH + getTestName(false) + ".txt");
fragment = JSReferenceEditor.forClassName("", myProject, null, GlobalSearchScope.moduleScope(module2), null, null, "").getPsiFile();
checkTextFieldCompletion((JSExpressionCodeFragment) fragment, new String[] { "C1" }, new String[] { "ComponentFromIndependentModule_2" }, null, BASE_PATH + getTestName(false) + ".txt");
}
Aggregations