Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(table): improve table unit tests #601

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
630 changes: 600 additions & 30 deletions table/table_test.go

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions table/testdata/TestModel_View/Bordered_cells.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Name Country of Orig…Dunk-able
┌─────────────────────────┐┌────────────────┐┌────────────┐
│Chocolate Digestives ││UK ││Yes │
└─────────────────────────┘└────────────────┘└────────────┘
┌─────────────────────────┐┌────────────────┐┌────────────┐
│Tim Tams ││Australia ││No │
└─────────────────────────┘└────────────────┘└────────────┘
┌─────────────────────────┐┌────────────────┐┌────────────┐
│Hobnobs ││UK ││Yes │
└─────────────────────────┘└────────────────┘└────────────┘











23 changes: 23 additions & 0 deletions table/testdata/TestModel_View/Bordered_headers.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
┌─────────────────────────┐┌────────────────┐┌────────────┐
│Name ││Country of Orig…││Dunk-able │
└─────────────────────────┘└────────────────┘└────────────┘
Chocolate Digestives UK Yes
Tim Tams Australia No
Hobnobs UK Yes

















20 changes: 20 additions & 0 deletions table/testdata/TestModel_View/Empty.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@




















14 changes: 14 additions & 0 deletions table/testdata/TestModel_View/Extra_padding.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@


Name Country of Orig… Dunk-able




Chocolate Digestives UK Yes




Tim Tams Australia No

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Name Country of Orig… Dunk-able
Chocolate Digestives UK Yes
Tim Tams Australia No
Hobnobs UK Yes


Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Name Country of Orig… Dunk-able
Chocolate Digestives UK Yes
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Name Country of Orig… Dunk-able
Chocolate Digestives UK Yes
Tim Tams Australia No
Hobnobs UK Yes

















Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Name Country of Origin Dunk-able
Chocolate Digestives UK Yes
Tim Tams Australia No
Hobnobs UK Yes

















Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Name Country of Orig… Dunk-able
Chocolate Digestives UK Yes
Tim Tams Australia No
21 changes: 21 additions & 0 deletions table/testdata/TestModel_View/Multiple_rows_and_columns.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Name Country of Orig… Dunk-able
Chocolate Digestives UK Yes
Tim Tams Australia No
Hobnobs UK Yes

















10 changes: 10 additions & 0 deletions table/testdata/TestModel_View/No_padding.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Name Country of Orig…Dunk-able
Chocolate Digestives UK Yes
Tim Tams Australia No
Hobnobs UK Yes






21 changes: 21 additions & 0 deletions table/testdata/TestModel_View/Single_row_and_column.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Name
Chocolate Digestives



















8 changes: 8 additions & 0 deletions table/testdata/TestModel_View_CenteredInABox.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
┌────────────────────────────────────────────────────────────────────────────────┐
│ Name Country of Orig… Dunk-able │
│ Chocolate Digestives UK Yes │
│ Tim Tams Australia No │
│ Hobnobs UK Yes │
│ │
│ │
└────────────────────────────────────────────────────────────────────────────────┘
Loading