Add new fit addon
This commit is contained in:
@@ -15,7 +15,7 @@ let page: puppeteer.Page;
|
||||
const width = 800;
|
||||
const height = 600;
|
||||
|
||||
describe.only('API Integration Tests', () => {
|
||||
describe('API Integration Tests', () => {
|
||||
before(async function(): Promise<any> {
|
||||
this.timeout(10000);
|
||||
browser = await puppeteer.launch({
|
||||
@@ -60,27 +60,6 @@ describe.only('API Integration Tests', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// async function testHostName(hostname: string): Promise<void> {
|
||||
// await openTerminal({ rendererType: 'dom' });
|
||||
// await page.evaluate(`window.term.loadAddon(new window.WebLinksAddon())`);
|
||||
// await page.evaluate(`
|
||||
// window.term.writeln(' http://${hostname} ');
|
||||
// window.term.writeln(' http://${hostname}/a~b#c~d?e~f ');
|
||||
// window.term.writeln(' http://${hostname}/colon:test ');
|
||||
// window.term.writeln(' http://${hostname}/colon:test: ');
|
||||
// window.term.writeln('"http://${hostname}/"');
|
||||
// window.term.writeln('\\'http://${hostname}/\\'');
|
||||
// window.term.writeln('http://${hostname}/subpath/+/id');
|
||||
// `);
|
||||
// assert.equal(await getLinkAtCell(3, 1), `http://${hostname}`);
|
||||
// assert.equal(await getLinkAtCell(3, 2), `http://${hostname}/a~b#c~d?e~f`);
|
||||
// assert.equal(await getLinkAtCell(3, 3), `http://${hostname}/colon:test`);
|
||||
// assert.equal(await getLinkAtCell(3, 4), `http://${hostname}/colon:test`);
|
||||
// assert.equal(await getLinkAtCell(2, 5), `http://${hostname}/`);
|
||||
// assert.equal(await getLinkAtCell(2, 6), `http://${hostname}/`);
|
||||
// assert.equal(await getLinkAtCell(1, 7), `http://${hostname}/subpath/+/id`);
|
||||
// }
|
||||
|
||||
async function openTerminal(options: ITerminalOptions = {}): Promise<void> {
|
||||
await page.evaluate(`window.term = new Terminal(${JSON.stringify(options)})`);
|
||||
await page.evaluate(`window.term.open(document.querySelector('#terminal-container'))`);
|
||||
@@ -90,9 +69,3 @@ async function openTerminal(options: ITerminalOptions = {}): Promise<void> {
|
||||
await page.waitForSelector('.xterm-text-layer');
|
||||
}
|
||||
}
|
||||
|
||||
// async function getLinkAtCell(col: number, row: number): Promise<string> {
|
||||
// const rowSelector = `.xterm-rows > :nth-child(${row})`;
|
||||
// await page.hover(`${rowSelector} > :nth-child(${col})`);
|
||||
// return await page.evaluate(`Array.prototype.reduce.call(document.querySelectorAll('${rowSelector} > span[style]'), (a, b) => a + b.textContent, '');`);
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user