mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[gui-test] added debug screenshots before and after test
This commit is contained in:
+14
@@ -3,7 +3,11 @@ package com.intellij.ide.projectWizard.kotlin.createProject
|
||||
|
||||
import com.intellij.ide.projectWizard.kotlin.model.*
|
||||
import com.intellij.testGuiFramework.framework.param.GuiTestSuiteParam
|
||||
import com.intellij.testGuiFramework.impl.ScreenshotOnFailure
|
||||
import com.intellij.testGuiFramework.util.currentTimeInHumanString
|
||||
import com.intellij.testGuiFramework.util.scenarios.NewProjectDialogModel
|
||||
import org.junit.After
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.Parameterized
|
||||
@@ -20,6 +24,16 @@ class CreateGradleKotlinDslProjectWithKotlinGuiTest(private val testParameters:
|
||||
override fun toString() = projectName
|
||||
}
|
||||
|
||||
@Before
|
||||
fun beforeTest(){
|
||||
ScreenshotOnFailure.takeScreenshot("${currentTimeInHumanString}_before_${testMethod.methodName}")
|
||||
}
|
||||
|
||||
@After
|
||||
fun afterTest(){
|
||||
ScreenshotOnFailure.takeScreenshot("${currentTimeInHumanString}_after_${testMethod.methodName}")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun createKotlinDslGradleWithKotlin() {
|
||||
testGradleProjectWithKotlin(
|
||||
|
||||
+14
@@ -3,7 +3,11 @@ package com.intellij.ide.projectWizard.kotlin.createProject
|
||||
|
||||
import com.intellij.ide.projectWizard.kotlin.model.*
|
||||
import com.intellij.testGuiFramework.framework.param.GuiTestSuiteParam
|
||||
import com.intellij.testGuiFramework.impl.ScreenshotOnFailure
|
||||
import com.intellij.testGuiFramework.util.currentTimeInHumanString
|
||||
import com.intellij.testGuiFramework.util.scenarios.NewProjectDialogModel
|
||||
import org.junit.After
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.Parameterized
|
||||
@@ -20,6 +24,16 @@ class CreateGradleProjectWithKotlinGuiTest(private val testParameters: TestParam
|
||||
override fun toString() = projectName
|
||||
}
|
||||
|
||||
@Before
|
||||
fun beforeTest(){
|
||||
ScreenshotOnFailure.takeScreenshot("${currentTimeInHumanString}_before_${testMethod.methodName}")
|
||||
}
|
||||
|
||||
@After
|
||||
fun afterTest(){
|
||||
ScreenshotOnFailure.takeScreenshot("${currentTimeInHumanString}_after_${testMethod.methodName}")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun createGradleWithKotlin() {
|
||||
testGradleProjectWithKotlin(
|
||||
|
||||
+2
@@ -4,6 +4,7 @@ package com.intellij.testGuiFramework.fixtures
|
||||
import com.intellij.openapi.wm.impl.welcomeScreen.FlatWelcomeFrame
|
||||
import com.intellij.testGuiFramework.framework.Timeouts
|
||||
import com.intellij.testGuiFramework.impl.*
|
||||
import com.intellij.testGuiFramework.util.currentTimeInHumanString
|
||||
import com.intellij.testGuiFramework.util.step
|
||||
import org.fest.swing.core.Robot
|
||||
import org.fest.swing.exception.ComponentLookupException
|
||||
@@ -17,6 +18,7 @@ class WelcomeFrameFixture private constructor(robot: Robot,
|
||||
WelcomeFrameFixture::class.java, robot, target), ContainerFixture<FlatWelcomeFrame> {
|
||||
|
||||
fun createNewProject(): WelcomeFrameFixture {
|
||||
ScreenshotOnFailure.takeScreenshot("${currentTimeInHumanString}_before click Create New Project")
|
||||
findActionLinkByActionId("WelcomeScreen.CreateNewProject").click()
|
||||
return this
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user