import * as path from 'path'; import * as assert from 'assert'; import TestServer from './lib/TestServer'; import eventually from './eventually'; import { Builder, Lanthan } from 'lanthan'; import { WebDriver, Key } from 'selenium-webdriver'; import Page from './lib/Page'; const newApp = () => { const server = new TestServer(); server.receiveContent('/', ` hello `); server.receiveContent('/follow-input', ` `); server.receiveContent('/area', ` `); /* * test case: link2 is out of the viewport * +-----------------+ * | [link1] |<--- window * | | * |=================|<--- viewport * | [link2] | * | | * +-----------------+ */ server.receiveContent('/test1', `
link1
link2
`); /* * test case 2: link2 and link3 are out of window of the frame * +-----------------+ * | +-----------+ | * | | [link1] | | * |=================| * | | [link2] | | * | +-----------+ | * | | * +-----------------+ */ server.receiveContent('/test2', `