chore(ci): re-enable tests on Windows (#5637)

* chore: Add Windows to Travis

This commit runs the unit tests on Windows.

There are two tests failing on Windows that we skip.

I spoke to Mathias B and we agreed to
defer debugging this for now in favour of getting tests running on
Windows. But we didn't want to ignore it forever, hence giving the test
a date at which it will start to fail.
This commit is contained in:
Jack Franklin
2020-04-17 14:27:50 +01:00
committed by GitHub
parent 49ca00f16a
commit c4fe4e46c2
6 changed files with 94 additions and 33 deletions

View File

@@ -353,6 +353,7 @@ describe('Launcher specs', function() {
await browser.close();
});
});
describe('Puppeteer.launch', function() {
let productName;
@@ -367,21 +368,28 @@ describe('Launcher specs', function() {
puppeteer._productName = productName;
});
it('should be able to launch different products', async() => {
it('should be able to launch Chrome', async() => {
const {puppeteer} = getTestState();
const browser = await puppeteer.launch({product: 'chrome'});
const userAgent = await browser.userAgent();
await browser.close();
expect(userAgent).toContain('Chrome');
});
const products = ['firefox', 'chrome'];
for (const product of products) {
const browser = await puppeteer.launch({product});
const userAgent = await browser.userAgent();
await browser.close();
if (product === 'chrome')
expect(userAgent).toContain('Chrome');
else
expect(userAgent).toContain('Firefox');
}
/* We think there's a bug in the FF Windows launcher, or some
* combo of that plus it running on CI, but we're deferring fixing
* this so we can get Windows CI stable and then dig into this
* properly with help from the Mozilla folks.
*/
itFailsWindowsUntilDate(new Date('2020-06-01'), 'should be able to launch Firefox', async() => {
const {puppeteer} = getTestState();
const browser = await puppeteer.launch({product: 'firefox'});
const userAgent = await browser.userAgent();
await browser.close();
expect(userAgent).toContain('Firefox');
});
});
describe('Puppeteer.connect', function() {
it('should be able to connect multiple times to the same browser', async() => {
const { puppeteer, defaultBrowserOptions} = getTestState();