From 999fcd8eda5df8b453f1834a67424f54e05f9137 Mon Sep 17 00:00:00 2001 From: Megan Wolf Date: Fri, 20 Sep 2024 08:53:05 -0400 Subject: [PATCH] fix: bump timeout in tui tests --- src/internal/tui/model_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/internal/tui/model_test.go b/src/internal/tui/model_test.go index 3c8ea47b..d4c0c106 100644 --- a/src/internal/tui/model_test.go +++ b/src/internal/tui/model_test.go @@ -15,6 +15,8 @@ import ( "github.com/muesli/termenv" ) +const timeout = time.Second * 10 + func init() { lipgloss.SetColorProfile(termenv.Ascii) tea.Sequence() @@ -49,7 +51,7 @@ func TestNewComponentDefinitionModel(t *testing.T) { t.Fatal("testModel is nil") } - fm := testModel.FinalModel(t, teatest.WithFinalTimeout(time.Second*5)) + fm := testModel.FinalModel(t, teatest.WithFinalTimeout(timeout)) teatest.RequireEqualOutput(t, []byte(fm.View())) } @@ -77,7 +79,7 @@ func TestMultiComponentDefinitionModel(t *testing.T) { t.Fatal("testModel is nil") } - fm := testModel.FinalModel(t, teatest.WithFinalTimeout(time.Second*5)) + fm := testModel.FinalModel(t, teatest.WithFinalTimeout(timeout)) teatest.RequireEqualOutput(t, []byte(fm.View())) } @@ -98,7 +100,7 @@ func TestNewAssessmentResultsModel(t *testing.T) { t.Fatal("testModel is nil") } - fm := testModel.FinalModel(t, teatest.WithFinalTimeout(time.Second*5)) + fm := testModel.FinalModel(t, teatest.WithFinalTimeout(timeout)) teatest.RequireEqualOutput(t, []byte(fm.View())) } @@ -124,7 +126,7 @@ func TestComponentControlSelect(t *testing.T) { t.Fatal("testModel is nil") } - fm := testModel.FinalModel(t, teatest.WithFinalTimeout(time.Second*5)) + fm := testModel.FinalModel(t, teatest.WithFinalTimeout(timeout)) teatest.RequireEqualOutput(t, []byte(fm.View())) }