mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Change browserType back to sync
This commit is contained in:
@@ -16,7 +16,7 @@ const height = 600;
|
||||
|
||||
describe('AttachAddon', () => {
|
||||
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`]
|
||||
|
||||
@@ -18,7 +18,7 @@ let isFirefox = false;
|
||||
|
||||
describe('FitAddon', () => {
|
||||
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`]
|
||||
|
||||
@@ -18,7 +18,7 @@ const height = 600;
|
||||
|
||||
describe('Search 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`]
|
||||
|
||||
@@ -16,7 +16,7 @@ const height = 600;
|
||||
|
||||
describe('SerializeAddon', () => {
|
||||
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}`]
|
||||
|
||||
@@ -16,7 +16,7 @@ const height = 600;
|
||||
|
||||
describe('Unicode11Addon', () => {
|
||||
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`]
|
||||
|
||||
@@ -16,7 +16,7 @@ const height = 600;
|
||||
|
||||
describe('WebLinksAddon', () => {
|
||||
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`]
|
||||
|
||||
@@ -19,7 +19,7 @@ const height = 600;
|
||||
let itWebgl: (expectation: string, callback?: (this: Mocha.ITestCallbackContext, done: MochaDone) => any) => Mocha.ITest | void;
|
||||
|
||||
describe('WebGL Renderer Integration Tests', async () => {
|
||||
const browserType = await getBrowserType();
|
||||
const browserType = getBrowserType();
|
||||
const isHeadless = process.argv.indexOf('--headless') !== -1;
|
||||
// Firefox works only in non-headless mode https://github.com/microsoft/playwright/issues/1032
|
||||
const areTestsEnabled = browserType.name() === 'chromium' || (browserType.name() === 'firefox' && !isHeadless);
|
||||
@@ -898,7 +898,7 @@ async function getCellColor(col: number, row: number): Promise<number[]> {
|
||||
}
|
||||
|
||||
async function setupBrowser(options: ITerminalOptions = { rendererType: 'dom' }): Promise<void> {
|
||||
const browserType = await getBrowserType();
|
||||
const browserType = getBrowserType();
|
||||
browser = await browserType.launch({
|
||||
headless: process.argv.indexOf('--headless') !== -1,
|
||||
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
||||
|
||||
@@ -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`]
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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`]
|
||||
|
||||
@@ -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`]
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user