Skip to content

Commit a681e33

Browse files
authored
Fix CWL Insights UI test (#2470)
1 parent 2161d2e commit a681e33

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

ui-tests/tst/software/aws/toolkits/jetbrains/uitests/tests/InsightsQueryTest.kt

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,9 @@ class InsightsQueryTest {
140140
}
141141

142142
step("Revising query from current results") {
143-
// Find query ID. Query ID is a GUID with dashes, which makes it 36 characters long.
144-
val currentQueryId = findAll<JLabelFixture>(byXpath("//div[@class='ContentTabLabel']"))
145-
.first {
146-
try {
147-
it.findAllText().firstOrNull()?.text?.length == 36
148-
} catch (e: Exception) {
149-
false
150-
}
151-
}
152-
.findAllText()
153-
.first()
154-
.text
155-
val currentTab = find<JLabelFixture>(byXpath("//div[@class='ContentTabLabel' and contains(@accessiblename, '$currentQueryId')]"))
143+
val currentTab = find<JLabelFixture>(byXpath("//div[@class='ContentTabLabel' and starts-with(@accessiblename, 'Query:')]"))
144+
val currentQueryId = currentTab.value.removePrefix("Query: ")
145+
156146
openInsightsQueryDialogFromResults()
157147

158148
step("Change relative time values") {

0 commit comments

Comments
 (0)