Skip to content

Commit

Permalink
Merge pull request #8 from osafi/master
Browse files Browse the repository at this point in the history
IDEA 2018.3 Support
  • Loading branch information
Gregg Van Hove authored Dec 18, 2018
2 parents af68f15 + 65f7ac9 commit b13d985
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ intellij {
}

patchPluginXml {
sinceBuild "173"
sinceBuild "183"
}

repositories {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = IdeaJasmine
group = io.pivotal.jasmine
version = 1.3
ideaVersion = IU-2018.2.4
ideaVersion = IU-LATEST-EAP-SNAPSHOT
publishChannels = Stable
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import org.jdom.Element
import java.nio.file.Paths


class JasmineRunConfiguration(project: Project, factory: ConfigurationFactory, name: String) : LocatableConfigurationBase(project, factory, name) {
class JasmineRunConfiguration(project: Project, factory: ConfigurationFactory, name: String)
: LocatableConfigurationBase<Any>(project, factory, name) {
var jasmineRunSettings = JasmineRunSettings()
private var _jasminePackage: NodePackage? = null

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ package io.pivotal.intellij.jasmine
import com.intellij.json.JsonFileType
import com.intellij.openapi.util.IconLoader.CachedImageIcon
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
import org.fest.assertions.Assertions.assertThat
import org.hamcrest.CoreMatchers.endsWith
import org.junit.Assert.assertThat

class JasmineConfigIconProviderTest : LightPlatformCodeInsightFixtureTestCase() {

Expand All @@ -12,7 +13,7 @@ class JasmineConfigIconProviderTest : LightPlatformCodeInsightFixtureTestCase()

val jasmineIcon = JasmineConfigIconProvider().getIcon(jasmineConfigFile, 0) as CachedImageIcon

assertThat(jasmineIcon.toString()).endsWith("/icons/jasmine.png")
assertThat(jasmineIcon.toString(), endsWith("/icons/jasmine.png"))
}

fun `test does not show jasmine icon on other files`() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import com.intellij.execution.process.KillableColoredProcessHandler
import com.intellij.execution.runners.ExecutionEnvironmentBuilder
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
import io.pivotal.intellij.jasmine.scope.JasmineScope
import junit.framework.TestCase
import org.fest.assertions.Assertions.assertThat
import org.hamcrest.CoreMatchers.*
import org.junit.Assert.assertThat

class JasmineRunProfileStateTest : LightPlatformCodeInsightFixtureTestCase() {

Expand Down Expand Up @@ -37,9 +37,9 @@ class JasmineRunProfileStateTest : LightPlatformCodeInsightFixtureTestCase() {
specFile = testFilePath
))

assertThat(testFileCommand).endsWith(testFilePath)
assertThat(suiteCommand).endsWith(testFilePath)
assertThat(testCommand).endsWith(testFilePath)
assertThat(testFileCommand, endsWith(testFilePath))
assertThat(suiteCommand, endsWith(testFilePath))
assertThat(testCommand, endsWith(testFilePath))
}

fun `test test names added as filter`() {
Expand All @@ -52,8 +52,8 @@ class JasmineRunProfileStateTest : LightPlatformCodeInsightFixtureTestCase() {
testNames = listOf("App", "spec", "name with spaces")
))

assertThat(suiteCommand).endsWith("\"--filter=App.spec.name with spaces\"")
assertThat(testCommand).endsWith("\"--filter=App.spec.name with spaces\"")
assertThat(suiteCommand, endsWith("\"--filter=App.spec.name with spaces\""))
assertThat(testCommand, endsWith("\"--filter=App.spec.name with spaces\""))
}

fun `test filter not added when empty test names`() {
Expand All @@ -62,7 +62,7 @@ class JasmineRunProfileStateTest : LightPlatformCodeInsightFixtureTestCase() {
testNames = listOf()
))

assertThat(noFilterCommand).doesNotContain("--filter")
assertThat(noFilterCommand, not(containsString("--filter")))
}

private fun commandLineFromSettings(runSettings: JasmineRunSettings = JasmineRunSettings()): String {
Expand Down

0 comments on commit b13d985

Please sign in to comment.