diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/GWTUtils.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/GWTUtils.java index 7f096cfc45eb44bd5658d27a91a208c36986e83c..6cac23901f659468cb2193a14722e91613cfde39 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/GWTUtils.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/util/GWTUtils.java @@ -118,11 +118,19 @@ public final class GWTUtils } /** - * Deferrs a task allowing browser to handle events. + * Defers a task allowing browser to handle events. */ public static void executeDelayed(final IDelegatedAction delegatedAction) { - DeferredCommand.addCommand(delegatedAction); + // In testing mode the action has to be performed without delay - otherwise system tests + // will perform new commands before the deferred action starts. + if (isTesting() == false) + { + DeferredCommand.addCommand(delegatedAction); + } else + { + delegatedAction.execute(); + } } /**