use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class ActionScriptCompletionInTextFieldTest method testChangeSignatureInitializerCell.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testChangeSignatureInitializerCell() throws Exception {
configureByFiles(null, BASE_PATH + getTestName(false) + "_2.js2");
JSExpressionCodeFragment fragment = JSParameterTableModel.createInitializerCellFragment("", 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 FlexNavigationTest method testLibraryClass3.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testLibraryClass3() throws Exception {
myAfterCommitRunnable = () -> FlexTestUtils.addLibrary(myModule, "Lib", getTestDataPath() + BASE_PATH, "TestLib1.swc", null, null);
final VirtualFile forSource = getFile("TestLib1.swc!/library.swf");
doTest("LibraryClass.as", forSource, forSource);
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class FlexNavigationTest method testLibraryClass1.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testLibraryClass1() throws Exception {
final String sources = "TestLibSources.zip";
myAfterCommitRunnable = () -> {
FlexTestUtils.addLibrary(myModule, "Lib", getTestDataPath() + BASE_PATH, "TestLib1.swc", null, null);
FlexTestUtils.addLibrary(myModule, "LibWithSources", getTestDataPath() + BASE_PATH, "TestLib2.swc", sources, null);
FlexTestUtils.addLibrary(myModule, "LibWithAsdoc", getTestDataPath() + BASE_PATH, "TestLib3.swc", null, "TestLibAsdoc.zip");
};
final VirtualFile forSource = getFile(sources + "!/com/test/MyButton.as");
doTest("LibraryClass.as", forSource, forSource);
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class FlexNavigationTest method testAmbiguousCssSelector.
@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithFlexFacet })
public void testAmbiguousCssSelector() throws Exception {
final String sources = "StyleableLibSources.zip";
myAfterCommitRunnable = () -> {
FlexTestUtils.addLibrary(myModule, "Lib1", getTestDataPath() + BASE_PATH, "StyleableLib.swc", sources, null);
FlexTestUtils.addLibrary(myModule, "Lib2", getTestDataPath() + BASE_PATH, "StyleableLib1.swc", null, null);
};
final VirtualFile styleableFile = getFile(sources + "!/foo/Styleable1.as");
doTest(getTestName(false) + ".css", styleableFile, null);
PsiFile file = PsiManager.getInstance(myProject).findFile(styleableFile);
if (file instanceof PsiFileImpl) {
assertNull("File should not be parsed", ((PsiFileImpl) file).getTreeElement());
}
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class ActionScriptCompletionInTextFieldTest method testChangeSignatureParameterTypeCell.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testChangeSignatureParameterTypeCell() throws Exception {
configureByFiles(null, BASE_PATH + getTestName(false) + "_2.js2");
JSExpressionCodeFragment fragment = JSParameterTableModel.createParameterTypeCellFragment("", myProject);
String[] included = new String[] { "Z111", "Z222", "int", "String", "uint", "Number", "EventDispatcher", "void", "*" };
String[] excluded = ArrayUtil.mergeArrays(DEFALUT_VALUES, "public", "function", "while");
checkTextFieldCompletion(fragment, included, excluded, "EventDispatcher", BASE_PATH + getTestName(false) + ".txt");
}
Aggregations