Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColorExpectation ¶
type Config ¶
type Config struct {
Metadata Metadata `yaml:"metadata"`
Original Target `yaml:"original"`
React Target `yaml:"react"`
Sections []SectionSpec `yaml:"sections"`
Styles []StyleSpec `yaml:"styles"`
Output OutputSpec `yaml:"output"`
Modes []string `yaml:"modes"`
}
type ExpectedResult ¶
type Metadata ¶
type Metadata struct {
Slug string `yaml:"slug"`
Title string `yaml:"title"`
Description string `yaml:"description"`
Goal string `yaml:"goal"`
ExpectedResult ExpectedResult `yaml:"expected_result"`
PotentialQuestions []string `yaml:"potential_questions"`
RelatedFiles []RelatedFile `yaml:"related_files"`
}
type OutputSpec ¶
type OutputSpec struct {
Dir string `yaml:"dir"`
WriteJSON bool `yaml:"write_json"`
WriteMarkdown bool `yaml:"write_markdown"`
WritePNGs bool `yaml:"write_pngs"`
WritePreparedHTML bool `yaml:"write_prepared_html"`
WriteInspectJSON bool `yaml:"write_inspect_json"`
ValidatePNGs bool `yaml:"validate_pngs"`
}
type PNGExpectations ¶
type PNGExpectations struct {
Width int `yaml:"width"`
Height int `yaml:"height"`
MinWidth int `yaml:"min_width"`
MinHeight int `yaml:"min_height"`
MaxWidth int `yaml:"max_width"`
MaxHeight int `yaml:"max_height"`
TopStripNear *ColorExpectation `yaml:"top_strip_near"`
TopStripNotNear *ColorExpectation `yaml:"top_strip_not_near"`
BottomStripNear *ColorExpectation `yaml:"bottom_strip_near"`
BottomStripNotNear *ColorExpectation `yaml:"bottom_strip_not_near"`
}
type PrepareSpec ¶
type PrepareSpec struct {
Type string `yaml:"type"`
Script string `yaml:"script"`
ScriptFile string `yaml:"script_file"`
WaitFor string `yaml:"wait_for"`
WaitForTimeoutMS int `yaml:"wait_for_timeout_ms"`
AfterWaitMS int `yaml:"after_wait_ms"`
Component string `yaml:"component"`
Props map[string]any `yaml:"props"`
RootSelector string `yaml:"root_selector"`
Width int `yaml:"width"`
MinHeight int `yaml:"min_height"`
Background string `yaml:"background"`
}
type RelatedFile ¶
type SectionSpec ¶
type SectionSpec struct {
Name string `yaml:"name"`
Selector string `yaml:"selector"`
SelectorOriginal string `yaml:"selector_original"`
SelectorReact string `yaml:"selector_react"`
OCRQuestion string `yaml:"ocr_question"`
ExpectText *TextExpectations `yaml:"expect_text"`
ExpectTextOriginal *TextExpectations `yaml:"expect_text_original"`
ExpectTextReact *TextExpectations `yaml:"expect_text_react"`
ExpectPNG *PNGExpectations `yaml:"expect_png"`
ExpectPNGOriginal *PNGExpectations `yaml:"expect_png_original"`
ExpectPNGReact *PNGExpectations `yaml:"expect_png_react"`
}
type StyleSpec ¶
type StyleSpec struct {
Name string `yaml:"name"`
Selector string `yaml:"selector"`
SelectorOriginal string `yaml:"selector_original"`
SelectorReact string `yaml:"selector_react"`
Props []string `yaml:"props"`
IncludeBounds bool `yaml:"include_bounds"`
Attributes []string `yaml:"attributes"`
Report []string `yaml:"report"`
}
type TextExpectations ¶
Click to show internal directories.
Click to hide internal directories.