mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-16 01:43:21 +00:00
fix(textarea): fix tests
This commit is contained in:
@@ -119,6 +119,7 @@ type LineInfo struct {
|
|||||||
CharOffset int
|
CharOffset int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Styles contains all styles for the textarea.
|
||||||
type Styles struct {
|
type Styles struct {
|
||||||
Focused StyleState
|
Focused StyleState
|
||||||
Blurred StyleState
|
Blurred StyleState
|
||||||
|
|||||||
@@ -1032,7 +1032,7 @@ func TestView(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "set width with style",
|
name: "set width with style",
|
||||||
modelFunc: func(m Model) Model {
|
modelFunc: func(m Model) Model {
|
||||||
m.FocusedStyle.Base = lipgloss.NewStyle().Border(lipgloss.NormalBorder())
|
m.Styles.Focused.Base = lipgloss.NewStyle().Border(lipgloss.NormalBorder())
|
||||||
m.Focus()
|
m.Focus()
|
||||||
|
|
||||||
m.SetWidth(12)
|
m.SetWidth(12)
|
||||||
@@ -1060,7 +1060,7 @@ func TestView(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "set width with style max width minus one",
|
name: "set width with style max width minus one",
|
||||||
modelFunc: func(m Model) Model {
|
modelFunc: func(m Model) Model {
|
||||||
m.FocusedStyle.Base = lipgloss.NewStyle().Border(lipgloss.NormalBorder())
|
m.Styles.Focused.Base = lipgloss.NewStyle().Border(lipgloss.NormalBorder())
|
||||||
m.Focus()
|
m.Focus()
|
||||||
|
|
||||||
m.SetWidth(12)
|
m.SetWidth(12)
|
||||||
@@ -1088,7 +1088,7 @@ func TestView(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "set width with style max width",
|
name: "set width with style max width",
|
||||||
modelFunc: func(m Model) Model {
|
modelFunc: func(m Model) Model {
|
||||||
m.FocusedStyle.Base = lipgloss.NewStyle().Border(lipgloss.NormalBorder())
|
m.Styles.Focused.Base = lipgloss.NewStyle().Border(lipgloss.NormalBorder())
|
||||||
m.Focus()
|
m.Focus()
|
||||||
|
|
||||||
m.SetWidth(12)
|
m.SetWidth(12)
|
||||||
@@ -1116,7 +1116,7 @@ func TestView(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "set width with style max width plus one",
|
name: "set width with style max width plus one",
|
||||||
modelFunc: func(m Model) Model {
|
modelFunc: func(m Model) Model {
|
||||||
m.FocusedStyle.Base = lipgloss.NewStyle().Border(lipgloss.NormalBorder())
|
m.Styles.Focused.Base = lipgloss.NewStyle().Border(lipgloss.NormalBorder())
|
||||||
m.Focus()
|
m.Focus()
|
||||||
|
|
||||||
m.SetWidth(12)
|
m.SetWidth(12)
|
||||||
@@ -1144,7 +1144,7 @@ func TestView(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "set width without line numbers with style",
|
name: "set width without line numbers with style",
|
||||||
modelFunc: func(m Model) Model {
|
modelFunc: func(m Model) Model {
|
||||||
m.FocusedStyle.Base = lipgloss.NewStyle().Border(lipgloss.NormalBorder())
|
m.Styles.Focused.Base = lipgloss.NewStyle().Border(lipgloss.NormalBorder())
|
||||||
m.Focus()
|
m.Focus()
|
||||||
|
|
||||||
m.ShowLineNumbers = false
|
m.ShowLineNumbers = false
|
||||||
@@ -1173,7 +1173,7 @@ func TestView(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "set width without line numbers with style max width minus one",
|
name: "set width without line numbers with style max width minus one",
|
||||||
modelFunc: func(m Model) Model {
|
modelFunc: func(m Model) Model {
|
||||||
m.FocusedStyle.Base = lipgloss.NewStyle().Border(lipgloss.NormalBorder())
|
m.Styles.Focused.Base = lipgloss.NewStyle().Border(lipgloss.NormalBorder())
|
||||||
m.Focus()
|
m.Focus()
|
||||||
|
|
||||||
m.ShowLineNumbers = false
|
m.ShowLineNumbers = false
|
||||||
@@ -1202,7 +1202,7 @@ func TestView(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "set width without line numbers with style max width",
|
name: "set width without line numbers with style max width",
|
||||||
modelFunc: func(m Model) Model {
|
modelFunc: func(m Model) Model {
|
||||||
m.FocusedStyle.Base = lipgloss.NewStyle().Border(lipgloss.NormalBorder())
|
m.Styles.Focused.Base = lipgloss.NewStyle().Border(lipgloss.NormalBorder())
|
||||||
m.Focus()
|
m.Focus()
|
||||||
|
|
||||||
m.ShowLineNumbers = false
|
m.ShowLineNumbers = false
|
||||||
@@ -1231,7 +1231,7 @@ func TestView(t *testing.T) {
|
|||||||
{
|
{
|
||||||
name: "set width without line numbers with style max width plus one",
|
name: "set width without line numbers with style max width plus one",
|
||||||
modelFunc: func(m Model) Model {
|
modelFunc: func(m Model) Model {
|
||||||
m.FocusedStyle.Base = lipgloss.NewStyle().Border(lipgloss.NormalBorder())
|
m.Styles.Focused.Base = lipgloss.NewStyle().Border(lipgloss.NormalBorder())
|
||||||
m.Focus()
|
m.Focus()
|
||||||
|
|
||||||
m.ShowLineNumbers = false
|
m.ShowLineNumbers = false
|
||||||
|
|||||||
Reference in New Issue
Block a user