Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tests/cases/widgets/textedit.slint
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ export component TestCase inherits Window {
public function paste() {
edit.paste();
}
public function cut() {
edit.cut();
}
public function select_all() {
edit.select_all();
}
}

/*
Expand Down Expand Up @@ -108,6 +114,11 @@ instance.set_read_only(false);
instance.set_enabled(false);
instance.invoke_paste();
assert_eq!(instance.get_text(), "XxxHello👋");

instance.invoke_select_all();
instance.invoke_cut();
assert_eq!(instance.get_text(), "XxxHello👋");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems wrong, doesn't it? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why ? it's enable == false
=> we can't cut no ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually questionable. Should the function to programmatically do things work when the widget is disabled? I would think it makes sense to make it work as "disabled" means the user can't interact with it, but programmatically it could still be possible

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we have the same problem with paste() method no ?


```

*/
Loading