mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user