Skip to content

Commit a4f65eb

Browse files
committed
1263: test with licensing workaround
1 parent 46b8e90 commit a4f65eb

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

src/test/kotlin/com/magento/idea/magento2plugin/actions/content/MarkDirectoryAsMagentoRootTest.kt

+17-4
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@ package com.magento.idea.magento2plugin.actions.content
88
import com.automation.remarks.junit5.Video
99
import org.assertj.swing.core.MouseButton
1010
import com.intellij.remoterobot.RemoteRobot
11+
import com.intellij.remoterobot.fixtures.ComponentFixture
1112
import com.intellij.remoterobot.fixtures.ContainerFixture
13+
import com.intellij.remoterobot.fixtures.Fixture
14+
import com.intellij.remoterobot.fixtures.JButtonFixture
1215
import com.intellij.remoterobot.search.locators.byXpath
1316
import com.intellij.remoterobot.steps.CommonSteps
1417
import com.intellij.remoterobot.stepsProcessing.step
18+
import com.intellij.remoterobot.utils.Keyboard
1519
import com.intellij.remoterobot.utils.keyboard
1620
import com.intellij.remoterobot.utils.waitFor
1721
import com.intellij.remoterobot.utils.waitForIgnoringError
22+
import com.intellij.ui.components.dialog
1823
import com.magento.idea.magento2plugin.pages.*
1924
import com.magento.idea.magento2plugin.utils.RemoteRobotExtension
2025
import com.magento.idea.magento2plugin.utils.StepsLogger
@@ -62,6 +67,14 @@ class MarkDirectoryAsMagentoRootTest {
6267
@Test
6368
@Video
6469
fun testMarkDirectoryAsMagentoRoot(remoteRobot: RemoteRobot) = with(remoteRobot) {
70+
// temporary workaround until we get license for CI
71+
val startTrial = find<ContainerFixture>(byXpath("//div[@visible_text='Start trial']"))
72+
startTrial.click()
73+
val startTrialFree = find<ContainerFixture>(byXpath("//div[@class='s']"))
74+
startTrialFree.click()
75+
val dialog = find<DialogFixture>(byXpath("//div[@class='MyDialog']"))
76+
dialog.button("Close").click();
77+
// end temporary workaround
6578

6679
welcomeFrame {
6780
createNewProjectFromExistingFilesLink.click()
@@ -85,11 +98,11 @@ class MarkDirectoryAsMagentoRootTest {
8598
enableSupportLink.click(java.awt.Point(1, 1))
8699
waitFor(ofMinutes(1)) { isDumbMode().not() }
87100

101+
keyboard {
102+
hotKey(VK_ALT, VK_1)
103+
}
104+
88105
with(projectViewTree) {
89-
if (hasText("vendor").not()) {
90-
findText(projectName).doubleClick()
91-
waitFor { hasText("src") }
92-
}
93106
findText("vendor").doubleClick()
94107
findText("module-catalog").doubleClick()
95108
findText("Block").doubleClick()

src/test/kotlin/com/magento/idea/magento2plugin/pages/IdeaFrame.kt

-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ class IdeaFrame(remoteRobot: RemoteRobot, remoteComponent: RemoteComponent) :
2525
val projectViewTree
2626
get() = find<ContainerFixture>(byXpath("ProjectViewTree", "//div[@class='ProjectViewTree']"))
2727

28-
val projectName
29-
get() = step("Get project name") { return@step callJs<String>("component.getProject().getName()") }
30-
3128
@JvmOverloads
3229
fun dumbAware(timeout: Duration = Duration.ofMinutes(5), function: () -> Unit) {
3330
step("Wait for smart mode") {

0 commit comments

Comments
 (0)