diff --git a/testsuite/ui/uitest/browser.go b/testsuite/ui/uitest/browser.go index 5fe9ecabc..dbd3398f7 100644 --- a/testsuite/ui/uitest/browser.go +++ b/testsuite/ui/uitest/browser.go @@ -41,7 +41,7 @@ func Browser(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet, launch := launcher.New(). Headless(!showBrowser). - Leakless(false). + Leakless(true). Devtools(false). NoSandbox(true). UserDataDir(ctx.Dir("browser")). diff --git a/testsuite/ui/uitest/edge.go b/testsuite/ui/uitest/edge.go index 5c65b4135..6a5e2bc50 100644 --- a/testsuite/ui/uitest/edge.go +++ b/testsuite/ui/uitest/edge.go @@ -67,12 +67,7 @@ func Edge(t *testing.T, test EdgeTest) { SatelliteCount: 1, StorageNodeCount: 4, UplinkCount: 1, Reconfigure: testplanet.Reconfigure{ Satellite: func(log *zap.Logger, index int, config *satellite.Config) { - if dir := os.Getenv("STORJ_TEST_SATELLITE_WEB"); dir != "" { - config.Console.StaticDir = dir - } - config.Console.NewOnboarding = true - config.Console.NewObjectsFlow = true - config.Console.NewBrowser = true + configureSatellite(log, index, config) // TODO: this should be dynamically set from the auth service config.Console.GatewayCredentialsRequestURL = "http://" + authSvcAddr }, diff --git a/testsuite/ui/uitest/multinode.go b/testsuite/ui/uitest/multinode.go index 7a08702cc..e914af84b 100644 --- a/testsuite/ui/uitest/multinode.go +++ b/testsuite/ui/uitest/multinode.go @@ -24,6 +24,7 @@ func Multinode(t *testing.T, multinodeCount int, test Test) { config.Console.StaticDir = dir } }, + Satellite: configureSatellite, }, NonParallel: true, }, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) { diff --git a/testsuite/ui/uitest/run.go b/testsuite/ui/uitest/run.go index aa97e8315..88b059d38 100644 --- a/testsuite/ui/uitest/run.go +++ b/testsuite/ui/uitest/run.go @@ -30,22 +30,25 @@ func (log zapWriter) Write(data []byte) (int, error) { return len(data), nil } +func configureSatellite(log *zap.Logger, index int, config *satellite.Config) { + if dir := os.Getenv("STORJ_TEST_SATELLITE_WEB"); dir != "" { + config.Console.StaticDir = dir + } + config.Console.NewOnboarding = true + config.Console.NewNavigation = true + config.Console.NewBrowser = true + config.Console.NewObjectsFlow = true + config.Console.CouponCodeBillingUIEnabled = true +} + // Run starts a new UI test. func Run(t *testing.T, test Test) { testplanet.Run(t, testplanet.Config{ SatelliteCount: 1, StorageNodeCount: 4, UplinkCount: 1, Reconfigure: testplanet.Reconfigure{ - Satellite: func(log *zap.Logger, index int, config *satellite.Config) { - if dir := os.Getenv("STORJ_TEST_SATELLITE_WEB"); dir != "" { - config.Console.StaticDir = dir - } - config.Console.NewOnboarding = true - config.Console.NewNavigation = true - config.Console.NewBrowser = true - config.Console.CouponCodeBillingUIEnabled = true - config.Console.NewObjectsFlow = true - }, + Satellite: configureSatellite, }, + NonParallel: true, }, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) { Browser(t, ctx, planet, func(browser *rod.Browser) { test(t, ctx, planet, browser)