use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class FlexDocumentationTest method testFlexCssProperty.
@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithFlexFacet })
public void testFlexCssProperty() throws Exception {
DocumentationProvider cssDocumentationProvider = new CssDocumentationProvider();
PsiElement docElement = getDocElementForLookupItem(cssDocumentationProvider, getTestName(false) + ".css");
assertInstanceOf(docElement, JSAttributeNameValuePair.class);
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class FlexDocumentationTest method testFlexCssPropertyMultiDocumentationInLookup.
@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithFlexFacet })
public void testFlexCssPropertyMultiDocumentationInLookup() throws Exception {
DocumentationProvider cssDocProvider = new CssDocumentationProvider();
String doc = testOne(cssDocProvider, getTestName(false) + ".css", new CssPropertyDescriptorStub("borderColor"));
assertNotNull(doc);
assertTrue("Container's borderColor property missing", doc.indexOf("Container") >= 0);
assertTrue("Button's borderColor property missing", doc.indexOf("Button") >= 0);
assertTrue("UIComponent's borderColor property missing", doc.indexOf("UIComponent") >= 0);
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class FlexNavigationTest method testSdkClass1.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testSdkClass1() throws Exception {
VirtualFile asdoc = LocalFileSystem.getInstance().findFileByPath(getTestDataPath() + BASE_PATH + "SdkAsdoc.zip");
asdoc = JarFileSystem.getInstance().getJarRootForLocalFile(asdoc);
VirtualFile swc = LocalFileSystem.getInstance().findFileByPath(getTestDataPath() + BASE_PATH + "CustomSdk.swc");
swc = JarFileSystem.getInstance().getJarRootForLocalFile(swc);
FlexTestUtils.setupCustomSdk(myModule, swc, null, asdoc);
myAfterCommitRunnable = () -> FlexTestUtils.addLibrary(myModule, "Lib", getTestDataPath() + BASE_PATH, "TestLib1.swc", null, null);
VirtualFile forAsDoc = swc.findChild("library.swf");
doTest("SdkClass.as", null, forAsDoc);
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class ActionScriptCompletionInTextFieldTest method testChangeSignatureDefaultValueCell.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testChangeSignatureDefaultValueCell() throws Exception {
configureByFiles(null, BASE_PATH + getTestName(false) + "_2.js2");
JSExpressionCodeFragment fragment = JSParameterTableModel.createDefaultValueCellFragment("", createFakeClass());
String[] included = DEFALUT_VALUES;
// TODO classes should be removed from completion list
included = ArrayUtil.mergeArrays(included, "Z111", "Z222", "int", "String", "uint", "Number", "EventDispatcher");
String[] excluded = new String[] { "public", "function", "while" };
checkTextFieldCompletion(fragment, included, excluded, "EventDispatcher", BASE_PATH + getTestName(false) + ".txt");
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class ActionScriptCompletionInTextFieldTest method testMoveMembersTargetInnerClass.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testMoveMembersTargetInnerClass() throws Exception {
configureByFiles(null, BASE_PATH + getTestName(false) + "_2.js2");
PsiFile fragment = ActionScriptMoveMembersDialog.createTargetClassField(myProject, "", ActionScriptMoveMembersDialog.getScope(myProject), myFile).getPsiFile();
String[] included = new String[] { "Inner" };
checkTextFieldCompletion((JSExpressionCodeFragment) fragment, included, ArrayUtil.EMPTY_STRING_ARRAY, "Inner", BASE_PATH + getTestName(false) + ".txt");
}
Aggregations