@@ -5,6 +5,7 @@ import com.intellij.remoterobot.data.RemoteComponent
5
5
import com.intellij.remoterobot.fixtures.*
6
6
import com.intellij.remoterobot.search.locators.byXpath
7
7
import com.intellij.remoterobot.utils.Keyboard
8
+ import java.time.Duration
8
9
9
10
@FixtureName(" UnitTestBotDialog" )
10
11
@DefaultXpath(" Dialog type" , " //*[contains(@title, 'UnitTestBot')]" )
@@ -21,12 +22,96 @@ class UnitTestBotDialogFixture(
21
22
get() = actionLink(
22
23
byXpath(" //div[@class='SdkNotificationPanel']//div[@class='HyperlinkLabel']" ))
23
24
25
+ val testSourcesRootLabel
26
+ get() = jLabel(
27
+ byXpath(" //div[@text='Test sources root:']" ))
28
+
24
29
val testSourcesRootComboBox
25
30
get() = comboBox(
26
- byXpath(" //div[@class='TestFolderComboWithBrowseButton']/div[1]" ))
31
+ byXpath(" //div[@class='TestFolderComboWithBrowseButton']/div[@class='ComboBox']" ))
32
+
33
+ val testingFrameworkLabel
34
+ get() = jLabel(
35
+ byXpath(" //div[@text='Testing framework:']" ))
36
+
37
+ val testingFrameworkComboBox
38
+ get() = comboBox(
39
+ byXpath(" //div[@accessiblename='Testing framework:' and @class='ComboBox']" ))
40
+
41
+ val mockingStrategyLabel
42
+ get() = jLabel(
43
+ byXpath(" //div[@text='Mocking strategy:']" ))
44
+
45
+ val mockingStrategyComboBox
46
+ get() = comboBox(
47
+ byXpath(" //div[@accessiblename='Mocking strategy:' and @class='ComboBox']" ))
48
+
49
+ val mockStaticMethodsCheckbox
50
+ get() = checkBox(
51
+ byXpath(" //div[@text='Mock static methods']" ))
52
+
53
+ val parameterizedTestsCheckbox
54
+ get() = checkBox(
55
+ byXpath(" //div[@text='Parameterized tests']" ))
56
+
57
+ val testGenerationTimeoutLabel
58
+ get() = jLabel(
59
+ byXpath(" //div[@text='Test generation timeout:']" ))
60
+
61
+ val testGenerationTimeoutTextField
62
+ get() = textField(
63
+ byXpath(" //div[@class='JFormattedTextField']" ))
64
+
65
+ val timeoutSecondsPerClassLabel
66
+ get() = jLabel(
67
+ byXpath(" //div[@text='seconds per class']" ))
68
+
69
+ val generateTestsForLabel
70
+ get() = jLabel(
71
+ byXpath(" //div[@text='Generate tests for:']" ))
72
+
73
+ val memberListTable
74
+ get() = remoteRobot.find<JTableFixture >(byXpath(" //div[@class='MemberSelectionTable']" ),
75
+ Duration .ofSeconds(5 )
76
+ )
27
77
28
78
val generateTestsButton
29
79
get() = button(
30
80
byXpath(" //div[@class='MainButton']" ))
31
81
82
+ val arrowOnGenerateTestsButton
83
+ get() = button(
84
+ byXpath(" //div[@class='JBOptionButton' and @text='Generate Tests']//div[@class='ArrowButton']" ))
85
+
86
+ val buttonsList
87
+ get() = heavyWeightWindow().itemsList
88
+
89
+
90
+ // Spring-specific elements
91
+ val springConfigurationLabel
92
+ get() = jLabel(
93
+ byXpath(" //div[@text='Spring configuration:']" ))
94
+
95
+ val springConfigurationComboBox
96
+ get() = comboBox(
97
+ byXpath(" //div[@accessiblename='Spring configuration:' and @class='ComboBox']" ))
98
+
99
+ val springTestsTypeLabel
100
+ get() = jLabel(
101
+ byXpath(" //div[@text='Test type:']" ))
102
+
103
+ val springTestsTypeComboBox
104
+ get() = comboBox(
105
+ byXpath(" //div[@accessiblename='Test type:' and @class='ComboBox']" ))
106
+
107
+ val springActiveProfilesLabel
108
+ get() = jLabel(
109
+ byXpath(" //div[@text='Active profile(s):']" ))
110
+
111
+ val springActiveProfilesTextField
112
+ get() = textField(
113
+ byXpath(" //div[@accessiblename='Active profile(s):' and @class='JBTextField']" ))
114
+
115
+ val integrationTestsWarningDialog: WarningDialogFixture
116
+ get() = remoteRobot.find<WarningDialogFixture >(byXpath( " //div[@title='Warning']" ))
32
117
}
0 commit comments