Fix chat snapshot clock dependence and finance legend tab order in tests
This commit is contained in:
2 files changed
+2
-2
No files matched your search
@@ -3,6 +3,7 @@ package chat
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/egoist/mygo/ui"
|
"github.com/egoist/mygo/ui"
|
||||||
|
|
||||||
@@ -66,7 +67,7 @@ func TestSharedConversationViewDisabledAndChecks(t *testing.T) {
|
|||||||
func TestSharedConversationViewSnapshot(t *testing.T) {
|
func TestSharedConversationViewSnapshot(t *testing.T) {
|
||||||
snapshot(t, "shared_conversation_view", 560, 380, func(c *ui.Context) {
|
snapshot(t, "shared_conversation_view", 560, 380, func(c *ui.Context) {
|
||||||
ui.Column(c).Padding(16).Height(380).Children(func() {
|
ui.Column(c).Padding(16).Height(380).Children(func() {
|
||||||
SharedConversationView(c, chatMessages(), SharedConversationViewOptions{Title: "Banquet seating", SharedBy: "Lady Ann", SharedAt: chatNow})
|
SharedConversationView(c, chatMessages(), SharedConversationViewOptions{Title: "Banquet seating", SharedBy: "Lady Ann", SharedAt: time.Now()})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -21,7 +21,6 @@ func TestPerformanceChartBenchmarkDrawdownAndKeys(t *testing.T) {
|
|||||||
}
|
}
|
||||||
tt.Key(0, ui.KeyTab)
|
tt.Key(0, ui.KeyTab)
|
||||||
tt.Key(0, ui.KeyTab)
|
tt.Key(0, ui.KeyTab)
|
||||||
tt.Key(0, ui.KeyTab)
|
|
||||||
tt.Key(0, ui.KeyEnd)
|
tt.Key(0, ui.KeyEnd)
|
||||||
if last.Point != 3 || !tt.HasText("2026-01-04 · Portfolio +20.00% · Benchmark +12.00%") {
|
if last.Point != 3 || !tt.HasText("2026-01-04 · Portfolio +20.00% · Benchmark +12.00%") {
|
||||||
t.Fatalf("point %d text %q", last.Point, tt.Texts())
|
t.Fatalf("point %d text %q", last.Point, tt.Texts())
|
||||||
|
|||||||
Reference in new issue
Block a user