mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Adopt playwright breaking changes
This commit is contained in:
@@ -20,8 +20,8 @@ describe('AttachAddon', () => {
|
||||
headless: process.argv.indexOf('--headless') !== -1,
|
||||
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
||||
});
|
||||
page = (await browser.defaultContext().pages())[0];
|
||||
await page.setViewport({ width, height });
|
||||
page = await (await browser.newContext()).newPage();
|
||||
await page.setViewportSize({ width, height });
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
|
||||
@@ -22,8 +22,8 @@ describe('FitAddon', () => {
|
||||
headless: process.argv.indexOf('--headless') !== -1,
|
||||
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
||||
});
|
||||
page = (await browser.defaultContext().pages())[0];
|
||||
await page.setViewport({ width, height });
|
||||
page = await (await browser.newContext()).newPage();
|
||||
await page.setViewportSize({ width, height });
|
||||
await page.goto(APP);
|
||||
await openTerminal(page);
|
||||
// This is used to do conditional assertions since cell height is 1 pixel higher with the
|
||||
|
||||
@@ -22,8 +22,8 @@ describe('Search Tests', function(): void {
|
||||
headless: process.argv.indexOf('--headless') !== -1,
|
||||
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
||||
});
|
||||
page = (await browser.defaultContext().pages())[0];
|
||||
await page.setViewport({ width, height });
|
||||
page = await (await browser.newContext()).newPage();
|
||||
await page.setViewportSize({ width, height });
|
||||
await page.goto(APP);
|
||||
await openTerminal(page);
|
||||
await page.evaluate(`window.search = new SearchAddon();`);
|
||||
|
||||
@@ -20,8 +20,8 @@ describe('SerializeAddon', () => {
|
||||
headless: process.argv.indexOf('--headless') !== -1,
|
||||
args: [`--window-size=${width},${height}`]
|
||||
});
|
||||
page = (await browser.defaultContext().pages())[0];
|
||||
await page.setViewport({ width, height });
|
||||
page = await (await browser.newContext()).newPage();
|
||||
await page.setViewportSize({ width, height });
|
||||
await page.goto(APP);
|
||||
await openTerminal(page, { rows: 10, cols: 10, rendererType: 'dom' });
|
||||
await page.evaluate(`
|
||||
|
||||
@@ -20,8 +20,8 @@ describe('Unicode11Addon', () => {
|
||||
headless: process.argv.indexOf('--headless') !== -1,
|
||||
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
||||
});
|
||||
page = (await browser.defaultContext().pages())[0];
|
||||
await page.setViewport({ width, height });
|
||||
page = await (await browser.newContext()).newPage();
|
||||
await page.setViewportSize({ width, height });
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
|
||||
@@ -20,8 +20,8 @@ describe('WebLinksAddon', () => {
|
||||
headless: process.argv.indexOf('--headless') !== -1,
|
||||
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
||||
});
|
||||
page = (await browser.defaultContext().pages())[0];
|
||||
await page.setViewport({ width, height });
|
||||
page = await (await browser.newContext()).newPage();
|
||||
await page.setViewportSize({ width, height });
|
||||
});
|
||||
|
||||
after(async () => await browser.close());
|
||||
|
||||
@@ -902,8 +902,8 @@ async function setupBrowser(options: ITerminalOptions = { rendererType: 'dom' })
|
||||
headless: process.argv.indexOf('--headless') !== -1,
|
||||
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
||||
});
|
||||
page = (await browser.defaultContext().pages())[0];
|
||||
await page.setViewport({ width, height });
|
||||
page = await (await browser.newContext()).newPage();
|
||||
await page.setViewportSize({ width, height });
|
||||
await page.goto(APP);
|
||||
await openTerminal(page, options);
|
||||
await page.evaluate(`
|
||||
|
||||
@@ -19,8 +19,8 @@ describe('CharWidth Integration Tests', function(): void {
|
||||
headless: process.argv.indexOf('--headless') !== -1,
|
||||
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
||||
});
|
||||
page = (await browser.defaultContext().pages())[0];
|
||||
await page.setViewport({ width, height });
|
||||
page = await (await browser.newContext()).newPage();
|
||||
await page.setViewportSize({ width, height });
|
||||
await page.goto(APP);
|
||||
await openTerminal(page, { rows: 5, cols: 30 });
|
||||
});
|
||||
|
||||
@@ -25,8 +25,8 @@ describe('InputHandler Integration Tests', function(): void {
|
||||
headless: process.argv.indexOf('--headless') !== -1,
|
||||
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
||||
});
|
||||
page = (await browser.defaultContext().pages())[0];
|
||||
await page.setViewport({ width, height });
|
||||
page = await (await browser.newContext()).newPage();
|
||||
await page.setViewportSize({ width, height });
|
||||
await page.goto(APP);
|
||||
await openTerminal(page);
|
||||
});
|
||||
|
||||
@@ -214,8 +214,8 @@ describe('Mouse Tracking Tests', () => {
|
||||
headless: process.argv.indexOf('--headless') !== -1,
|
||||
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
||||
});
|
||||
page = (await browser.defaultContext().pages())[0];
|
||||
await page.setViewport({ width, height });
|
||||
page = await (await browser.newContext()).newPage();
|
||||
await page.setViewportSize({ width, height });
|
||||
});
|
||||
|
||||
after(async () => browser.close());
|
||||
|
||||
@@ -20,8 +20,8 @@ describe('Parser Integration Tests', function(): void {
|
||||
headless: process.argv.indexOf('--headless') !== -1,
|
||||
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
||||
});
|
||||
page = (await browser.defaultContext().pages())[0];
|
||||
await page.setViewport({ width, height });
|
||||
page = await (await browser.newContext()).newPage();
|
||||
await page.setViewportSize({ width, height });
|
||||
await page.goto(APP);
|
||||
await openTerminal(page);
|
||||
});
|
||||
|
||||
@@ -20,8 +20,8 @@ describe('API Integration Tests', function(): void {
|
||||
headless: process.argv.indexOf('--headless') !== -1,
|
||||
args: [`--window-size=${width},${height}`, `--no-sandbox`]
|
||||
});
|
||||
page = (await browser.defaultContext().pages())[0];
|
||||
await page.setViewport({ width, height });
|
||||
page = await (await browser.newContext()).newPage();
|
||||
await page.setViewportSize({ width, height });
|
||||
});
|
||||
|
||||
after(async () => browser.close());
|
||||
|
||||
Reference in New Issue
Block a user