Add spreadsheet-style list, split detail pane with forms and document preview, and Alt+1/2/3 to show/hide panes with even width distribution. Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
473 B
Go
21 lines
473 B
Go
package model
|
|
|
|
import "testing"
|
|
|
|
func TestFormFieldsFromRawMail(t *testing.T) {
|
|
raw := map[string]any{"subject": "Hi", "body": "Hello"}
|
|
f := FormFieldsFromRaw(KindMail, raw)
|
|
if f.Primary != "Hi" || f.Secondary != "Hello" || !f.ReadOnly {
|
|
t.Fatalf("unexpected mail fields: %+v", f)
|
|
}
|
|
}
|
|
|
|
func TestIsDocumentKind(t *testing.T) {
|
|
if !IsDocumentKind(KindFile) {
|
|
t.Fatal("file should be document")
|
|
}
|
|
if IsDocumentKind(KindTask) {
|
|
t.Fatal("task should be form")
|
|
}
|
|
}
|