Change browserType back to sync

This commit is contained in:
Daniel Imms
2020-02-15 05:51:39 -08:00
parent cb1353c898
commit 477b161ba2
13 changed files with 14 additions and 16 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ const height = 600;
describe('CharWidth Integration Tests', function(): void {
before(async function(): Promise<any> {
const browserType = await getBrowserType();
const browserType = getBrowserType();
browser = await browserType.launch({
headless: process.argv.indexOf('--headless') !== -1,
args: [`--window-size=${width},${height}`, `--no-sandbox`]
+1 -1
View File
@@ -19,7 +19,7 @@ let isChromium = false;
describe('InputHandler Integration Tests', function(): void {
before(async function(): Promise<any> {
const browserType = await getBrowserType();
const browserType = getBrowserType();
isChromium = browserType.name() === 'chromium';
browser = await browserType.launch({
headless: process.argv.indexOf('--headless') !== -1,
+1 -1
View File
@@ -208,7 +208,7 @@ function parseReport(encoding: string, msg: number[]): { state: any; row: number
* Mouse tracking tests.
*/
describe('Mouse Tracking Tests', async () => {
const browserType = await getBrowserType();
const browserType = getBrowserType();
browserType.name() === 'chromium';
const itMouse = isChromium ? it : it.skip;
+1 -1
View File
@@ -16,7 +16,7 @@ const height = 600;
describe('Parser Integration Tests', function(): void {
before(async function(): Promise<any> {
const browserType = await getBrowserType();
const browserType = getBrowserType();
browser = await browserType.launch({
headless: process.argv.indexOf('--headless') !== -1,
args: [`--window-size=${width},${height}`, `--no-sandbox`]
+1 -1
View File
@@ -16,7 +16,7 @@ const height = 600;
describe('API Integration Tests', function(): void {
before(async () => {
const browserType = await getBrowserType();
const browserType = getBrowserType();
browser = await browserType.launch({
headless: process.argv.indexOf('--headless') !== -1,
args: [`--window-size=${width},${height}`, `--no-sandbox`]
+1 -3
View File
@@ -41,7 +41,7 @@ export async function openTerminal(page: playwright.Page, options: ITerminalOpti
}
}
export async function getBrowserType(): Promise<playwright.BrowserType> {
export function getBrowserType(): playwright.BrowserType {
// Default to chromium
let browserType: playwright.BrowserType = playwright['chromium'];
@@ -53,7 +53,5 @@ export async function getBrowserType(): Promise<playwright.BrowserType> {
}
}
await browserType.downloadBrowserIfNeeded();
return browserType;
}