diff --git a/test/src/com/dmarcotte/handlebars/editor/templates/HbsEmmetTest.java b/test/src/com/dmarcotte/handlebars/editor/templates/HbsEmmetTest.java new file mode 100644 index 0000000..33acde4 --- /dev/null +++ b/test/src/com/dmarcotte/handlebars/editor/templates/HbsEmmetTest.java @@ -0,0 +1,33 @@ +package com.dmarcotte.handlebars.editor.templates; + +import com.dmarcotte.handlebars.file.HbFileType; +import com.dmarcotte.handlebars.psi.HbPsiFile; +import com.dmarcotte.handlebars.util.HbTestUtils; +import com.intellij.codeInsight.template.TemplateManager; +import com.intellij.codeInsight.template.impl.TemplateSettings; +import com.intellij.psi.PsiFile; +import com.intellij.testFramework.PlatformTestCase; +import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase; + +public class HbsEmmetTest extends LightPlatformCodeInsightFixtureTestCase { + + @Override + protected void setUp() throws Exception { + PlatformTestCase.initPlatformLangPrefix(); + super.setUp(); + } + + public void testSimpleTags() { + myFixture.configureByText(HbFileType.INSTANCE, "div>span"); + TemplateManager.getInstance(getProject()).startTemplate(myFixture.getEditor(), TemplateSettings.TAB_CHAR); + myFixture.checkResult("
"); + } + + public void testSimpleTagsWithHtmlSubstitutor() { + HbTestUtils.setOpenHtmlAsHandlebars(true, getProject(), getTestRootDisposable()); + final PsiFile file = myFixture.configureByText("test.html", "div>span"); + assertInstanceOf(file, HbPsiFile.class); + TemplateManager.getInstance(getProject()).startTemplate(myFixture.getEditor(), TemplateSettings.TAB_CHAR); + myFixture.checkResult("
"); + } +}