From 1dac83f97e00bfc348b61f87d59d18ea38eced61 Mon Sep 17 00:00:00 2001 From: Paul Gooderham Date: Tue, 22 Oct 2024 23:16:06 -0400 Subject: [PATCH 1/2] Wait 5s after UI robot types in a config file Signed-off-by: Paul Gooderham --- .../java/io/openliberty/tools/intellij/it/UIBotTestUtils.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java b/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java index bf5fb31a5..58085e19e 100644 --- a/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java +++ b/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java @@ -1104,6 +1104,7 @@ public static void insertConfigIntoConfigFile(RemoteRobot remoteRobot, String fi keyboard.enter(); keyboard.enterText(configNameSnippet); + TestUtils.sleepAndIgnoreException(5); // Narrow down the config name completion suggestions in the pop-up window that is automatically // opened as text is typed based on the value of configNameSnippet. Avoid hitting ctrl + space as it has the side effect of selecting @@ -1123,6 +1124,7 @@ public static void insertConfigIntoConfigFile(RemoteRobot remoteRobot, String fi keyboard.hotKey(VK_END); keyboard.enterText(configValueSnippet); + TestUtils.sleepAndIgnoreException(5); if (completeWithPopup) { // Select the appropriate value completion suggestion in the pop-up window that is automatically From b657adc7197ae4bb089d7ca7905ef3ada623272e Mon Sep 17 00:00:00 2001 From: Paul Gooderham Date: Wed, 30 Oct 2024 17:59:19 -0400 Subject: [PATCH 2/2] Add comments to explain why we need to pause Signed-off-by: Paul Gooderham --- .../java/io/openliberty/tools/intellij/it/UIBotTestUtils.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java b/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java index 58085e19e..20c0988dc 100644 --- a/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java +++ b/src/test/java/io/openliberty/tools/intellij/it/UIBotTestUtils.java @@ -1104,6 +1104,7 @@ public static void insertConfigIntoConfigFile(RemoteRobot remoteRobot, String fi keyboard.enter(); keyboard.enterText(configNameSnippet); + // After typing it can take 1 or 2s for IntelliJ to render diagnostics etc. Must wait before continuing. TestUtils.sleepAndIgnoreException(5); // Narrow down the config name completion suggestions in the pop-up window that is automatically @@ -1124,6 +1125,7 @@ public static void insertConfigIntoConfigFile(RemoteRobot remoteRobot, String fi keyboard.hotKey(VK_END); keyboard.enterText(configValueSnippet); + // After typing it can take 1 or 2s for IntelliJ to render diagnostics etc. Must wait before continuing. TestUtils.sleepAndIgnoreException(5); if (completeWithPopup) {