chore(test): re-enable Firefox testing on CI (#5608)

This commit is contained in:
Jack Franklin 2020-04-08 11:18:29 +01:00 committed by GitHub
parent 83d9d530ca
commit 262da92bbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -21,3 +21,16 @@ jobs:
- "export DISPLAY=:99.0" - "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start" - "sh -e /etc/init.d/xvfb start"
script: ./travis/chromium.sh script: ./travis/chromium.sh
- node_js: "10.19.0"
dist: trusty
env:
- FIREFOX=true
- FIREFOX_HOME=$TRAVIS_HOME/firefox-latest
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "pyenv shell 3.6 && pip3 install --user mozdownload"
- "rm -rf $FIREFOX_HOME && mozdownload -t daily -d $FIREFOX_HOME/latest.tar.bz --log-level DEBUG"
- "cd $FIREFOX_HOME; tar -xvf latest.tar.bz; cd -; ls $FIREFOX_HOME/firefox/firefox"
script:
- "BINARY=$FIREFOX_HOME/firefox/firefox npm run funit"

View File

@ -72,6 +72,8 @@ describe('Puppeteer-Web', () => {
await session.send('Target.exposeDevToolsProtocol', {targetId: pageInfo.targetId}); await session.send('Target.exposeDevToolsProtocol', {targetId: pageInfo.targetId});
await session.detach(); await session.detach();
await new Promise(resolve => setTimeout(resolve, 1000));
// Use in-page puppeteer to create a new page and navigate it to the EMPTY_PAGE // Use in-page puppeteer to create a new page and navigate it to the EMPTY_PAGE
await page.evaluate(async serverConfig => { await page.evaluate(async serverConfig => {
const puppeteer = require('puppeteer'); const puppeteer = require('puppeteer');