From f70971c4e2dcd8175bdf9c2146f2265417ec9b8f Mon Sep 17 00:00:00 2001 From: ConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com> Date: Tue, 8 Nov 2022 20:53:42 -0600 Subject: [PATCH] Add manual test support to e2e test framework --- .../e2e_tests/wrapper/main.go | 8 ++++++++ .../e2e_tests/wrapper/structs.go | 17 +++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper.Tests/e2e_tests/wrapper/main.go b/ConfusedPolarBear.Plugin.IntroSkipper.Tests/e2e_tests/wrapper/main.go index fe4826f..3d1a477 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper.Tests/e2e_tests/wrapper/main.go +++ b/ConfusedPolarBear.Plugin.IntroSkipper.Tests/e2e_tests/wrapper/main.go @@ -1,6 +1,7 @@ package main import ( + "bufio" "bytes" "crypto/rand" "encoding/hex" @@ -174,6 +175,13 @@ func main() { 5*time.Minute) fmt.Print("\033[39;0m") // reset terminal text color + // Pause for any manual tests + if server.ManualTests { + fmt.Println(" [!] Pausing for manual tests") + reader := bufio.NewReader(os.Stdin) + reader.ReadString('\n') + } + // Setup base Selenium arguments seleniumArgs = []string{ "-u", // force stdout to be unbuffered diff --git a/ConfusedPolarBear.Plugin.IntroSkipper.Tests/e2e_tests/wrapper/structs.go b/ConfusedPolarBear.Plugin.IntroSkipper.Tests/e2e_tests/wrapper/structs.go index 9d472a5..bec93c9 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper.Tests/e2e_tests/wrapper/structs.go +++ b/ConfusedPolarBear.Plugin.IntroSkipper.Tests/e2e_tests/wrapper/structs.go @@ -11,14 +11,15 @@ type Common struct { } type Server struct { - Skip bool `json:"skip"` - Comment string `json:"comment"` - Address string `json:"address"` - Image string `json:"image"` - Username string `json:"username"` - Password string `json:"password"` - Browsers []string `json:"browsers"` - Tests []string `json:"tests"` + Skip bool `json:"skip"` + Comment string `json:"comment"` + Address string `json:"address"` + Image string `json:"image"` + Username string `json:"username"` + Password string `json:"password"` + Browsers []string `json:"browsers"` + Tests []string `json:"tests"` + ManualTests bool `json:"manual_tests"` // These properties are set at runtime Docker bool `json:"-"`