@@ -31,11 +31,20 @@ class SharedSteps(private val remoteRobot: RemoteRobot) {
31
31
step(" Create Or Open Test Project" , Runnable {
32
32
try {
33
33
remoteRobot.welcomeFrame {
34
- val newProjectButton = remoteRobot.find(
35
- ContainerFixture ::class .java,
36
- byXpath(" //div[@visible_text='New Project']" )
37
- )
38
- newProjectButton.click(Point (15 , - 15 ))
34
+ try {
35
+ val newProjectIcon = remoteRobot.find(
36
+ ContainerFixture ::class .java,
37
+ byXpath(" //div[@defaulticon='createNewProjectTab.svg']" )
38
+ );
39
+ newProjectIcon.click();
40
+ } catch (exception: Exception ) {
41
+ val newProjectButton = remoteRobot.find(
42
+ ContainerFixture ::class .java,
43
+ byXpath(" //div[@visible_text='New Project']" )
44
+ )
45
+ newProjectButton.click();
46
+ }
47
+
39
48
Thread .sleep(2_000 )
40
49
41
50
val jTextFieldFixture = find<JTextFieldFixture >(byXpath(" //div[@class='TextFieldWithBrowseButton']" ))
@@ -54,19 +63,6 @@ class SharedSteps(private val remoteRobot: RemoteRobot) {
54
63
enableMagentoSupport()
55
64
}
56
65
} catch (exception: Exception ) {
57
- // temporary workaround until we get license for CI
58
- activateIde()
59
- // end temporary workaround
60
- try {
61
- val launchedFromScript = remoteRobot.find(
62
- ContainerFixture ::class .java,
63
- byXpath(" //div[@class='LinkLabel']" )
64
- )
65
- launchedFromScript.click()
66
- } catch (e: Exception ) {
67
- // Element does not exist, continue without failing the test
68
- }
69
-
70
66
createProjectFromExistingFiles()
71
67
enableMagentoSupport()
72
68
}
@@ -102,38 +98,18 @@ class SharedSteps(private val remoteRobot: RemoteRobot) {
102
98
)
103
99
}
104
100
105
- private fun activateIde () {
106
- if (" true" == System .getenv(" GITHUB_ACTIONS" )) {
107
- val startTrial =
108
- remoteRobot.find(ContainerFixture ::class .java, byXpath(" //div[@visible_text='Start trial']" ))
109
- startTrial.click()
110
-
111
- val startTrialFree = remoteRobot.find(ContainerFixture ::class .java, byXpath(" //div[@class='s']" ))
112
- startTrialFree.click()
113
-
114
- val dialog = remoteRobot.find(
115
- DialogFixture ::class .java, byXpath(" //div[@class='MyDialog']" )
116
- )
117
- dialog.button(" Close" ).click()
118
- closeBrowser()
119
-
120
- try {
121
- Thread .sleep(10000 )
122
- } catch (e: InterruptedException ) {
123
- Thread .currentThread().interrupt()
124
- throw RuntimeException (e)
125
- }
126
- } else {
127
- closeBrowser()
101
+ private fun enableMagentoSupport () {
102
+ try {
103
+ // closing AI adv popup
128
104
val dialog = remoteRobot.find(
129
105
DialogFixture ::class .java, byXpath(" //div[@class='MyDialog']" )
130
106
)
131
- dialog.button(" Activate" ).click()
132
107
dialog.button(" Close" ).click()
108
+ } catch (e: Exception ) {
109
+ // do nothing
133
110
}
134
- }
135
111
136
- private fun enableMagentoSupport () {
112
+
137
113
remoteRobot.idea {
138
114
step(" Enable Magento Integration" ) {
139
115
waitFor(ofMinutes(1 )) { isDumbMode().not () }
@@ -152,13 +128,6 @@ class SharedSteps(private val remoteRobot: RemoteRobot) {
152
128
153
129
private fun createProjectFromExistingFiles () {
154
130
remoteRobot.welcomeFrame {
155
- try {
156
- val launchedFromScript = find<ContainerFixture >(byXpath(" //div[@class='LinkLabel']" ))
157
- launchedFromScript.click()
158
- } catch (e: Exception ) {
159
- // Element does not exist, continue without failing the test
160
- }
161
-
162
131
createNewProjectFromExistingFilesLink.click()
163
132
selectProjectPath()
164
133
}
0 commit comments