* wip * webpack loader working * time to switch to babel * wip * wip - next broken * build & babel working, but resolver not loaded at runtime * webpack loaders fully working! * rpc server handler ported * fully working e2e! * ci * fix * fix * fix test * refactor integration test setup * port rpc integration test * remove duplicate constants * fix timeout * add more explicit timeouts for tests * use pnpm exec * add custom _document for auth test * await killapp * add next as dependency for test utils * update pnpm ci * add vitest config file * add hookTimeout to global vitest file Co-authored-by: Dillon Raphael <dillon@creatorsneverdie.com>
35 lines
1002 B
TypeScript
35 lines
1002 B
TypeScript
interface ChainMethods {
|
|
elementByCss: (selector: string) => Chain<Element>
|
|
elementById: () => Chain<Element>
|
|
getValue: () => Chain<any>
|
|
text: () => Chain<string>
|
|
type: () => Chain<any>
|
|
moveTo: () => Chain<any>
|
|
getComputedCss: () => Chain<any>
|
|
getAttribute: () => Chain<any>
|
|
hasElementByCssSelector: () => Chain<any>
|
|
click: () => Chain<any>
|
|
elementsByCss: () => Chain<Element[]>
|
|
waitForElementByCss: (arg: string) => Chain<any>
|
|
eval: (evalStr: string) => Chain<any>
|
|
log: () => Chain<any>
|
|
url: () => Chain<any>
|
|
back: () => Chain<any>
|
|
forward: () => Chain<any>
|
|
refresh: () => Chain<any>
|
|
setDimensions: (opts: {height: number; width: number}) => Chain<any>
|
|
close: () => Chain<any>
|
|
quit: () => Chain<any>
|
|
}
|
|
|
|
interface Chain<T> extends Promise<T & ChainMethods>, ChainMethods {}
|
|
|
|
type Browser = {__brand: "Browser"}
|
|
|
|
export default function (
|
|
appPort: number,
|
|
path: string,
|
|
waitHydration?: boolean,
|
|
allowHydrationRetry?: boolean,
|
|
): Promise<Chain<Browser>>
|