Refactor: EditableTextView.Changed() and the Canceled spelling
EditableTextView.Changed is a method like every other result's. AlertDialogResult, PopconfirmResult and DateTimeResult spell Canceled the American way, matching EditableTextView and LoadingOverlayResult. Callers, Gallery and docs updated.
This commit is contained in:
22 files changed
+306
-72
No files matched your search
+3
-3
@@ -44,7 +44,7 @@ func TestEditableTextBlurConfirms(t *testing.T) {
|
||||
changed := 0
|
||||
tt := ui.NewTester(func(c *ui.Context) {
|
||||
Use(c, Settings{})
|
||||
if EditableText(c, &name, EditableTextOptions{}).Changed {
|
||||
if EditableText(c, &name, EditableTextOptions{}).Changed() {
|
||||
changed++
|
||||
}
|
||||
Button(c, "Other", ButtonOptions{})
|
||||
@@ -107,7 +107,7 @@ func TestEditableTextConfirm(t *testing.T) {
|
||||
changed := 0
|
||||
tt := ui.NewTester(func(c *ui.Context) {
|
||||
Use(c, Settings{})
|
||||
if EditableText(c, &name, EditableTextOptions{Label: "File name"}).Changed {
|
||||
if EditableText(c, &name, EditableTextOptions{Label: "File name"}).Changed() {
|
||||
changed++
|
||||
}
|
||||
}, 300, 120)
|
||||
@@ -133,7 +133,7 @@ func TestEditableTextCancel(t *testing.T) {
|
||||
tt := ui.NewTester(func(c *ui.Context) {
|
||||
Use(c, Settings{})
|
||||
v := EditableText(c, &name, EditableTextOptions{})
|
||||
if v.Changed {
|
||||
if v.Changed() {
|
||||
changed++
|
||||
}
|
||||
if v.Canceled {
|
||||
|
||||
Reference in new issue
Block a user