test was failing after some AI change. this should fix it
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
2026-05-06 13:53:38 +02:00
parent 38cdda3d54
commit c90dadf9ad
2 changed files with 3 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ func TestModel_updateLayout(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
m := NewModel("")
m.updateLayout(tt.width, tt.height)
m = m.updateLayout(tt.width, tt.height)
if m.viewportWidth != tt.width {
t.Errorf("viewportWidth = %d, want %d", m.viewportWidth, tt.width)
}

View File

@@ -202,7 +202,8 @@ func validatePaymentForm(state *PaymentFormState) string {
// UpdatePaymentForm handles updates to the payment form.
// Mutates state in place, returns only the tea.Cmd.
func (m Model) UpdatePaymentForm(msg tea.Msg, state *PaymentFormState) tea.Cmd {
if _, ok := msg.(tea.WindowSizeMsg); ok {
switch _, ok := msg.(tea.WindowSizeMsg); {
case ok:
if m.size < medium {
state.form = state.form.WithLayout(huh.LayoutStack).WithWidth(m.widthContent)
} else {