diff --git a/e2e/blacklist.test.ts b/e2e/blacklist.test.ts index 8bf1bd8..dec9d99 100644 --- a/e2e/blacklist.test.ts +++ b/e2e/blacklist.test.ts @@ -5,10 +5,12 @@ import TestServer from './lib/TestServer'; import { Builder, Lanthan } from 'lanthan'; import { WebDriver } from 'selenium-webdriver'; import Page from './lib/Page'; +import SettingRepository from "./lib/SettingRepository"; +import Settings from "../src/shared/settings/Settings"; describe("blacklist test", () => { let server = new TestServer().receiveContent('/*', - ``, + ``, ); let lanthan: Lanthan; let webdriver: WebDriver; @@ -24,17 +26,12 @@ describe("blacklist test", () => { await server.start(); let url = server.url('/a').replace('http://', ''); - await browser.storage.local.set({ - settings: { - source: 'json', - json: `{ - "keymaps": { - "j": { "type": "scroll.vertically", "count": 1 } - }, - "blacklist": [ "${url}" ] - }`, + await new SettingRepository(browser).saveJSON(Settings.fromJSON({ + keymaps: { + j: { type: "scroll.vertically", count: 1 }, }, - }); + blacklist: [ url ], + })); }); after(async() => { @@ -46,7 +43,7 @@ describe("blacklist test", () => { it('should disable add-on if the URL is in the blacklist', async () => { let page = await Page.navigateTo(webdriver, server.url('/a')); - await page.sendKeys('j') + await page.sendKeys('j'); let scrollY = await page.getScrollY(); assert.strictEqual(scrollY, 0); diff --git a/e2e/clipboard.test.ts b/e2e/clipboard.test.ts index 2b71ade..3f2b289 100644 --- a/e2e/clipboard.test.ts +++ b/e2e/clipboard.test.ts @@ -4,10 +4,11 @@ import * as path from 'path'; import TestServer from './lib/TestServer'; import eventually from './eventually'; import * as clipboard from './lib/clipboard'; -import settings from './settings'; import { Builder, Lanthan } from 'lanthan'; import { WebDriver, Key } from 'selenium-webdriver'; import Page from './lib/Page'; +import SettingRepository from "./lib/SettingRepository"; +import Settings from "../src/shared/settings/Settings"; describe("clipboard test", () => { let server = new TestServer(12321).receiveContent('/happy', 'ok'); @@ -23,9 +24,14 @@ describe("clipboard test", () => { webdriver = lanthan.getWebDriver(); browser = lanthan.getWebExtBrowser(); - await browser.storage.local.set({ - settings, - }); + await new SettingRepository(browser).saveJSON(Settings.fromJSON({ + search: { + default: "google", + engines: { + "google": "http://127.0.0.1:12321/google?q={}", + }, + }, + })); await server.start(); }); @@ -42,7 +48,7 @@ describe("clipboard test", () => { for (let tab of tabs.slice(1)) { await browser.tabs.remove(tab.id); } - }) + }); it('should copy current URL by y', async () => { let page = await Page.navigateTo(webdriver, server.url('/#should_copy_url')); diff --git a/e2e/command_addbookmark.test.ts b/e2e/command_addbookmark.test.ts index bcc75ac..5344292 100644 --- a/e2e/command_addbookmark.test.ts +++ b/e2e/command_addbookmark.test.ts @@ -10,7 +10,7 @@ import Page from './lib/Page'; describe('addbookmark command test', () => { let server = new TestServer().receiveContent('/happy', ` - how to be happy`, + how to be happy`, ); let lanthan: Lanthan; let webdriver: WebDriver; diff --git a/e2e/command_bdelete.test.ts b/e2e/command_bdelete.test.ts index c96034d..239074e 100644 --- a/e2e/command_bdelete.test.ts +++ b/e2e/command_bdelete.test.ts @@ -36,10 +36,10 @@ describe('bdelete/bdeletes command test', () => { await browser.tabs.remove(tab.id); } await browser.tabs.update(tabs[0].id, { url: server.url('/site1'), pinned: true }); - await browser.tabs.create({ url: server.url('/site2'), pinned: true }) - await browser.tabs.create({ url: server.url('/site3'), pinned: true }) - await browser.tabs.create({ url: server.url('/site4'), }) - await browser.tabs.create({ url: server.url('/site5'), }) + await browser.tabs.create({ url: server.url('/site2'), pinned: true }); + await browser.tabs.create({ url: server.url('/site3'), pinned: true }); + await browser.tabs.create({ url: server.url('/site4'), }); + await browser.tabs.create({ url: server.url('/site5'), }); await eventually(async() => { let handles = await webdriver.getAllWindowHandles(); diff --git a/e2e/command_buffer.test.ts b/e2e/command_buffer.test.ts index 0036839..472502b 100644 --- a/e2e/command_buffer.test.ts +++ b/e2e/command_buffer.test.ts @@ -16,7 +16,7 @@ describe('buffer command test', () => { my_${req.path.slice(1)} - `); + `); }); let lanthan: Lanthan; let webdriver: WebDriver; diff --git a/e2e/command_help.test.ts b/e2e/command_help.test.ts index 9269d49..20035fd 100644 --- a/e2e/command_help.test.ts +++ b/e2e/command_help.test.ts @@ -34,7 +34,7 @@ describe("help command test", () => { beforeEach(async() => { page = await Page.navigateTo(webdriver, server.url()); - }) + }); it('should open help page by help command ', async() => { let console = await page.showConsole(); diff --git a/e2e/command_open.test.ts b/e2e/command_open.test.ts index 6fb2645..ba9c51e 100644 --- a/e2e/command_open.test.ts +++ b/e2e/command_open.test.ts @@ -2,14 +2,15 @@ import * as path from 'path'; import * as assert from 'assert'; import TestServer from './lib/TestServer'; -import settings from './settings'; import eventually from './eventually'; import { Builder, Lanthan } from 'lanthan'; import { WebDriver } from 'selenium-webdriver'; import Page from './lib/Page'; +import SettingRepository from "./lib/SettingRepository"; +import Settings from "../src/shared/settings/Settings"; describe("open command test", () => { - let server = new TestServer(12321) + let server = new TestServer() .receiveContent('/google', 'google') .receiveContent('/yahoo', 'yahoo'); let lanthan: Lanthan; @@ -25,11 +26,16 @@ describe("open command test", () => { webdriver = lanthan.getWebDriver(); browser = lanthan.getWebExtBrowser(); - await browser.storage.local.set({ - settings, - }); - await server.start(); + await new SettingRepository(browser).saveJSON(Settings.fromJSON({ + search: { + default: "google", + engines: { + "google": server.url('/google?q={}'), + "yahoo": server.url('/yahoo?q={}'), + }, + }, + })); }); after(async() => { @@ -42,7 +48,7 @@ describe("open command test", () => { beforeEach(async() => { await webdriver.switchTo().defaultContent(); page = await Page.navigateTo(webdriver, server.url()); - }) + }); it('should open default search for keywords by open command ', async() => { let console = await page.showConsole(); @@ -60,7 +66,7 @@ describe("open command test", () => { await console.execCommand('open yahoo an apple'); await eventually(async() => { - let tabs = await browser.tabs.query({ active: true }) + let tabs = await browser.tabs.query({ active: true }); let url = new URL(tabs[0].url); assert.strictEqual(url.href, server.url('/yahoo?q=an%20apple')) }); @@ -71,7 +77,7 @@ describe("open command test", () => { await console.execCommand('open'); await eventually(async() => { - let tabs = await browser.tabs.query({ active: true }) + let tabs = await browser.tabs.query({ active: true }); let url = new URL(tabs[0].url); assert.strictEqual(url.href, server.url('/google?q=')) }); @@ -82,7 +88,7 @@ describe("open command test", () => { await console.execCommand('open yahoo'); await eventually(async() => { - let tabs = await browser.tabs.query({ active: true }) + let tabs = await browser.tabs.query({ active: true }); let url = new URL(tabs[0].url); assert.strictEqual(url.href, server.url('/yahoo?q=')) }); @@ -93,7 +99,7 @@ describe("open command test", () => { await console.execCommand('open example.com'); await eventually(async() => { - let tabs = await browser.tabs.query({ active: true }) + let tabs = await browser.tabs.query({ active: true }); let url = new URL(tabs[0].url); assert.strictEqual(url.href, 'http://example.com/') }); @@ -104,7 +110,7 @@ describe("open command test", () => { await console.execCommand('open https://example.com/'); await eventually(async() => { - let tabs = await browser.tabs.query({ active: true }) + let tabs = await browser.tabs.query({ active: true }); let url = new URL(tabs[0].url); assert.strictEqual(url.href, 'https://example.com/') }); diff --git a/e2e/command_tabopen.test.ts b/e2e/command_tabopen.test.ts index 9d3da9a..b5533e6 100644 --- a/e2e/command_tabopen.test.ts +++ b/e2e/command_tabopen.test.ts @@ -2,14 +2,15 @@ import * as path from 'path'; import * as assert from 'assert'; import TestServer from './lib/TestServer'; -import settings from './settings'; import eventually from './eventually'; import { Builder, Lanthan } from 'lanthan'; import { WebDriver } from 'selenium-webdriver'; import Page from './lib/Page'; +import SettingRepository from "./lib/SettingRepository"; +import Settings from "../src/shared/settings/Settings"; describe("tabopen command test", () => { - let server = new TestServer(12321) + let server = new TestServer() .receiveContent('/google', 'google') .receiveContent('/yahoo', 'yahoo'); let lanthan: Lanthan; @@ -25,11 +26,16 @@ describe("tabopen command test", () => { webdriver = lanthan.getWebDriver(); browser = lanthan.getWebExtBrowser(); - await browser.storage.local.set({ - settings, - }); - await server.start(); + await new SettingRepository(browser).saveJSON(Settings.fromJSON({ + search: { + default: "google", + engines: { + "google": server.url('/google?q={}'), + "yahoo": server.url('/yahoo?q={}'), + }, + }, + })); }); after(async() => { @@ -46,7 +52,7 @@ describe("tabopen command test", () => { } page = await Page.navigateTo(webdriver, server.url()); - }) + }); it('should open default search for keywords by tabopen command ', async() => { let console = await page.showConsole(); diff --git a/e2e/command_winopen.test.ts b/e2e/command_winopen.test.ts index 95a0b6a..fb1348d 100644 --- a/e2e/command_winopen.test.ts +++ b/e2e/command_winopen.test.ts @@ -2,14 +2,15 @@ import * as path from 'path'; import * as assert from 'assert'; import TestServer from './lib/TestServer'; -import settings from './settings'; import eventually from './eventually'; import { Builder, Lanthan } from 'lanthan'; import { WebDriver } from 'selenium-webdriver'; import Page from './lib/Page'; +import SettingRepository from "./lib/SettingRepository"; +import Settings from "../src/shared/settings/Settings"; describe("winopen command test", () => { - let server = new TestServer(12321) + let server = new TestServer() .receiveContent('/google', 'google') .receiveContent('/yahoo', 'yahoo'); let lanthan: Lanthan; @@ -24,11 +25,17 @@ describe("winopen command test", () => { .build(); webdriver = lanthan.getWebDriver(); browser = lanthan.getWebExtBrowser(); - await browser.storage.local.set({ - settings, - }); await server.start(); + await new SettingRepository(browser).saveJSON(Settings.fromJSON({ + search: { + default: "google", + engines: { + "google": server.url('/google?q={}'), + "yahoo": server.url('/yahoo?q={}'), + }, + }, + })); }); after(async() => { @@ -45,7 +52,7 @@ describe("winopen command test", () => { } page = await Page.navigateTo(webdriver, server.url()); - }) + }); it('should open default search for keywords by winopen command ', async() => { let console = await page.showConsole(); diff --git a/e2e/completion.test.ts b/e2e/completion.test.ts index afa4432..e98e1c2 100644 --- a/e2e/completion.test.ts +++ b/e2e/completion.test.ts @@ -2,7 +2,6 @@ import * as path from 'path'; import * as assert from 'assert'; import eventually from './eventually'; -import settings from './settings'; import { Builder, Lanthan } from 'lanthan'; import { WebDriver, Key } from 'selenium-webdriver'; import Page from './lib/Page'; @@ -10,7 +9,6 @@ import Page from './lib/Page'; describe("general completion test", () => { let lanthan: Lanthan; let webdriver: WebDriver; - let browser: any; let page: Page; before(async() => { @@ -19,11 +17,6 @@ describe("general completion test", () => { .spyAddon(path.join(__dirname, '..')) .build(); webdriver = lanthan.getWebDriver(); - browser = lanthan.getWebExtBrowser(); - - await browser.storage.local.set({ - settings, - }); }); after(async() => { @@ -42,8 +35,8 @@ describe("general completion test", () => { let items = await console.getCompletions(); assert.strictEqual(items.length, 11); assert.deepStrictEqual(items[0], { type: 'title', text: 'Console Command' }); - assert.ok(items[1].text.startsWith('set')) - assert.ok(items[2].text.startsWith('open')) + assert.ok(items[1].text.startsWith('set')); + assert.ok(items[2].text.startsWith('open')); assert.ok(items[3].text.startsWith('tabopen')) }); @@ -54,8 +47,8 @@ describe("general completion test", () => { let items = await console.getCompletions(); assert.strictEqual(items.length, 4); assert.deepStrictEqual(items[0], { type: 'title', text: 'Console Command' }); - assert.ok(items[1].text.startsWith('buffer')) - assert.ok(items[2].text.startsWith('bdelete')) + assert.ok(items[1].text.startsWith('buffer')); + assert.ok(items[2].text.startsWith('bdelete')); assert.ok(items[3].text.startsWith('bdeletes')) }); @@ -74,14 +67,14 @@ describe("general completion test", () => { await console.sendKeys(Key.TAB); await eventually(async() => { let items = await console.getCompletions(); - assert.ok(items[1].highlight) + assert.ok(items[1].highlight); assert.strictEqual(await console.currentValue(), 'buffer'); }); await console.sendKeys(Key.TAB, Key.TAB); await eventually(async() => { let items = await console.getCompletions(); - assert.ok(items[3].highlight) + assert.ok(items[3].highlight); assert.strictEqual(await console.currentValue(), 'bdeletes'); }); @@ -93,7 +86,7 @@ describe("general completion test", () => { await console.sendKeys(Key.SHIFT, Key.TAB); await eventually(async() => { let items = await console.getCompletions(); - assert.ok(items[3].highlight) + assert.ok(items[3].highlight); assert.strictEqual(await console.currentValue(), 'bdeletes'); }); }); diff --git a/e2e/completion_buffers.test.ts b/e2e/completion_buffers.test.ts index b2d4201..b6e7de0 100644 --- a/e2e/completion_buffers.test.ts +++ b/e2e/completion_buffers.test.ts @@ -3,7 +3,6 @@ import * as path from 'path'; import { Request, Response } from 'express' import TestServer from './lib/TestServer'; -import settings from './settings'; import eventually from './eventually'; import { Builder, Lanthan } from 'lanthan'; import { WebDriver } from 'selenium-webdriver'; @@ -17,7 +16,7 @@ describe("completion on buffer/bdelete/bdeletes", () => { title_${req.path.slice(1)} - `); + `); }); let lanthan: Lanthan; let webdriver: WebDriver; @@ -32,10 +31,6 @@ describe("completion on buffer/bdelete/bdeletes", () => { webdriver = lanthan.getWebDriver(); browser = lanthan.getWebExtBrowser(); - await browser.storage.local.set({ - settings, - }); - await server.start(); }); @@ -53,7 +48,7 @@ describe("completion on buffer/bdelete/bdeletes", () => { } await browser.tabs.update(tabs[0].id, { url: server.url('/site1'), pinned: true }); - await browser.tabs.create({ url:server.url('/site2'), pinned: true }) + await browser.tabs.create({ url:server.url('/site2'), pinned: true }); for (let i = 3; i <= 5; ++i) { await browser.tabs.create({ url: server.url('/site' + i) }); } @@ -84,7 +79,7 @@ describe("completion on buffer/bdelete/bdeletes", () => { assert.ok(items[3].text.includes('%')); assert.ok(items[5].text.includes('#')); }); - }) + }); it('should filter items with URLs by keywords on "buffer" command', async() => { let console = await page.showConsole(); @@ -97,7 +92,7 @@ describe("completion on buffer/bdelete/bdeletes", () => { assert.ok(items[1].text.includes('title_site2')); assert.ok(items[1].text.includes(server.url('/site2'))); }); - }) + }); it('should filter items with titles by keywords on "buffer" command', async() => { let console = await page.showConsole(); @@ -108,7 +103,7 @@ describe("completion on buffer/bdelete/bdeletes", () => { assert.deepStrictEqual(items[0], { type: 'title', text: 'Buffers' }); assert.ok(items[1].text.startsWith('2:')); }); - }) + }); it('should show one item by number on "buffer" command', async() => { let console = await page.showConsole(); @@ -120,7 +115,7 @@ describe("completion on buffer/bdelete/bdeletes", () => { assert.deepStrictEqual(items[0], { type: 'title', text: 'Buffers' }); assert.ok(items[1].text.startsWith('2:')); }); - }) + }); it('should show unpinned tabs "bdelete" command', async() => { let console = await page.showConsole(); @@ -133,7 +128,7 @@ describe("completion on buffer/bdelete/bdeletes", () => { assert.ok(items[2].text.includes('site4')); assert.ok(items[3].text.includes('site5')); }); - }) + }); it('should show unpinned tabs "bdeletes" command', async() => { let console = await page.showConsole(); @@ -146,7 +141,7 @@ describe("completion on buffer/bdelete/bdeletes", () => { assert.ok(items[2].text.includes('site4')); assert.ok(items[3].text.includes('site5')); }); - }) + }); it('should show both pinned and unpinned tabs "bdelete!" command', async() => { let console = await page.showConsole(); @@ -161,7 +156,7 @@ describe("completion on buffer/bdelete/bdeletes", () => { assert.ok(items[4].text.includes('site4')); assert.ok(items[5].text.includes('site5')); }); - }) + }); it('should show both pinned and unpinned tabs "bdeletes!" command', async() => { let console = await page.showConsole(); @@ -176,5 +171,5 @@ describe("completion on buffer/bdelete/bdeletes", () => { assert.ok(items[4].text.includes('site4')); assert.ok(items[5].text.includes('site5')); }); - }) + }); }); diff --git a/e2e/completion_open.test.ts b/e2e/completion_open.test.ts index c957e2e..5f8bd11 100644 --- a/e2e/completion_open.test.ts +++ b/e2e/completion_open.test.ts @@ -1,12 +1,13 @@ import * as path from 'path'; import * as assert from 'assert'; +import Settings from "../src/shared/settings/Settings"; import TestServer from './lib/TestServer'; -import settings from './settings'; import eventually from './eventually'; import { Builder, Lanthan } from 'lanthan'; import { WebDriver } from 'selenium-webdriver'; import Page from './lib/Page'; +import SettingRepository from "./lib/SettingRepository"; describe("completion on open/tabopen/winopen commands", () => { let server = new TestServer().receiveContent('/*', 'ok'); @@ -25,10 +26,6 @@ describe("completion on open/tabopen/winopen commands", () => { webdriver = lanthan.getWebDriver(); browser = lanthan.getWebExtBrowser(); - await browser.storage.local.set({ - settings, - }); - // Add item into hitories await webdriver.navigate().to(('https://i-beam.org/404')); }); @@ -65,7 +62,7 @@ describe("completion on open/tabopen/winopen commands", () => { let items = completions.filter(x => x.type === 'item').map(x => x.text); assert.ok(items.every(x => x.includes('https://'))); }); - }) + }); it('should filter items with titles by keywords on "open" command', async() => { let console = await page.showConsole(); @@ -76,7 +73,7 @@ describe("completion on open/tabopen/winopen commands", () => { let items = completions.filter(x => x.type === 'item').map(x => x.text); assert.ok(items.every(x => x.toLowerCase().includes('getting'))); }); - }) + }); it('should filter items with titles by keywords on "tabopen" command', async() => { let console = await page.showConsole(); @@ -87,7 +84,7 @@ describe("completion on open/tabopen/winopen commands", () => { let items = completions.filter(x => x.type === 'item').map(x => x.text); assert.ok(items.every(x => x.includes('https://'))); }); - }) + }); it('should filter items with titles by keywords on "winopen" command', async() => { let console = await page.showConsole(); @@ -98,7 +95,7 @@ describe("completion on open/tabopen/winopen commands", () => { let items = completions.filter(x => x.type === 'item').map(x => x.text); assert.ok(items.every(x => x.includes('https://'))); }); - }) + }); it('should display only specified items in "complete" property by set command', async() => { let console = await page.showConsole(); @@ -127,24 +124,12 @@ describe("completion on open/tabopen/winopen commands", () => { let titles = completions.filter(x => x.type === 'title').map(x => x.text); assert.deepStrictEqual(titles, ['Bookmarks', 'Search Engines', 'Search Engines']) }); - }) + }); it('should display only specified items in "complete" property by setting', async() => { - await browser.storage.local.set({ settings: { - source: 'json', - json: `{ - "keymaps": { - ":": { "type": "command.show" } - }, - "search": { - "default": "google", - "engines": { "google": "https://google.com/search?q={}" } - }, - "properties": { - "complete": "sbh" - } - }`, - }}); + new SettingRepository(browser).saveJSON(Settings.fromJSON({ + properties: { complete: "sbh" }, + })); let console = await page.showConsole(); await console.inputKeys('open '); @@ -158,21 +143,9 @@ describe("completion on open/tabopen/winopen commands", () => { await console.close(); await (webdriver.switchTo() as any).parentFrame(); - await browser.storage.local.set({ settings: { - source: 'json', - json: `{ - "keymaps": { - ":": { "type": "command.show" } - }, - "search": { - "default": "google", - "engines": { "google": "https://google.com/search?q={}" } - }, - "properties": { - "complete": "bss" - } - }`, - }}); + new SettingRepository(browser).saveJSON(Settings.fromJSON({ + properties: { complete: "bss" }, + })); console = await page.showConsole(); await console.inputKeys('open '); @@ -182,5 +155,5 @@ describe("completion on open/tabopen/winopen commands", () => { let titles = completions.filter(x => x.type === 'title').map(x => x.text); assert.deepStrictEqual(titles, ['Bookmarks', 'Search Engines', 'Search Engines']) }); - }) + }); }); diff --git a/e2e/completion_set.test.ts b/e2e/completion_set.test.ts index 2a14b2c..facf991 100644 --- a/e2e/completion_set.test.ts +++ b/e2e/completion_set.test.ts @@ -1,7 +1,6 @@ import * as path from 'path'; import * as assert from 'assert'; -import settings from './settings'; import eventually from './eventually'; import { Builder, Lanthan } from 'lanthan'; import { WebDriver } from 'selenium-webdriver'; @@ -10,7 +9,6 @@ import Page from './lib/Page'; describe("completion on set commands", () => { let lanthan: Lanthan; let webdriver: WebDriver; - let browser: any; let page: Page; before(async() => { @@ -19,11 +17,6 @@ describe("completion on set commands", () => { .spyAddon(path.join(__dirname, '..')) .build(); webdriver = lanthan.getWebDriver(); - browser = lanthan.getWebExtBrowser(); - - await browser.storage.local.set({ - settings, - }); }); after(async() => { @@ -44,9 +37,9 @@ describe("completion on set commands", () => { let items = await console.getCompletions(); assert.strictEqual(items.length, 5); assert.deepStrictEqual(items[0], { type: 'title', text: 'Properties' }); - assert.ok(items[1].text.startsWith('hintchars')) - assert.ok(items[2].text.startsWith('smoothscroll')) - assert.ok(items[3].text.startsWith('nosmoothscroll')) + assert.ok(items[1].text.startsWith('hintchars')); + assert.ok(items[2].text.startsWith('smoothscroll')); + assert.ok(items[3].text.startsWith('nosmoothscroll')); assert.ok(items[4].text.startsWith('complete')) }); }); diff --git a/e2e/console.test.ts b/e2e/console.test.ts index 583580a..faaf695 100644 --- a/e2e/console.test.ts +++ b/e2e/console.test.ts @@ -7,8 +7,8 @@ import { WebDriver, Key } from 'selenium-webdriver'; import Page from './lib/Page'; describe("console test", () => { - let server = new TestServer().receiveContent('/', - `Hello, world!`, + let server = new TestServer().receiveContent('/', + `Hello, world!`, ); let lanthan: Lanthan; let webdriver: WebDriver; diff --git a/e2e/follow.test.ts b/e2e/follow.test.ts index fd741ef..ce3f565 100644 --- a/e2e/follow.test.ts +++ b/e2e/follow.test.ts @@ -14,13 +14,13 @@ const newApp = () => { hello - `); + `); server.receiveContent('/follow-input', ` - `); + `); server.receiveContent('/area', ` @@ -34,8 +34,8 @@ const newApp = () => { - `); - + `); + /* * test case: link2 is out of the viewport * +-----------------+ @@ -52,7 +52,7 @@ const newApp = () => {
link1
link2
- `); + `); /* * test case 2: link2 and link3 are out of window of the frame @@ -69,14 +69,14 @@ const newApp = () => {