Search in sources :

Example 26 with JSTestOptions

use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.

the class FlexColorAnnotatorTest method testIdea94474.

@JSTestOptions(JSTestOption.WithFlexSdk)
public void testIdea94474() throws Exception {
    GutterMark r = myFixture.findGutter(getTestName(false) + '.' + "css");
    assertNull(r);
}
Also used : GutterMark(com.intellij.codeInsight.daemon.GutterMark) JSTestOptions(com.intellij.lang.javascript.JSTestOptions)

Example 27 with JSTestOptions

use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.

the class FlexUnitCompletionTest method testCustomRunner.

@JSTestOptions({ WithFlexSdk })
public void testCustomRunner() throws Exception {
    VirtualFile[] files = new VirtualFile[] { getVirtualFile(getBasePath() + getTestName(false) + ".as"), getVirtualFile(getBasePath() + "mypackage/FooRunner.as") };
    doTestForFiles(files, "", "as", new File(getTestDataPath() + getBasePath()));
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) VirtualFile(com.intellij.openapi.vfs.VirtualFile) File(java.io.File) JSTestOptions(com.intellij.lang.javascript.JSTestOptions)

Example 28 with JSTestOptions

use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.

the class FlexUnitHighlightingTest method testMethodInSuite2.

@JSTestOptions({ JSTestOption.WithFlexFacet, JSTestOption.WithFlexUnit4 })
public void testMethodInSuite2() throws Exception {
    enableInspectionTool(new JSMethodCanBeStaticInspection());
    doTest(getBasePath() + getTestName(false) + ".as", true, false, true);
}
Also used : JSMethodCanBeStaticInspection(com.intellij.lang.javascript.inspections.JSMethodCanBeStaticInspection) JSTestOptions(com.intellij.lang.javascript.JSTestOptions)

Example 29 with JSTestOptions

use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.

the class ResolveExternalInlineStyleSourceActionTest method testFindComponent.

@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithJsSupportLoader, JSTestOption.WithGumboSdk, JSTestOption.WithFlexFacet })
public void testFindComponent() throws Exception {
    Map<String, String> styles = new THashMap<>();
    styles.put("left", "10");
    styles.put("right", "10");
    ResolveExternalInlineStyleSourceAction action = new ResolveExternalInlineStyleSourceAction("innerComponentInDeclarations", "spark.components.Button", "left", styles, myModule);
    PsiElement element = (PsiElement) action.find();
    assertNotNull(element);
    assertEquals(1717, element.getTextOffset());
}
Also used : THashMap(gnu.trove.THashMap) PsiElement(com.intellij.psi.PsiElement) JSTestOptions(com.intellij.lang.javascript.JSTestOptions)

Example 30 with JSTestOptions

use of com.intellij.lang.javascript.JSTestOptions in project intellij-plugins by JetBrains.

the class ResolveExternalInlineStyleSourceActionTest method testFindComponent2.

@JSTestOptions({ JSTestOption.WithCssSupportLoader, JSTestOption.WithJsSupportLoader, JSTestOption.WithGumboSdk, JSTestOption.WithFlexFacet })
public void testFindComponent2() throws Exception {
    Map<String, String> styles = new THashMap<>();
    styles.put("left", "10");
    styles.put("right", "10");
    styles.put("top", "4");
    ResolveExternalInlineStyleSourceAction action = new ResolveExternalInlineStyleSourceAction("innerComponentInDeclarations", "spark.components.Button", "left", styles, myModule);
    PsiElement element = (PsiElement) action.find();
    assertNotNull(element);
    assertEquals(1808, element.getTextOffset());
}
Also used : THashMap(gnu.trove.THashMap) PsiElement(com.intellij.psi.PsiElement) JSTestOptions(com.intellij.lang.javascript.JSTestOptions)

Aggregations

JSTestOptions (com.intellij.lang.javascript.JSTestOptions)59 VirtualFile (com.intellij.openapi.vfs.VirtualFile)20 PsiFile (com.intellij.psi.PsiFile)12 PsiElement (com.intellij.psi.PsiElement)11 JSExpressionCodeFragment (com.intellij.lang.javascript.psi.JSExpressionCodeFragment)5 File (java.io.File)5 CssDocumentationProvider (com.intellij.psi.css.impl.util.CssDocumentationProvider)4 THashMap (gnu.trove.THashMap)4 GutterMark (com.intellij.codeInsight.daemon.GutterMark)3 FlexDocumentationProvider (com.intellij.javascript.flex.FlexDocumentationProvider)3 DocumentationProvider (com.intellij.lang.documentation.DocumentationProvider)3 JSDocumentationProvider (com.intellij.lang.javascript.documentation.JSDocumentationProvider)3 JSCodeStyleSettings (com.intellij.lang.javascript.formatter.JSCodeStyleSettings)3 JSClass (com.intellij.lang.javascript.psi.ecmal4.JSClass)3 Sdk (com.intellij.openapi.projectRoots.Sdk)3 SdkModificator (com.intellij.openapi.projectRoots.SdkModificator)3 LookupElement (com.intellij.codeInsight.lookup.LookupElement)2 RunManager (com.intellij.execution.RunManager)2 ModifiableFlexBuildConfiguration (com.intellij.lang.javascript.flex.projectStructure.model.ModifiableFlexBuildConfiguration)2 ECMA4CodeStyleSettings (com.intellij.lang.javascript.formatter.ECMA4CodeStyleSettings)2