mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-16 01:43:21 +00:00
test: re-enable tests and record golden files after fixes on lipgloss
https://github.com/charmbracelet/lipgloss/pull/526
This commit is contained in:
+2
-13
@@ -249,12 +249,12 @@ func TestSetBorder(t *testing.T) {
|
|||||||
borders []bool
|
borders []bool
|
||||||
}{
|
}{
|
||||||
{"UnsetAllBorders", []bool{false}},
|
{"UnsetAllBorders", []bool{false}},
|
||||||
//{"SetAllBorders", []bool{true}}, // FIXME(@andreynering): Fix on Lip Gloss. Unneeded extra row.
|
{"SetAllBorders", []bool{true}},
|
||||||
{"VerticalBordersOnly", []bool{true, false}},
|
{"VerticalBordersOnly", []bool{true, false}},
|
||||||
{"NoTopBorder", []bool{false, true, true}},
|
{"NoTopBorder", []bool{false, true, true}},
|
||||||
{"NoLeftBorder", []bool{true, true, true, false}},
|
{"NoLeftBorder", []bool{true, true, true, false}},
|
||||||
{"RowSeparatorAndNoRightBorder", []bool{true, false, true, true, true}},
|
{"RowSeparatorAndNoRightBorder", []bool{true, false, true, true, true}},
|
||||||
//{"SetRowAndColumnSeparators", []bool{false, false, false, false, true, true}}, // FIXME(@andreynering): Broken style, does this make sense?
|
{"SetRowAndColumnSeparators", []bool{false, false, false, false, true, true}},
|
||||||
{"InvalidNumberOfArguments", []bool{true, false, false, false, false, true, true}},
|
{"InvalidNumberOfArguments", []bool{true, false, false, false, false, true, true}},
|
||||||
}
|
}
|
||||||
for _, tc := range tests {
|
for _, tc := range tests {
|
||||||
@@ -673,7 +673,6 @@ func TestModel_View(t *testing.T) {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// FIXME(@andreynering): Fix this scenario in Lip Gloss
|
|
||||||
"ExtraPadding": {
|
"ExtraPadding": {
|
||||||
modelFunc: func() *Model {
|
modelFunc: func() *Model {
|
||||||
s := DefaultStyles()
|
s := DefaultStyles()
|
||||||
@@ -681,7 +680,6 @@ func TestModel_View(t *testing.T) {
|
|||||||
s.Cell = lipgloss.NewStyle().Padding(2, 2)
|
s.Cell = lipgloss.NewStyle().Padding(2, 2)
|
||||||
|
|
||||||
return New(
|
return New(
|
||||||
WithHeight(10),
|
|
||||||
WithHeaders("Name", "Country of Origin", "Dunk-able"),
|
WithHeaders("Name", "Country of Origin", "Dunk-able"),
|
||||||
WithRows(
|
WithRows(
|
||||||
[]string{"Chocolate Digestives", "UK", "Yes"},
|
[]string{"Chocolate Digestives", "UK", "Yes"},
|
||||||
@@ -691,7 +689,6 @@ func TestModel_View(t *testing.T) {
|
|||||||
WithStyles(s),
|
WithStyles(s),
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
skip: true,
|
|
||||||
},
|
},
|
||||||
"NoPadding": {
|
"NoPadding": {
|
||||||
modelFunc: func() *Model {
|
modelFunc: func() *Model {
|
||||||
@@ -711,7 +708,6 @@ func TestModel_View(t *testing.T) {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// FIXME(@andreynering): Fix this scenario in Lip Gloss
|
|
||||||
"BorderedHeaders": {
|
"BorderedHeaders": {
|
||||||
modelFunc: func() *Model {
|
modelFunc: func() *Model {
|
||||||
return New(
|
return New(
|
||||||
@@ -726,9 +722,7 @@ func TestModel_View(t *testing.T) {
|
|||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
skip: true,
|
|
||||||
},
|
},
|
||||||
// FIXME(@andreynering): Fix this scenario in Lip Gloss
|
|
||||||
"BorderedCells": {
|
"BorderedCells": {
|
||||||
modelFunc: func() *Model {
|
modelFunc: func() *Model {
|
||||||
return New(
|
return New(
|
||||||
@@ -743,7 +737,6 @@ func TestModel_View(t *testing.T) {
|
|||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
skip: true,
|
|
||||||
},
|
},
|
||||||
// FIXME(@andreynering): Fix in Lip Gloss? Potentially add extra empty lines to the bottom of the table.
|
// FIXME(@andreynering): Fix in Lip Gloss? Potentially add extra empty lines to the bottom of the table.
|
||||||
"ManualHeightGreaterThanRows": {
|
"ManualHeightGreaterThanRows": {
|
||||||
@@ -759,7 +752,6 @@ func TestModel_View(t *testing.T) {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// FIXME(@andreynering): Fix this scenario in Lip Gloss. Should truncate table if height is too small.
|
|
||||||
"ManualHeightLessThanRows": {
|
"ManualHeightLessThanRows": {
|
||||||
modelFunc: func() *Model {
|
modelFunc: func() *Model {
|
||||||
return New(
|
return New(
|
||||||
@@ -772,7 +764,6 @@ func TestModel_View(t *testing.T) {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
skip: true,
|
|
||||||
},
|
},
|
||||||
"ManualWidthGreaterThanColumns": {
|
"ManualWidthGreaterThanColumns": {
|
||||||
modelFunc: func() *Model {
|
modelFunc: func() *Model {
|
||||||
@@ -787,7 +778,6 @@ func TestModel_View(t *testing.T) {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// FIXME(@andreynering): Fix this scenario in Lip Gloss.
|
|
||||||
"ManualWidthLessThanColumns": {
|
"ManualWidthLessThanColumns": {
|
||||||
modelFunc: func() *Model {
|
modelFunc: func() *Model {
|
||||||
return New(
|
return New(
|
||||||
@@ -800,7 +790,6 @@ func TestModel_View(t *testing.T) {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
skip: true,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
┌────────────────────────────────────────────────────┐
|
||||||
|
│ [1mName[m [1mCountry of Origin[m [1mDunk-able[m │
|
||||||
|
├────────────────────────────────────────────────────┤
|
||||||
|
│ [1;38;5;212mChocolate Digestives[m [1;38;5;212mUK[m [1;38;5;212mYes[m │
|
||||||
|
│┌────────────────────┐┌─────────────────┐┌─────────┐│
|
||||||
|
││Tim Tams ││Australia ││No ││
|
||||||
|
│└────────────────────┘└─────────────────┘└─────────┘│
|
||||||
|
│┌────────────────────┐┌─────────────────┐┌─────────┐│
|
||||||
|
││Hobnobs ││UK ││Yes ││
|
||||||
|
│└────────────────────┘└─────────────────┘└─────────┘│
|
||||||
|
└────────────────────────────────────────────────────┘
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
┌────────────────────────────────────────────────────┐
|
||||||
|
│┌────────────────────┐┌─────────────────┐┌─────────┐│
|
||||||
|
││Name ││Country of Origin││Dunk-able││
|
||||||
|
│└────────────────────┘└─────────────────┘└─────────┘│
|
||||||
|
├────────────────────────────────────────────────────┤
|
||||||
|
│ [1;38;5;212mChocolate Digestives[m [1;38;5;212mUK[m [1;38;5;212mYes[m │
|
||||||
|
│ Tim Tams Australia No │
|
||||||
|
│ Hobnobs UK Yes │
|
||||||
|
└────────────────────────────────────────────────────┘
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
┌──────────────────────────────────────────────────────────┐
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ Name Country of Origin Dunk-able │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
├──────────────────────────────────────────────────────────┤
|
||||||
|
│ [1;38;5;212mChocolate Digestives[m [1;38;5;212mUK[m [1;38;5;212mYes[m │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ Tim Tams Australia No │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ Hobnobs UK Yes │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
└──────────────────────────────────────────────────────────┘
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
┌────────────────────────────────────────────────────┐
|
||||||
|
│ [1mName[m [1mCountry of Origin[m [1mDunk-able[m │
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
┌───────────────────────────────────────────────────────────────────────────────
|
┌──────────────────────────────────────────────────────────────────────────────┐
|
||||||
│ [1mName[m [1mCountry of Origin[m [1mDunk-able[m
|
│ [1mName[m [1mCountry of Origin[m [1mDunk-able[m │
|
||||||
├───────────────────────────────────────────────────────────────────────────────
|
├──────────────────────────────────────────────────────────────────────────────┤
|
||||||
│ [1;38;5;212mChocolate Digestives[m [1;38;5;212mUK[m [1;38;5;212mYes[m
|
│ [1;38;5;212mChocolate Digestives[m [1;38;5;212mUK[m [1;38;5;212mYes[m │
|
||||||
│ Tim Tams Australia No
|
│ Tim Tams Australia No │
|
||||||
│ Hobnobs UK Yes
|
│ Hobnobs UK Yes │
|
||||||
└───────────────────────────────────────────────────────────────────────────────
|
└──────────────────────────────────────────────────────────────────────────────┘
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
┌────────────────────────────┐
|
||||||
|
│ [1mName[m [1mCount…[m [1mDunk-a…[m │
|
||||||
|
├────────────────────────────┤
|
||||||
|
│ [1;38;5;212mChocolate[m [1;38;5;212mUK[m [1;38;5;212mYes[m │
|
||||||
|
│ [1;38;5;212mDigestive[m │
|
||||||
|
│ [1;38;5;212ms[m │
|
||||||
|
│ Tim Tams Austra No │
|
||||||
|
│ lia │
|
||||||
|
│ Hobnobs UK Yes │
|
||||||
|
└────────────────────────────┘
|
||||||
@@ -2,15 +2,8 @@
|
|||||||
│ [1mRank[m [1mCity[m [1mCountry[m [1mPopulation[m
|
│ [1mRank[m [1mCity[m [1mCountry[m [1mPopulation[m
|
||||||
├────────────────────────────────────────────
|
├────────────────────────────────────────────
|
||||||
│ [1;38;5;212m1[m [1;38;5;212mTokyo[m [1;38;5;212mJapan[m [1;38;5;212m37,274,000[m
|
│ [1;38;5;212m1[m [1;38;5;212mTokyo[m [1;38;5;212mJapan[m [1;38;5;212m37,274,000[m
|
||||||
├────────────────────────────────────────────┤
|
├────────────────────────────────────────────
|
||||||
│ 2 Delhi India 32,065,760
|
│ 2 Delhi India 32,065,760
|
||||||
├────────────────────────────────────────────┤
|
├────────────────────────────────────────────
|
||||||
│ 3 Shanghai China 28,516,904
|
|
||||||
├────────────────────────────────────────────┤
|
|
||||||
│ 4 Dhaka Bangladesh 22,478,116
|
|
||||||
├────────────────────────────────────────────┤
|
|
||||||
│ 5 São Paulo Brazil 22,429,800
|
|
||||||
├────────────────────────────────────────────┤
|
|
||||||
│ … … … …
|
│ … … … …
|
||||||
├────────────────────────────────────────────┤
|
|
||||||
└────────────────────────────────────────────
|
└────────────────────────────────────────────
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
┌──────┬──────────────┬────────────┬────────────┐
|
||||||
|
│ [1mRank[m │ [1mCity[m │ [1mCountry[m │ [1mPopulation[m │
|
||||||
|
├──────┼──────────────┼────────────┼────────────┤
|
||||||
|
│ [1;38;5;212m1[m │ [1;38;5;212mTokyo[m │ [1;38;5;212mJapan[m │ [1;38;5;212m37,274,000[m │
|
||||||
|
├──────┼──────────────┼────────────┼────────────┤
|
||||||
|
│ 2 │ Delhi │ India │ 32,065,760 │
|
||||||
|
├──────┼──────────────┼────────────┼────────────┤
|
||||||
|
│ … │ … │ … │ … │
|
||||||
|
└──────┴──────────────┴────────────┴────────────┘
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[1mRank[m │ [1mCity[m │ [1mCountry[m │ [1mPopulation[m
|
||||||
|
──────┼──────────────┼────────────┼────────────
|
||||||
|
[1;38;5;212m1[m │ [1;38;5;212mTokyo[m │ [1;38;5;212mJapan[m │ [1;38;5;212m37,274,000[m
|
||||||
|
──────┼──────────────┼────────────┼────────────
|
||||||
|
2 │ Delhi │ India │ 32,065,760
|
||||||
|
──────┼──────────────┼────────────┼────────────
|
||||||
|
3 │ Shanghai │ China │ 28,516,904
|
||||||
|
──────┼──────────────┼────────────┼────────────
|
||||||
|
… │ … │ … │ …
|
||||||
+1
-1
@@ -6,5 +6,5 @@
|
|||||||
4 Dhaka Bangladesh 22,478,116
|
4 Dhaka Bangladesh 22,478,116
|
||||||
5 São Paulo Brazil 22,429,800
|
5 São Paulo Brazil 22,429,800
|
||||||
6 Mexico City Mexico 22,085,140
|
6 Mexico City Mexico 22,085,140
|
||||||
|
7 Cairo Egypt 21,750,020
|
||||||
… … … …
|
… … … …
|
||||||
|
|
||||||
Reference in New Issue
Block a user