From 7128c7bff87ad51c879df244f2b91d7aa06db3a7 Mon Sep 17 00:00:00 2001 From: Kristof Mattei Date: Wed, 25 Mar 2020 09:33:20 -0700 Subject: [PATCH] Wait between retries when launching stories tab (#218) --- packages/target-chrome-core/src/create-chrome-target.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/target-chrome-core/src/create-chrome-target.js b/packages/target-chrome-core/src/create-chrome-target.js index ca0dc01b..d1ea070a 100644 --- a/packages/target-chrome-core/src/create-chrome-target.js +++ b/packages/target-chrome-core/src/create-chrome-target.js @@ -18,6 +18,7 @@ const { } = require('@loki/core'); const presets = require('./presets.json'); +const RETRY_LOADING_STORIES_TIMEOUT = 10000; const LOADING_STORIES_TIMEOUT = 60000; const CAPTURING_SCREENSHOT_TIMEOUT = 30000; const CAPTURING_SCREENSHOT_RETRY_BACKOFF = 500; @@ -262,7 +263,7 @@ function createChromeTarget( )}&selectedStory=${encodeURIComponent(story)}`; const launchStoriesTab = withTimeout(LOADING_STORIES_TIMEOUT)( - withRetries(2)(async url => { + withRetries(5, RETRY_LOADING_STORIES_TIMEOUT)(async url => { const tab = await launchNewTab({ width: 100, height: 100,