Documentation
¶
Index ¶
- Constants
- Variables
- type Clock
- type Condition
- type Runtime
- type Script
- type Section
- type Step
- func AddTimebaseOffset(offset time.Duration) Step
- func ClearScreenshotsFolder() Step
- func DeleteScreenshot(name string) Step
- func Describe(description string, delay time.Duration) Step
- func DescribeScreenshot(description string, delay time.Duration) Step
- func FillQSOList(begin, end int) Step
- func ResetTimebase() Step
- func SetTimebase(timebase string) Step
- func TriggerScreenshot(filename string) Step
- func TriggerScreenshotWithDelay(name string, delay time.Duration) Step
- func Wait(duration time.Duration) Step
Constants ¶
View Source
const ScreenshotsFolder = "./docs/screenshots"
Variables ¶
View Source
var ScreenshotsScript = &Script{ sections: []*Section{ { steps: []Step{ SetTimebase("2023-06-28T19:00:00Z"), Wait(2 * time.Second), }, }, { enter: AskForScreenshot("about dialog", 1*time.Second), steps: []Step{ func(_ context.Context, r *Runtime) time.Duration { r.UI(r.App.About) return 0 }, TriggerScreenshot("about"), Wait(5 * time.Second), }, }, { enter: AskForScreenshot("file menu, hightlight OPEN CONFIGURATION FILE", 10*time.Second), steps: []Step{ TriggerScreenshot("menu_file_open_configuration"), Wait(5 * time.Second), }, }, { enter: AskForScreenshot("file menu, hightlight NEW", 10*time.Second), steps: []Step{ TriggerScreenshot("menu_file_new"), Wait(5 * time.Second), }, }, { enter: AskForScreenshot("new CWT contest session", 1*time.Second), steps: []Step{ func(_ context.Context, r *Runtime) time.Duration { r.UI(r.App.New) r.UI(func() { r.App.NewContestController.SelectContestIdentifier("CW-OPS") r.App.NewContestController.EnterContestName("CWT Screenshot Demo") r.App.NewContestController.RefreshView() }) return 0 }, TriggerScreenshot("new_cwt"), Describe("close the dialog with 'NEW', save the contest with the proposed filename\nthe settings dialog will show up, just wait for the next set of instructions", 10*time.Second), func(_ context.Context, r *Runtime) time.Duration { r.UI(func() { r.App.Settings.EnterStationCallsign("DL0ABC") r.App.Settings.EnterStationOperator("DL1ABC") r.App.Settings.EnterStationLocator("AA00xx") r.App.Settings.SetContestStartTimeNow() r.App.Settings.EnterContestExchangeValue(core.EntryField("myExchange_1"), "Walter") r.App.Settings.EnterContestExchangeValue(core.EntryField("myExchange_2"), "DL") r.App.Settings.RefreshView() }) return 0 }, Describe("select a current call history file", 20*time.Second), Describe("contest settings dialog, complete", 1*time.Second), TriggerScreenshot("contest_settings_complete"), Describe("contest settings dialog, section 'My Exchange'", 1*time.Second), TriggerScreenshot("contest_settings_myexchange_cwt"), Describe("close the contest settings dialog, screenshot of empty main window", 10*time.Second), TriggerScreenshot("main_window_empty"), }, }, { enter: AskForScreenshot("main window CW macros", 0), steps: []Step{ Describe("only the CW area, mark (1) workmode, (2) ESM, (3) macro button, (4) macros... button, (5) speed setting", 3*time.Second), TriggerScreenshot("main_window_macros"), func(_ context.Context, r *Runtime) time.Duration { r.UI(func() { r.App.Keyer.OpenKeyerSettings() }) return 0 }, Describe("the macros dialog complete, select a preset", 10*time.Second), TriggerScreenshot("macros_dialog"), Describe("close the macros dialog", 10*time.Second), }, }, { enter: AskForScreenshot("main window with QSO data", 0), steps: []Step{ FillQSOList(0, 14), Describe("score window complete, mark (1) the score graph and (2) the score table", 1*time.Second), TriggerScreenshot("score_window_filled"), FillQSOList(14, -1), Describe("main window complete", 1*time.Second), TriggerScreenshot("main_window_filled"), }, }, { enter: AskForScreenshot("main window QSO data entry", 0), steps: []Step{ func(_ context.Context, r *Runtime) time.Duration { r.UI(func() { r.App.Entry.Clear() r.App.Entry.Enter("AA3B") r.App.Entry.RefreshView() }) return 0 }, Describe("only the entry area, mark (1) best matching callsign, (2) predicted exchange, (3) qso value, (4) callsign infos", 1*time.Second), TriggerScreenshot("main_window_entry"), Describe("only the supercheck area", 1*time.Second), TriggerScreenshot("main_window_supercheck"), Describe("only the vfo area", 1*time.Second), TriggerScreenshot("main_window_vfo"), Describe("only the status bar", 1*time.Second), TriggerScreenshot("main_window_status_bar"), }, }, { steps: []Step{ Describe("all screenshots taken, closing the application", 0), func(_ context.Context, r *Runtime) time.Duration { r.UI(r.App.Quit) return 0 }, }, }, }, }
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock struct {
// contains filtered or unexported fields
}
func (*Clock) SetFromRFC3339 ¶
type Runtime ¶
type Runtime struct {
Clock *Clock
App *app.Controller
UI func(func())
}
type Step ¶
func AddTimebaseOffset ¶
func ClearScreenshotsFolder ¶
func ClearScreenshotsFolder() Step
func DeleteScreenshot ¶
func FillQSOList ¶
func ResetTimebase ¶
func ResetTimebase() Step
func SetTimebase ¶
func TriggerScreenshot ¶
Click to show internal directories.
Click to hide internal directories.