UI_tests_fix: add check after click on run - if run doesn't open log page try the second time
@@ -34,6 +34,7 @@ import static com.codeborne.selenide.CollectionCondition.*;
import static com.codeborne.selenide.Condition.*;
import static com.codeborne.selenide.Selectors.*;
import static com.codeborne.selenide.Selenide.*;
+import static com.epam.pipeline.autotests.ao.Primitive.STATUS;
import static com.epam.pipeline.autotests.utils.C.COMPLETION_TIMEOUT;
import static com.epam.pipeline.autotests.utils.PipelineSelectors.button;
import static com.epam.pipeline.autotests.utils.PipelineSelectors.elementWithText;
@@ -93,6 +94,11 @@ public class RunsMenuAO implements AccessObject<RunsMenuAO> {
public LogAO showLog(String runId) {
sleep(1, SECONDS);
show(runId);
+ sleep(3, SECONDS);
+ if (new LogAO().get(STATUS).exists()) {
+ return new LogAO();
+ }
+ show(runId);
return new LogAO();
}
