mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-05 04:36:07 +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
|
||||
}{
|
||||
{"UnsetAllBorders", []bool{false}},
|
||||
//{"SetAllBorders", []bool{true}}, // FIXME(@andreynering): Fix on Lip Gloss. Unneeded extra row.
|
||||
{"SetAllBorders", []bool{true}},
|
||||
{"VerticalBordersOnly", []bool{true, false}},
|
||||
{"NoTopBorder", []bool{false, true, true}},
|
||||
{"NoLeftBorder", []bool{true, true, true, false}},
|
||||
{"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}},
|
||||
}
|
||||
for _, tc := range tests {
|
||||
@@ -673,7 +673,6 @@ func TestModel_View(t *testing.T) {
|
||||
)
|
||||
},
|
||||
},
|
||||
// FIXME(@andreynering): Fix this scenario in Lip Gloss
|
||||
"ExtraPadding": {
|
||||
modelFunc: func() *Model {
|
||||
s := DefaultStyles()
|
||||
@@ -681,7 +680,6 @@ func TestModel_View(t *testing.T) {
|
||||
s.Cell = lipgloss.NewStyle().Padding(2, 2)
|
||||
|
||||
return New(
|
||||
WithHeight(10),
|
||||
WithHeaders("Name", "Country of Origin", "Dunk-able"),
|
||||
WithRows(
|
||||
[]string{"Chocolate Digestives", "UK", "Yes"},
|
||||
@@ -691,7 +689,6 @@ func TestModel_View(t *testing.T) {
|
||||
WithStyles(s),
|
||||
)
|
||||
},
|
||||
skip: true,
|
||||
},
|
||||
"NoPadding": {
|
||||
modelFunc: func() *Model {
|
||||
@@ -711,7 +708,6 @@ func TestModel_View(t *testing.T) {
|
||||
)
|
||||
},
|
||||
},
|
||||
// FIXME(@andreynering): Fix this scenario in Lip Gloss
|
||||
"BorderedHeaders": {
|
||||
modelFunc: func() *Model {
|
||||
return New(
|
||||
@@ -726,9 +722,7 @@ func TestModel_View(t *testing.T) {
|
||||
}),
|
||||
)
|
||||
},
|
||||
skip: true,
|
||||
},
|
||||
// FIXME(@andreynering): Fix this scenario in Lip Gloss
|
||||
"BorderedCells": {
|
||||
modelFunc: func() *Model {
|
||||
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.
|
||||
"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": {
|
||||
modelFunc: func() *Model {
|
||||
return New(
|
||||
@@ -772,7 +764,6 @@ func TestModel_View(t *testing.T) {
|
||||
),
|
||||
)
|
||||
},
|
||||
skip: true,
|
||||
},
|
||||
"ManualWidthGreaterThanColumns": {
|
||||
modelFunc: func() *Model {
|
||||
@@ -787,7 +778,6 @@ func TestModel_View(t *testing.T) {
|
||||
)
|
||||
},
|
||||
},
|
||||
// FIXME(@andreynering): Fix this scenario in Lip Gloss.
|
||||
"ManualWidthLessThanColumns": {
|
||||
modelFunc: func() *Model {
|
||||
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
|
||||
├───────────────────────────────────────────────────────────────────────────────
|
||||
│ [1;38;5;212mChocolate Digestives[m [1;38;5;212mUK[m [1;38;5;212mYes[m
|
||||
│ Tim Tams Australia No
|
||||
│ Hobnobs UK Yes
|
||||
└───────────────────────────────────────────────────────────────────────────────
|
||||
┌──────────────────────────────────────────────────────────────────────────────┐
|
||||
│ [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,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
|
||||
├────────────────────────────────────────────
|
||||
│ [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
|
||||
├────────────────────────────────────────────┤
|
||||
│ 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
|
||||
5 São Paulo Brazil 22,429,800
|
||||
6 Mexico City Mexico 22,085,140
|
||||
7 Cairo Egypt 21,750,020
|
||||
… … … …
|
||||
|
||||
Reference in New Issue
Block a user