Changeset View
Changeset View
Standalone View
Standalone View
neon/lib/basetest_neon.pm
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Line(s) | 68 | sub maybe_login { | |||
---|---|---|---|---|---|
69 | # Short wait, we should be close to sddm if we this gets called. | 69 | # Short wait, we should be close to sddm if we this gets called. | ||
70 | if (check_screen 'sddm', 16) { | 70 | if (check_screen 'sddm', 16) { | ||
71 | type_password $testapi::password; | 71 | type_password $testapi::password; | ||
72 | send_key 'ret'; | 72 | send_key 'ret'; | ||
73 | wait_still_screen; | 73 | wait_still_screen; | ||
74 | } | 74 | } | ||
75 | } | 75 | } | ||
76 | 76 | | |||
77 | sub logout { | ||||
78 | testapi::x11_start_program('Logout'); | ||||
79 | assert_and_click ('ksmserver-logout'); | ||||
80 | } | ||||
sitter: I am wondering if we can't drop this. wait_still_screen is essentially a sleep nowadays and… | |||||
81 | | ||||
77 | sub boot_to_dm { | 82 | sub boot_to_dm { | ||
78 | my ($self, %args) = @_; | 83 | my ($self, %args) = @_; | ||
79 | $args{run_setup} //= 1; | 84 | $args{run_setup} //= 1; | ||
80 | 85 | | |||
81 | # Grub in user edition is broken as of Jan 2018 and doesn't match our needle | 86 | # Grub in user edition is broken as of Jan 2018 and doesn't match our needle | ||
82 | # because it is shittyly themed. As we do not entirely care about this in | 87 | # because it is shittyly themed. As we do not entirely care about this in | ||
New idea, the idea is from folder-desktop, you can start krunner and type "Logout" and press enter, avoiding alll of the new needle kicker-logout, making this much more compact. You can as well use testapi::x11_start_program('Logout') to trigger the Logout dialog and then assert_and_click ksmserver-logout bshah: New idea, the idea is from folder-desktop, you can start krunner and type "Logout" and press… | |||||
83 | # application tests we'll simply ignore it by checking for either grub or | 88 | # application tests we'll simply ignore it by checking for either grub or | ||
84 | # sddm. Due to auto time out we'll eventually end up at sddm even if | 89 | # sddm. Due to auto time out we'll eventually end up at sddm even if | ||
85 | # we do not explicitly hit 'ret'. | 90 | # we do not explicitly hit 'ret'. | ||
86 | assert_screen [qw(grub sddm)], 60 * 3; | 91 | assert_screen [qw(grub sddm)], 60 * 3; | ||
87 | if (match_has_tag('grub')) { | 92 | if (match_has_tag('grub')) { | ||
88 | send_key 'ret'; | 93 | send_key 'ret'; | ||
89 | assert_screen 'sddm', 60 * 2; | 94 | assert_screen 'sddm', 60 * 2; | ||
90 | } | 95 | } | ||
▲ Show 20 Lines • Show All 98 Lines • Show Last 20 Lines |
I am wondering if we can't drop this. wait_still_screen is essentially a sleep nowadays and only used in legacy code more or less, as such it mostly has no useful application.
for this specifically, the only needle the caller can feasibly assert after a logout is sddm, and in between logout and sddm there are no "confusing" screen states that could match sddm, so the wait only delays the test while an assert_screen 'sddm' would do the same albeit more dynamically.
So... I would kill that line entirely.