finish upgrade
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2023-04-07 22:42:54 -04:00
parent 2118e8b790
commit 0a5cea9fb1
7 changed files with 47 additions and 33 deletions

View File

@@ -3,6 +3,8 @@ package ui
import (
"fmt"
"testing"
"github.com/gdamore/tcell/v2"
)
func TestContainerOneBox(t *testing.T) {
@@ -13,7 +15,7 @@ func TestContainerOneBox(t *testing.T) {
└──────────────────┘
`
m := &MockScreen{}
one := NewBox("box one", nil, Contents{}, 0, false)
one := NewBox("box one", nil, Contents{}, tcell.Style{}, false)
container := NewContainer(
Contents{{Container: one}},
LayoutHorizontalEven,
@@ -38,8 +40,8 @@ func TestContainerTwoBoxesHStack(t *testing.T) {
└────────┘└────────┘
`
m := &MockScreen{}
one := NewBox("one", nil, Contents{}, 0, false)
two := NewBox("two", nil, Contents{}, 0, false)
one := NewBox("one", nil, Contents{}, tcell.Style{}, false)
two := NewBox("two", nil, Contents{}, tcell.Style{}, false)
container := NewContainer(
Contents{{Container: one}, {Container: two}},
LayoutHorizontalEven,
@@ -64,9 +66,9 @@ func TestContainerThreeBoxesUnevenHStack(t *testing.T) {
└────────┘└────────┘└───────┘
`
m := &MockScreen{}
one := NewBox("one", nil, Contents{}, 0, false)
two := NewBox("two", nil, Contents{}, 0, false)
three := NewBox("three", nil, Contents{}, 0, false)
one := NewBox("one", nil, Contents{}, tcell.Style{}, false)
two := NewBox("two", nil, Contents{}, tcell.Style{}, false)
three := NewBox("three", nil, Contents{}, tcell.Style{}, false)
container := NewContainer(
Contents{{Container: one}, {Container: two}, {Container: three}},
LayoutHorizontalEven,
@@ -91,8 +93,8 @@ func TestContainerTwoBoxesHPercentStack(t *testing.T) {
└────────────┘└──────┘
`
m := &MockScreen{}
one := NewBox("one", nil, Contents{}, 0, false)
two := NewBox("two", nil, Contents{}, 0, false)
one := NewBox("one", nil, Contents{}, tcell.Style{}, false)
two := NewBox("two", nil, Contents{}, tcell.Style{}, false)
container := NewContainer(
Contents{
{Container: one, Offsets: Offsets{Percent: 2}},
@@ -124,8 +126,8 @@ func TestContainerTwoBoxesVStack(t *testing.T) {
└────────┘
`
m := &MockScreen{}
one := NewBox("one", nil, Contents{}, 0, false)
two := NewBox("two", nil, Contents{}, 0, false)
one := NewBox("one", nil, Contents{}, tcell.Style{}, false)
two := NewBox("two", nil, Contents{}, tcell.Style{}, false)
container := NewContainer(
Contents{{Container: one}, {Container: two}},
LayoutVerticalEven,
@@ -155,8 +157,8 @@ func TestContainerTwoBoxesPercentageVStack(t *testing.T) {
└────────┘
`
m := &MockScreen{}
one := NewBox("one", nil, Contents{}, 0, false)
two := NewBox("two", nil, Contents{}, 0, false)
one := NewBox("one", nil, Contents{}, tcell.Style{}, false)
two := NewBox("two", nil, Contents{}, tcell.Style{}, false)
container := NewContainer(
Contents{
{Container: one, Offsets: Offsets{Percent: 2}},