Skip to content

Commit

Permalink
fix: bump timeout in tui tests
Browse files Browse the repository at this point in the history
  • Loading branch information
meganwolf0 committed Sep 20, 2024
1 parent 2a6fa18 commit 999fcd8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/internal/tui/model_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import (
"github.com/muesli/termenv"
)

const timeout = time.Second * 10

func init() {
lipgloss.SetColorProfile(termenv.Ascii)
tea.Sequence()
Expand Down Expand Up @@ -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()))
}
Expand Down Expand Up @@ -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()))
}
Expand All @@ -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()))
}
Expand All @@ -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()))
}

0 comments on commit 999fcd8

Please sign in to comment.