testHook#
Interfaces#
ClientRectangle#
Defined in: editor/src/testHook.ts:27
A rectangle in client pixels, left and top as getBoundingClientRect gives them.
Properties#
height#
readonlyheight:number
Defined in: editor/src/testHook.ts:31
width#
readonlywidth:number
Defined in: editor/src/testHook.ts:30
x#
readonlyx:number
Defined in: editor/src/testHook.ts:28
y#
readonlyy:number
Defined in: editor/src/testHook.ts:29
HookBand#
Defined in: editor/src/testHook.ts:35
A band of a block’s drawing (a band of Drawing.boxes), as the hook’s bands reports it.
Properties#
address#
readonlyaddress:ElementAddress
Defined in: editor/src/testHook.ts:37
{id: T, facet}.
elements#
readonlyelements:number
Defined in: editor/src/testHook.ts:49
The displayed elements it holds directly.
facet#
readonlyfacet:Facet
Defined in: editor/src/testHook.ts:40
level#
readonlylevel:number
Defined in: editor/src/testHook.ts:42
Signed and never 0: 1, 2, … above its timeline’s line, −1, −2, … below.
line#
readonlyline:number
Defined in: editor/src/testHook.ts:47
The ordinate of its timeline’s line on the screen, in client pixels; it tells apart the records of a timeline drawn with two lines in one drawing.
rect#
readonlyrect:ClientRectangle
Defined in: editor/src/testHook.ts:51
Where its rectangle lies on the screen.
timeline#
readonlytimeline:string
Defined in: editor/src/testHook.ts:39
The ID of its timeline.
HookBox#
Defined in: editor/src/testHook.ts:55
A container of a block’s drawing (a record of Drawing.boxes), as the hook’s boxes reports it.
Properties#
address#
readonlyaddress:ElementAddress
Defined in: editor/src/testHook.ts:58
Its element address; {} for the block.
displayed#
readonlydisplayed:boolean
Defined in: editor/src/testHook.ts:64
Whether its own rectangle is drawn.
holder#
readonlyholder:PlaceKey|null
Defined in: editor/src/testHook.ts:62
The place key of the frame or card holding it; null for the block and what it holds.
key#
readonlykey:PlaceKey|null
Defined in: editor/src/testHook.ts:60
Its place key, telling every frame and card apart; null for the block and a band.
kind#
readonlykind:"band"|"block"|"frame"|"card"
Defined in: editor/src/testHook.ts:56
TestHook#
Defined in: editor/src/testHook.ts:68
What window.__tilie offers the end-to-end tests.
Methods#
bands()#
bands(
block):HookBand[]
Defined in: editor/src/testHook.ts:92
The drawn bands of block block, in the drawing’s box order, placed on the screen (bandsOf).
Parameters#
block#
string
Returns#
HookBand[]
boxes()#
boxes(
block):HookBox[]
Defined in: editor/src/testHook.ts:94
The containers of block block’s drawing, in its box order (boxesOf).
Parameters#
block#
string
Returns#
HookBox[]
cancel()#
cancel():
void
Defined in: editor/src/testHook.ts:90
Close the innermost editor, discarding its changes, without the editing bar’s question.
Returns#
void
done()#
done():
void
Defined in: editor/src/testHook.ts:88
Close the innermost editor, keeping its changes.
Returns#
void
editing()#
editing():
OpenEditor[]
Defined in: editor/src/testHook.ts:84
The editing path: a copy of the store’s open editors, outermost first.
Returns#
health()#
health():
Health|null
Defined in: editor/src/testHook.ts:80
The server’s health response, or null until one arrives or when the check failed.
Returns#
Health | null
load()#
load(
text):void
Defined in: editor/src/testHook.ts:70
Open the workspace file text in place of the current workspace; throws when it is refused.
Parameters#
text#
string
Returns#
void
locked()#
locked():
boolean
Defined in: editor/src/testHook.ts:77
Returns#
boolean
mode()#
mode():
ResizeMode
Defined in: editor/src/testHook.ts:78
Returns#
open()#
open(
address):Problem|null
Defined in: editor/src/testHook.ts:86
Open the editor of address inside the innermost open one; the refusal, or null when it opened.
Parameters#
address#
Returns#
Problem | null
select()#
select(
addresses):void
Defined in: editor/src/testHook.ts:74
Parameters#
addresses#
Address[]
Returns#
void
selection()#
selection():
Address[]
Defined in: editor/src/testHook.ts:73
The selected addresses.
Returns#
Address[]
setViewport()#
setViewport(
viewport):void
Defined in: editor/src/testHook.ts:76
Parameters#
viewport#
Viewport
Returns#
void
store()#
store():
Store
Defined in: editor/src/testHook.ts:71
Returns#
text()#
text():
string
Defined in: editor/src/testHook.ts:82
The open workspace as Save writes it: writeWorkspace of the store’s snapshot, every open editor folded.
Returns#
string
viewport()#
viewport():
Viewport
Defined in: editor/src/testHook.ts:75
Returns#
Viewport
Type Aliases#
ClientBox#
ClientBox =
Pick<DOMRectReadOnly,"left"|"top"|"width"|"height">
Defined in: editor/src/testHook.ts:104
A screen rectangle, as getBoundingClientRect gives one.
Variables#
TEST_HOOK#
constTEST_HOOK:boolean
Defined in: editor/src/testHook.ts:185
Whether this build carries the test hook.
Functions#
bandsOf()#
bandsOf(
view,block,pane?):HookBand[]
Defined in: editor/src/testHook.ts:172
The drawn bands of block block of view, in the drawing’s box order: the
drawing the canvas shows for that block (arranger’s drawingOf), placed
through the block’s drawing <svg> on the page (hookBands). Throws a
RangeError for a block view does not hold, and an Error while the
block’s drawing is not on the page, since nothing places it then.
Parameters#
view#
block#
string
pane?#
Returns#
HookBand[]
boxesOf()#
boxesOf(
view,block,pane?):HookBox[]
Defined in: editor/src/testHook.ts:155
The containers of block block of view, in the drawing’s box order: the
drawing the canvas shows for that block (arranger’s drawingOf), so what a
drawn address names is read from the drawing’s own records. Throws a
RangeError for a block view does not hold.
Parameters#
view#
block#
string
pane?#
Returns#
HookBox[]
hookBands()#
hookBands(
drawing,box):HookBand[]
Defined in: editor/src/testHook.ts:114
The bands of drawing, in its box order, shown in the client rectangle
box (its <svg>’s): each band’s line ordinate and rectangle mapped from
the drawing’s units into client pixels by the scale of the rectangle to the
drawing, the inverse of the <svg>’s screen transform the canvas reads a
pointer through while the drawing is shown unrotated. Nothing is clipped: a
drawing off screen gives what this computes.
Parameters#
drawing#
box#
Returns#
HookBand[]
installTestHook()#
installTestHook(
hook): () =>void
Defined in: editor/src/testHook.ts:188
Install hook as window.__tilie; returns its removal.
Parameters#
hook#
Returns#
() => void