use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class FlexCompletionTest method testNonApplicableInheritors.
@JSTestOptions({ JSTestOption.WithGumboSdk, JSTestOption.WithFlexLib, JSTestOption.WithSmartCompletion })
public void testNonApplicableInheritors() throws Exception {
FlexTestUtils.modifyConfigs(myProject, editor -> {
final ModifiableFlexBuildConfiguration bc1 = editor.getConfigurations(myModule)[0];
final ModifiableFlexBuildConfiguration bc2 = editor.copyConfiguration(bc1, BuildConfigurationNature.DEFAULT);
bc2.setName("bc 2");
bc2.getDependencies().getModifiableEntries().clear();
});
LookupElement[] elements = doTest("", "as");
assertEquals(3, elements.length);
assertEquals("Image", elements[0].getLookupString());
assertEquals("Base64Image", elements[1].getLookupString());
assertEquals("ImageMap", elements[2].getLookupString());
final FlexBuildConfigurationManager manager = FlexBuildConfigurationManager.getInstance(myModule);
manager.setActiveBuildConfiguration(manager.findConfigurationByName("bc 2"));
elements = doTest("", "as");
assertEquals(1, elements.length);
assertEquals("Image", elements[0].getLookupString());
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class FlexDocumentationTest method testFlexCssSelectorMultiDocumentationInLookup.
@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithFlexFacet })
public void testFlexCssSelectorMultiDocumentationInLookup() throws Exception {
myAfterCommitRunnable = () -> FlexTestUtils.addLibrary(myModule, "TestLib", getTestDataPath() + BASE_PATH, "MyLib1.swc", "MyLib1_src.zip", null);
String doc = testOne(new CssDocumentationProvider(), getTestName(false) + ".css");
assertTrue(doc.indexOf("p1.MyClass") >= 0);
assertTrue(doc.indexOf("p2.MyClass") >= 0);
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class FlexCompletionTest method testIgnoreClassesFromOnlySdkSources.
@JSTestOptions({ JSTestOption.WithFlexSdk })
public void testIgnoreClassesFromOnlySdkSources() throws Exception {
final String testName = getTestName(false);
final VirtualFile srcFile = LocalFileSystem.getInstance().findFileByPath(getTestDataPath() + getBasePath() + "/" + testName + "_sdk_src/");
final Sdk flexSdk = FlexUtils.getSdkForActiveBC(myModule);
final SdkModificator modificator = flexSdk.getSdkModificator();
modificator.addRoot(srcFile, OrderRootType.SOURCES);
modificator.commitChanges();
assertNull(doTest("_1", MXML_EXTENSION));
assertNull(doTest("_2", MXML_EXTENSION));
assertNull(doTest("_3", MXML_EXTENSION));
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class FlexCompletionTest method testCompletionInMxml8.
@JSTestOptions({ JSTestOption.WithJsSupportLoader, JSTestOption.WithFlexFacet })
public final void testCompletionInMxml8() throws Exception {
LookupElement[] items = doTest("", MXML_EXTENSION);
assertNotNull(items);
assertTrue(items.length < 50);
doTest("_3", MXML_EXTENSION);
items = doTest("_2", MXML_EXTENSION);
assertNotNull(items);
for (LookupElement li : items) {
assertTrue(!li.getLookupString().equals("arity"));
}
}
use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.
the class FlexDocumentationTest method testMxmlDoc5.
@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithFlexFacet })
public void testMxmlDoc5() throws Exception {
PsiElement element = getDocElementForLookupItem(new CssDocumentationProvider(), getTestName(false) + ".mxml");
assertNull(element);
}
Aggregations