Skip to content

Commit 5c6d747

Browse files
author
Vitaliy Boyko
committed
3.0.0 fixed linemarker tests
1 parent 8fc918a commit 5c6d747

8 files changed

+27
-15
lines changed

build.gradle

+12
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ version '3.0.0'
1919

2020
apply plugin: 'org.jetbrains.intellij'
2121
apply plugin: 'java'
22+
apply plugin: 'idea'
2223
apply plugin: 'groovy'
2324
apply plugin: 'org.jetbrains.changelog'
2425

@@ -91,3 +92,14 @@ changelog {
9192
unreleasedTerm = "[Unreleased]"
9293
groups = ["Added", "Changed", "Deprecated", "Removed", "Fixed", "Security"]
9394
}
95+
96+
idea {
97+
project {
98+
jdkName = javaVersion
99+
languageLevel = javaVersion
100+
}
101+
102+
module {
103+
generatedSourceDirs += file('gen')
104+
}
105+
}

tests/com/magento/idea/magento2plugin/linemarker/LinemarkerFixtureTestCase.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected void assertHasLinemarkerWithTooltipAndIcon(final String tooltip, final
4040
continue;
4141
}
4242
if (lineMarkerTooltip.equals(tooltip)
43-
&& lineMarkerIcon.toString().endsWith(icon)) {
43+
&& lineMarkerIcon.toString().contains(icon)) {
4444
return;
4545
}
4646
}

tests/com/magento/idea/magento2plugin/linemarker/graphqls/GraphQlResolverClassLinemarkerRegistrarTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ public class GraphQlResolverClassLinemarkerRegistrarTest extends LinemarkerFixtu
1515
public void testWithValidSchemaResolver() {
1616
myFixture.configureByFile(this.getFixturePath("schema.graphqls", "graphqls"));
1717

18-
assertHasLinemarkerWithTooltipAndIcon("Navigate to class", "/nodes/class.svg");
18+
assertHasLinemarkerWithTooltipAndIcon("Navigate to class", "nodes/class.svg");
1919
}
2020
}

tests/com/magento/idea/magento2plugin/linemarker/php/ConfigurationTypeClassLinemarkerRegistrarTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class ConfigurationTypeClassLinemarkerRegistrarTest extends LinemarkerFix
1515
public void testTypeNameClassShouldHaveLinemarker() {
1616
myFixture.configureByFile(this.getFixturePath("Topmenu.php", "php"));
1717

18-
assertHasLinemarkerWithTooltipAndIcon("Navigate to configuration", "/fileTypes/xml.svg");
18+
assertHasLinemarkerWithTooltipAndIcon("Navigate to configuration", "fileTypes/xml.svg");
1919
}
2020

2121
/**
@@ -24,6 +24,6 @@ public void testTypeNameClassShouldHaveLinemarker() {
2424
public void testRegularPhpClassShouldNotHaveLinemarker() {
2525
myFixture.configureByFile(this.getFixturePath("ClassNotConfiguredInDiXml.php", "php"));
2626

27-
assertHasNoLinemarkerWithTooltipAndIcon("Navigate to configuration", "/fileTypes/xml.svg");
27+
assertHasNoLinemarkerWithTooltipAndIcon("Navigate to configuration", "fileTypes/xml.svg");
2828
}
2929
}

tests/com/magento/idea/magento2plugin/linemarker/php/GraphQlResolverUsageLinemarkerRegistrarTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class GraphQlResolverUsageLinemarkerRegistrarTest extends LinemarkerFixtu
1515
public void testResolverClassShouldHaveLinemarker() {
1616
myFixture.configureByFile(this.getFixturePath("Resolver.php", "php"));
1717

18-
assertHasNoLinemarkerWithTooltipAndIcon("Navigate to schema", "/icons/graphqlFile.svg");
18+
assertHasNoLinemarkerWithTooltipAndIcon("Navigate to schema", "icons/graphqlFile.svg");
1919
}
2020

2121
/**
@@ -24,6 +24,6 @@ public void testResolverClassShouldHaveLinemarker() {
2424
public void testRegularClassShouldNotHaveLinemarker() {
2525
myFixture.configureByFile(this.getFixturePath("ClassNotConfiguredInSchema.php", "php"));
2626

27-
assertHasNoLinemarkerWithTooltipAndIcon("Navigate to schema", "/icons/graphqlFile.svg");
27+
assertHasNoLinemarkerWithTooltipAndIcon("Navigate to schema", "icons/graphqlFile.svg");
2828
}
2929
}

tests/com/magento/idea/magento2plugin/linemarker/php/ObserverClassLinemarkerRegistrarTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class ObserverClassLinemarkerRegistrarTest extends LinemarkerFixtureTestC
1515
public void testObserverClassShouldHaveLinemarker() {
1616
myFixture.configureByFile(this.getFixturePath("TestObserver.php", "php"));
1717

18-
assertHasLinemarkerWithTooltipAndIcon("Navigate to configuration", "/fileTypes/xml.svg");
18+
assertHasLinemarkerWithTooltipAndIcon("Navigate to configuration", "fileTypes/xml.svg");
1919
}
2020

2121
/**
@@ -24,6 +24,6 @@ public void testObserverClassShouldHaveLinemarker() {
2424
public void testRegularPhpClassShouldNotHaveLinemarker() {
2525
myFixture.configureByFile(this.getFixturePath("TestNotObserver.php", "php"));
2626

27-
assertHasNoLinemarkerWithTooltipAndIcon("Navigate to configuration", "/fileTypes/xml.svg");
27+
assertHasNoLinemarkerWithTooltipAndIcon("Navigate to configuration", "fileTypes/xml.svg");
2828
}
2929
}

tests/com/magento/idea/magento2plugin/linemarker/php/PluginLinemarkerRegistrarTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class PluginLinemarkerRegistrarTest extends LinemarkerFixtureTestCase {
1515
public void testClassWithPluginShouldHaveLinemarker() {
1616
myFixture.configureByFile(this.getFixturePath("PluginClass.php", "php"));
1717

18-
assertHasLinemarkerWithTooltipAndIcon("Navigate to plugins", "/nodes/plugin.svg");
18+
assertHasLinemarkerWithTooltipAndIcon("Navigate to plugins", "nodes/plugin.svg");
1919
}
2020

2121
/**
@@ -24,6 +24,6 @@ public void testClassWithPluginShouldHaveLinemarker() {
2424
public void testClassWithoutPluginShouldNotHaveLinemarker() {
2525
myFixture.configureByFile(this.getFixturePath("RegularClass.php", "php"));
2626

27-
assertHasNoLinemarkerWithTooltipAndIcon("Navigate to plugins", "/nodes/plugin.svg");
27+
assertHasNoLinemarkerWithTooltipAndIcon("Navigate to plugins", "nodes/plugin.svg");
2828
}
2929
}

tests/com/magento/idea/magento2plugin/linemarker/php/PluginTargetLinemarkerRegistrarTest.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ public class PluginTargetLinemarkerRegistrarTest extends LinemarkerFixtureTestCa
1616
public void testPluginToClassShouldHaveLinemarker() {
1717
myFixture.configureByFile(this.getFixturePath("Topmenu.php", "php"));
1818

19-
assertHasLinemarkerWithTooltipAndIcon("Navigate to target method", "/nodes/method.svg");
20-
assertHasLinemarkerWithTooltipAndIcon("Navigate to target class", "/nodes/class.svg");
19+
assertHasLinemarkerWithTooltipAndIcon("Navigate to target method", "nodes/method.svg");
20+
assertHasLinemarkerWithTooltipAndIcon("Navigate to target class", "nodes/class.svg");
2121
}
2222

2323
/**
@@ -26,8 +26,8 @@ public void testPluginToClassShouldHaveLinemarker() {
2626
public void testPluginToInterfaceShouldHaveLinemarker() {
2727
myFixture.configureByFile(this.getFixturePath("MviewState.php", "php"));
2828

29-
assertHasLinemarkerWithTooltipAndIcon("Navigate to target method", "/nodes/method.svg");
30-
assertHasLinemarkerWithTooltipAndIcon("Navigate to target class", "/nodes/class.svg");
29+
assertHasLinemarkerWithTooltipAndIcon("Navigate to target method", "nodes/method.svg");
30+
assertHasLinemarkerWithTooltipAndIcon("Navigate to target class", "nodes/class.svg");
3131
}
3232

3333
/**
@@ -37,6 +37,6 @@ public void testRegularClassShouldNotHaveLinemarker() {
3737
myFixture.configureByFile(this.getFixturePath("ClassNotConfiguredInDiXml.php", "php"));
3838

3939
assertHasNoLinemarkerWithTooltipAndIcon("Navigate to target method", "/nodes/method.svg");
40-
assertHasNoLinemarkerWithTooltipAndIcon("Navigate to target class", "/nodes/class.svg");
40+
assertHasNoLinemarkerWithTooltipAndIcon("Navigate to target class", "nodes/class.svg");
4141
}
4242
}

0 commit comments

Comments
 (0)