title: How to increase Navigation Timeout when running Puppeteer tests with Jest
body: <p>I have a small suite of tests based on Puppeteer with Jest, and I can't get rid of the following problem: when I am running a single specific test (ex: <code>yarn test myscenario.test.js</code>) everything works just fine; the problem occurs when I am running the entire test suite (about 20 tests) using <code>yarn test</code> command, some of my tests are failing with following error:</p>
  
  <blockquote>
    <p>Navigation Timeout Exceeded: 30000ms exceeded
    at Promise.then (node_modules/puppeteer/lib/NavigatorWatcher.js:73:21)</p>
  </blockquote>
  
  <p>The thing is that all my tests already have a specific timeout already set (99999 ms !!) and a single test is executed in about 6-7 seconds. My guess is that when the entire test suite is running, there is a global navigation timeout which  exceeds the limits of 30000ms.</p>
  
  <p>Is there any way to override this global Navigation Timeout limit?</p>
  
  <p>Here is how one of my tests (<code>myscenario.test.js</code>) looks like (which iterates through a JSON file and navigates to various URLs where executes some simple actions):</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const puppeteer = require('puppeteer')
  const propertiesReader = require('properties-reader')
  const jsonReader = require("fs")
  const prop = propertiesReader('./resources/config.ini')
  const tealiumTags = JSON.parse(jsonReader.readFileSync('./resources/tealium-tags.json', 'utf8'))
  
  let browser
  let page
  
  beforeEach (async () =&gt; {
      browser = await puppeteer.launch({headless: true, args: ['--start-maximized']});
      page = await browser.newPage();
      await page.setViewport({ width: 1920, height: 1080 })
    })
  
  afterEach (() =&gt; {
      browser.close()
    })
  
  describe('Decline all Tealium tags', () =&gt; {
   
      for (let brand in tealiumTags) {
        if (tealiumTags.hasOwnProperty(brand)) {
          
          let brandUrl = tealiumTags[brand].url
  
          test('Decline all Tealium tags for ' + brandUrl, async () =&gt; {
            
            console.log("---------------------------------------")
            console.log("Decline all Tealium tags for " + brandUrl)
            await page.goto("https://www." + brandUrl, { waitUntil: 'domcontentloaded' })
            await page.waitForSelector(prop.get('DECLINE_COOKIES_BUTTON'))
            await page.click(prop.get('DECLINE_COOKIES_BUTTON'))    
            await page.waitForNavigation({waitUntil: 'domcontentloaded'})
  
            let utag = await page.evaluate(() =&gt; window.utag["send"])
  
            expect(Object.keys(utag).length).toEqual(0)
  
          }, 99999)
        }
      }
  })</code></pre>
  </div>
  </div>
  </p>
  
  <p>Any hint on this matter would be much appreciated, thanks!</p>