From b657e29ae5d0aaae27b283e1ce160aaf14d4ffb0 Mon Sep 17 00:00:00 2001 From: Daniil Tsarev Date: Fri, 28 Aug 2026 14:16:41 +0200 Subject: [PATCH] IDEA-393177 [jakarta] Update Gradle templates for Jakarta EE 9, 10, and 11; add matrix project tests (cherry picked from commit e87ac16cfdd2209fd0398be144e9ae2f702813f2) IJ-MR-220738 (cherry picked from commit bb01bd937bfd8ff20b02d53d77c46e746b5b3d13) GitOrigin-RevId: 20f68969418b5330b34fc07ac771ef38a5ffd401 --- .../idea/dialogs/JakartaNewProjectDialogUI.kt | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/idea/dialogs/JakartaNewProjectDialogUI.kt b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/idea/dialogs/JakartaNewProjectDialogUI.kt index e2aceb366d52..71140d510734 100644 --- a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/idea/dialogs/JakartaNewProjectDialogUI.kt +++ b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/idea/dialogs/JakartaNewProjectDialogUI.kt @@ -6,6 +6,7 @@ import com.intellij.driver.sdk.ui.components.ComponentData import com.intellij.driver.sdk.ui.components.UiComponent import com.intellij.driver.sdk.ui.components.common.dialogs.NewProjectDialogUI import com.intellij.driver.sdk.ui.components.elements.JComboBoxUiComponent +import com.intellij.driver.sdk.ui.components.elements.checkBoxTree import com.intellij.driver.sdk.ui.components.elements.comboBox import com.intellij.driver.sdk.ui.shouldBe import com.intellij.driver.sdk.ui.ui @@ -44,6 +45,25 @@ class JakartaNewProjectDialogUI(data: ComponentData) : NewProjectDialogUI(data) } } + /** + * Checks a specification in the "Specifications" category of the dependencies tree. + * + * @param profileTitle the library title, for example "Full Platform", "Web Profile" or "Core Profile" + */ + fun pickSpecificationProfile(profileTitle: String) { + step("Pick the '$profileTitle' specification") { + checkBoxTree().apply { + expandPath(SPECIFICATIONS_CATEGORY) + // The renderer appends the version to the title, so the node reads "Full Platform (11.0.0)". + val nodePath = collectCheckboxes() + .map { it.path } + .firstOrNull { it.size == 2 && it[0] == SPECIFICATIONS_CATEGORY && it[1].startsWith(profileTitle) } + ?: error("No '$profileTitle' node under '$SPECIFICATIONS_CATEGORY' in the dependencies tree") + switchCheckBoxByPath(nodePath, true) + } + } + } + fun getActualAddedDependencies(): List { val list: List = xx("//div[@accessiblename='Added dependencies:']/following-sibling::div[@class='SelectedLibrariesPanel']//div[@class='ScrollablePanel']").list() if (list.isEmpty()) { @@ -56,4 +76,8 @@ class JakartaNewProjectDialogUI(data: ComponentData) : NewProjectDialogUI(data) .toList() } } + + private companion object { + const val SPECIFICATIONS_CATEGORY = "Specifications" + } } \ No newline at end of file