| 
									
										
										
										
											2020-02-10 13:20:13 -08:00
										 |  |  | type ServerResponse = import('http').ServerResponse; | 
					
						
							|  |  |  | type IncomingMessage = import('http').IncomingMessage; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type Falsy = false|""|0|null|undefined; | 
					
						
							|  |  |  | interface Expect<T> { | 
					
						
							|  |  |  |     toBe(other: T, message?: string): void; | 
					
						
							|  |  |  |     toBeFalsy(message?: string): void; | 
					
						
							|  |  |  |     toBeTruthy(message?: string): void; | 
					
						
							|  |  |  |     toContain(other: any, message?: string): void; | 
					
						
							|  |  |  |     toEqual(other: T, message?: string): void; | 
					
						
							|  |  |  |     toBeNull(message?: string): void; | 
					
						
							|  |  |  |     toBeInstanceOf(other: Function, message?: string): void; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     toBeGreaterThan(other: number, message?: string): void; | 
					
						
							|  |  |  |     toBeGreaterThanOrEqual(other: number, message?: string): void; | 
					
						
							|  |  |  |     toBeLessThan(other: number, message?: string): void; | 
					
						
							|  |  |  |     toBeLessThanOrEqual(other: number, message?: string): void; | 
					
						
							|  |  |  |     toBeCloseTo(other: number, precision: number, message?: string): void; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-13 14:12:44 -07:00
										 |  |  |     toBeGolden(golden: {goldenPath: string, outputPath: string, goldenName: string}): void; | 
					
						
							| 
									
										
										
										
											2020-02-10 13:20:13 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     not: Expect<T>; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-02 13:47:08 -08:00
										 |  |  | type DescribeFunction = ((name: string, inner: () => void) => void) & {fail(condition: boolean): DescribeFunction}; | 
					
						
							| 
									
										
										
										
											2020-02-10 13:20:13 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-02 13:47:08 -08:00
										 |  |  | type ItFunction<STATE> = ((name: string, inner: (state: STATE) => Promise<void>) => void) & {fail(condition: boolean): ItFunction<STATE>; repeat(n: number): ItFunction<STATE>}; | 
					
						
							| 
									
										
										
										
											2020-02-10 13:20:13 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | type TestRunner<STATE> = { | 
					
						
							|  |  |  |     describe: DescribeFunction; | 
					
						
							|  |  |  |     xdescribe: DescribeFunction; | 
					
						
							|  |  |  |     fdescribe: DescribeFunction; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     it: ItFunction<STATE>; | 
					
						
							|  |  |  |     xit: ItFunction<STATE>; | 
					
						
							|  |  |  |     fit: ItFunction<STATE>; | 
					
						
							|  |  |  |     dit: ItFunction<STATE>; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-03-28 08:49:00 -07:00
										 |  |  |     beforeAll, beforeEach, afterAll, afterEach; | 
					
						
							| 
									
										
										
										
											2020-02-10 13:20:13 -08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | interface TestSetup<STATE> { | 
					
						
							|  |  |  |     testRunner: TestRunner<STATE>; | 
					
						
							|  |  |  |     product: 'Chromium'|'Firefox'|'WebKit'; | 
					
						
							|  |  |  |     FFOX: boolean; | 
					
						
							|  |  |  |     WEBKIT: boolean; | 
					
						
							|  |  |  |     CHROMIUM: boolean; | 
					
						
							|  |  |  |     MAC: boolean; | 
					
						
							|  |  |  |     LINUX: boolean; | 
					
						
							|  |  |  |     WIN: boolean; | 
					
						
							| 
									
										
										
										
											2020-05-11 09:38:09 -07:00
										 |  |  |     playwright: typeof import('../index-for-dev'); | 
					
						
							|  |  |  |     browserType: import('../index-for-dev').BrowserType<import('../index-for-dev').Browser>; | 
					
						
							| 
									
										
										
										
											2020-02-10 13:20:13 -08:00
										 |  |  |     selectors: import('../src/selectors').Selectors; | 
					
						
							|  |  |  |     expect<T>(value: T): Expect<T>; | 
					
						
							|  |  |  |     defaultBrowserOptions: import('../src/server/browserType').LaunchOptions; | 
					
						
							|  |  |  |     playwrightPath; | 
					
						
							|  |  |  |     headless: boolean; | 
					
						
							|  |  |  |     ASSETS_DIR: string; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type TestState = { | 
					
						
							|  |  |  |     server: TestServer; | 
					
						
							|  |  |  |     httpsServer: TestServer; | 
					
						
							|  |  |  |     sourceServer: TestServer; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type BrowserState = TestState & { | 
					
						
							| 
									
										
										
										
											2020-05-11 09:38:09 -07:00
										 |  |  |     browser: import('../index-for-dev').Browser; | 
					
						
							|  |  |  |     browserServer: import('../index-for-dev').BrowserServer; | 
					
						
							| 
									
										
										
										
											2020-02-10 13:20:13 -08:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type PageState = BrowserState & { | 
					
						
							| 
									
										
										
										
											2020-05-11 09:38:09 -07:00
										 |  |  |     context: import('../index-for-dev').BrowserContext; | 
					
						
							|  |  |  |     page: import('../index-for-dev').Page; | 
					
						
							| 
									
										
										
										
											2020-02-10 13:20:13 -08:00
										 |  |  | }; | 
					
						
							|  |  |  | type ChromiumPageState = PageState & { | 
					
						
							| 
									
										
										
										
											2020-05-11 09:38:09 -07:00
										 |  |  |     browser: import('../index-for-dev').ChromiumBrowser; | 
					
						
							| 
									
										
										
										
											2020-02-10 13:20:13 -08:00
										 |  |  | }; | 
					
						
							|  |  |  | type TestSuite = (setup: TestSetup<TestState>) => void; | 
					
						
							|  |  |  | type BrowserTestSuite = (setup: TestSetup<BrowserState>) => void; | 
					
						
							|  |  |  | type PageTestSuite = (setup: TestSetup<PageState>) => void; | 
					
						
							|  |  |  | type ChromiumTestSuite = (setup: TestSetup<ChromiumPageState>) => void; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | interface TestServer { | 
					
						
							|  |  |  |     enableHTTPCache(pathPrefix: string); | 
					
						
							|  |  |  |     setAuth(path: string, username: string, password: string); | 
					
						
							|  |  |  |     enableGzip(path: string); | 
					
						
							|  |  |  |     setCSP(path: string, csp: string); | 
					
						
							|  |  |  |     stop(): Promise<void>; | 
					
						
							|  |  |  |     setRoute(path: string, handler: (message: IncomingMessage, response: ServerResponse) => void); | 
					
						
							|  |  |  |     setRedirect(from: string, to: string); | 
					
						
							|  |  |  |     waitForRequest(path: string): Promise<IncomingMessage>; | 
					
						
							|  |  |  |     reset(); | 
					
						
							|  |  |  |     serveFile(request: IncomingMessage, response: ServerResponse, pathName: string); | 
					
						
							| 
									
										
										
										
											2020-02-12 16:27:45 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-10 13:20:13 -08:00
										 |  |  |     PORT: number; | 
					
						
							|  |  |  |     PREFIX: string; | 
					
						
							|  |  |  |     CROSS_PROCESS_PREFIX: string; | 
					
						
							|  |  |  |     EMPTY_PAGE: string; | 
					
						
							| 
									
										
										
										
											2020-02-12 16:27:45 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-20 15:15:48 -08:00
										 |  |  | } |