test: update expectation on windows for "should reject if launched br… (#27603)

…owser fails immediately"

The test has been failing on Windows since
f212fd1a8318345147c7357ced36db21acd477a0
This commit is contained in:
Yury Semikhatsky 2023-10-13 14:02:55 -07:00 committed by GitHub
parent 6400e5c564
commit d6adfee7c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,12 +59,12 @@ it('should throw if page argument is passed', async ({ browserType, browserName
expect(waitError.message).toContain('can not specify page'); expect(waitError.message).toContain('can not specify page');
}); });
it('should reject if launched browser fails immediately', async ({ mode, browserType, asset }) => { it('should reject if launched browser fails immediately', async ({ mode, browserType, asset, isWindows }) => {
it.skip(mode.startsWith('service')); it.skip(mode.startsWith('service'));
let waitError = null; let waitError = null;
await browserType.launch({ executablePath: asset('dummy_bad_browser_executable.js') }).catch(e => waitError = e); await browserType.launch({ executablePath: asset('dummy_bad_browser_executable.js') }).catch(e => waitError = e);
expect(waitError.message).toContain('Browser logs:'); expect(waitError.message).toContain(isWindows ? 'browserType.launch: spawn UNKNOWN' : 'Browser logs:');
}); });
it('should reject if executable path is invalid', async ({ browserType, mode }) => { it('should reject if executable path is invalid', async ({ browserType, mode }) => {