taiko icon indicating copy to clipboard operation
taiko copied to clipboard

waitFor(duration) should ignore global timeout

Open taitems opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. If I want to await waitFor(300e3) to wait for 5 minutes, I hit the global timeout first and the test ends

Describe the solution you'd like I'm not 100% on the solution, but perhaps really long wait times should not be bound to a global timeout, or should at least have an option to override the global for this invocation?

Describe alternatives you've considered I'm about to try something like:

step("I wait for <seconds> seconds", async function (seconds) {

+  // Set timeout really high
+  setConfig( { navigationTimeout: 999999});

  await waitFor(parseInt(seconds, 10) * 1000);

+  // Reset timeout for remaining steps 
+ setConfig( { navigationTimeout: 3000});

});

taitems avatar Dec 13 '21 01:12 taitems

The global timeout in taiko should get overwritten by the one given at api level.. if the timeout you are facing is from Gauge please try updating the config in env/default/js.properties for step timeout.

NivedhaSenthil avatar Dec 13 '21 03:12 NivedhaSenthil

The global timeout in taiko should get overwritten by the one given at api level.

Sorry, does API level mean as part of calling the waitFor or are you saying I need to explicitly override it?

taitems avatar Dec 13 '21 03:12 taitems

I meant calling from waitFor here

NivedhaSenthil avatar Dec 13 '21 03:12 NivedhaSenthil