Add test to cover search multiple times
This commit is contained in:
@@ -15,7 +15,7 @@ const width = 800;
|
|||||||
const height = 600;
|
const height = 600;
|
||||||
|
|
||||||
describe('Search Tests', function (): void {
|
describe('Search Tests', function (): void {
|
||||||
this.timeout(200000);
|
this.timeout(20000);
|
||||||
|
|
||||||
before(async function (): Promise<any> {
|
before(async function (): Promise<any> {
|
||||||
browser = await puppeteer.launch({
|
browser = await puppeteer.launch({
|
||||||
@@ -98,6 +98,14 @@ describe('Search Tests', function (): void {
|
|||||||
await page.evaluate(`window.search.findNext('[A-Z]+', {regex: true, caseSensitive: true})`);
|
await page.evaluate(`window.search.findNext('[A-Z]+', {regex: true, caseSensitive: true})`);
|
||||||
assert.deepEqual(await page.evaluate(`window.term.getSelection()`), 'ABCD');
|
assert.deepEqual(await page.evaluate(`window.term.getSelection()`), 'ABCD');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('Search for single result twice should not unselect it', async () => {
|
||||||
|
await writeSync('abc def');
|
||||||
|
assert.deepEqual(await page.evaluate(`window.search.findNext('abc')`), true);
|
||||||
|
assert.deepEqual(await page.evaluate(`window.term.getSelection()`), 'abc');
|
||||||
|
assert.deepEqual(await page.evaluate(`window.search.findNext('abc')`), true);
|
||||||
|
assert.deepEqual(await page.evaluate(`window.term.getSelection()`), 'abc');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
async function openTerminal(options: ITerminalOptions = {}): Promise<void> {
|
async function openTerminal(options: ITerminalOptions = {}): Promise<void> {
|
||||||
|
|||||||
Reference in New Issue
Block a user