Skip to content

Commit ed84412

Browse files
authored
Add retry clicks due to UI test race condition on 233 (#3977)
A model progress indicator may occur before we manage to click the tool window stripe
1 parent bed2665 commit ed84412

File tree

1 file changed

+16
-7
lines changed
  • ui-tests/tst/software/aws/toolkits/jetbrains/uitests/fixtures

1 file changed

+16
-7
lines changed

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

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,24 @@ fun IdeaFrame.awsExplorer(
1919
val locator = byXpath("//div[@accessiblename='AWS Toolkit Tool Window']")
2020

2121
step("AWS toolkit tool window") {
22-
try {
23-
find<ComponentFixture>(locator)
24-
} catch (e: Exception) {
25-
step("Open tool window") {
26-
// Click the tool window stripe
27-
find(ComponentFixture::class.java, byXpath("//div[@accessiblename='AWS Toolkit' and @class='StripeButton' and @text='AWS Toolkit']")).click()
28-
find(locator, timeout)
22+
repeat(5) {
23+
try {
24+
if (it == 0) {
25+
find<ComponentFixture>(locator)
26+
} else {
27+
// longer timeout on subsequent tries
28+
find<ComponentFixture>(locator, timeout)
29+
}
30+
31+
return@repeat
32+
} catch (e: Exception) {
33+
step("Open tool window") {
34+
// Click the tool window stripe
35+
find<ComponentFixture>(byXpath("//div[@accessiblename='AWS Toolkit' and @class='StripeButton' and @text='AWS Toolkit']")).click()
36+
}
2937
}
3038
}
39+
3140
find<ComponentFixture>(byXpath("//div[@class='TabContainer']//div[@text='Explorer']")).click()
3241
val explorer = find<AwsExplorer>(byXpath("//div[@class='ExplorerToolWindow']"))
3342
explorer.apply(function)

0 commit comments

Comments
 (0)