diff --git a/plugins/groovy/src/META-INF/plugin.xml b/plugins/groovy/src/META-INF/plugin.xml
index 2a1d2767e6e9..a07501b10569 100644
--- a/plugins/groovy/src/META-INF/plugin.xml
+++ b/plugins/groovy/src/META-INF/plugin.xml
@@ -97,6 +97,7 @@
+
diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/geb/GebTestNGTestMemberContributor.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/geb/GebTestNGTestMemberContributor.java
new file mode 100644
index 000000000000..627197ea3fdb
--- /dev/null
+++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/geb/GebTestNGTestMemberContributor.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2000-2013 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jetbrains.plugins.groovy.geb;
+
+import com.intellij.psi.PsiClass;
+import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiType;
+import com.intellij.psi.ResolveState;
+import com.intellij.psi.scope.PsiScopeProcessor;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.plugins.groovy.lang.resolve.NonCodeMembersContributor;
+
+/**
+ * @author zolotov
+ */
+public class GebTestNGTestMemberContributor extends NonCodeMembersContributor {
+
+ @Override
+ protected String getParentClassName() {
+ return "geb.testng.GebTest";
+ }
+
+ @Override
+ public void processDynamicElements(@NotNull PsiType qualifierType,
+ PsiClass aClass,
+ PsiScopeProcessor processor,
+ PsiElement place,
+ ResolveState state) {
+ GebUtil.contributeMembersInsideTest(processor, place, state);
+ }
+
+}
diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/geb/GebTestsTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/geb/GebTestsTest.groovy
index c733fcf74295..81008c72449b 100644
--- a/plugins/groovy/test/org/jetbrains/plugins/groovy/geb/GebTestsTest.groovy
+++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/geb/GebTestsTest.groovy
@@ -43,6 +43,18 @@ class FooTest extends geb.junit4.GebReportingTest {
}
}
+""")
+
+ TestUtils.checkCompletionContains(myFixture, "\$()", "to()", "go()", "currentWindow", "verifyAt()", "title")
+ }
+
+ void testTestNGTestMemberCompletion() {
+ myFixture.configureByText("FooTest.groovy", """
+class FooTest extends geb.testng.GebReportingTest {
+ def testFoo() {
+
+ }
+}
""")
TestUtils.checkCompletionContains(myFixture, "\$()", "to()", "go()", "currentWindow", "verifyAt()", "title")
diff --git a/plugins/groovy/testdata/mockGeb/geb-testng-0.7.2.jar b/plugins/groovy/testdata/mockGeb/geb-testng-0.7.2.jar
new file mode 100644
index 000000000000..c61f665bb38c
Binary files /dev/null and b/plugins/groovy/testdata/mockGeb/geb-testng-0.7.2.jar differ