https://progress.opensuse.org/https://progress.opensuse.org/themes/openSUSE/favicon/favicon.ico?15829177842023-03-03T15:49:19ZopenSUSE Project Management ToolopenQA Project - action #125378: [timeboxed:20h] Proof of concept for supporting creating demo videos with pauses and mouse moving size:Mhttps://progress.opensuse.org/issues/125378?journal_id=6089662023-03-03T15:49:19Ztinitatina.mueller+trick-redmine@suse.com
<ul><li><strong>Parent task</strong> set to <i>#125300</i></li></ul> openQA Project - action #125378: [timeboxed:20h] Proof of concept for supporting creating demo videos with pauses and mouse moving size:Mhttps://progress.opensuse.org/issues/125378?journal_id=6089722023-03-03T15:50:10Ztinitatina.mueller+trick-redmine@suse.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li></ul><p>Since I did that for the Perl Workshop, here is a first suggestion: <a href="https://github.com/os-autoinst/os-autoinst/pull/2274" class="external">https://github.com/os-autoinst/os-autoinst/pull/2274</a></p>
<p>We would need more <code>sleep</code> calls in various occasions I guess, but that can be also done later.</p>
<p>Test and needles:</p>
<ul>
<li><a href="https://github.com/perlpunk/openqa-simple-starter" class="external">https://github.com/perlpunk/openqa-simple-starter</a></li>
<li><a href="https://github.com/perlpunk/openqa-simple-starter-needles" class="external">https://github.com/perlpunk/openqa-simple-starter-needles</a></li>
</ul>
openQA Project - action #125378: [timeboxed:20h] Proof of concept for supporting creating demo videos with pauses and mouse moving size:Mhttps://progress.opensuse.org/issues/125378?journal_id=6116122023-03-10T00:14:28Ztinitatina.mueller+trick-redmine@suse.com
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Feedback</i></li></ul><p>I updated the <a href="https://github.com/perlpunk/openqa-simple-starter" class="external">https://github.com/perlpunk/openqa-simple-starter</a> readme with a link to the example video and a short usage.<br>
I updated the PR <a href="https://github.com/os-autoinst/os-autoinst/pull/2274" class="external">https://github.com/os-autoinst/os-autoinst/pull/2274</a> with the suggestions from Marius.</p>
openQA Project - action #125378: [timeboxed:20h] Proof of concept for supporting creating demo videos with pauses and mouse moving size:Mhttps://progress.opensuse.org/issues/125378?journal_id=6154492023-03-21T09:41:28Zokurzokurz@suse.com
<ul><li><strong>Due date</strong> changed from <i>2023-03-17</i> to <i>2023-03-24</i></li></ul><p>discussed in daily 2023-03-21. We should be able to resolve this ticket this week</p>
openQA Project - action #125378: [timeboxed:20h] Proof of concept for supporting creating demo videos with pauses and mouse moving size:Mhttps://progress.opensuse.org/issues/125378?journal_id=6166462023-03-23T11:08:04Zlivdywanliv.dywan@suse.com
<ul><li><strong>Subject</strong> changed from <i>[timeboxed:20h] Proof of concept for supporting creating demo videos with pauses and mouse moving</i> to <i>[timeboxed:20h] Proof of concept for supporting creating demo videos with pauses and mouse moving size:M</i></li></ul> openQA Project - action #125378: [timeboxed:20h] Proof of concept for supporting creating demo videos with pauses and mouse moving size:Mhttps://progress.opensuse.org/issues/125378?journal_id=6168472023-03-23T22:01:25Ztinitatina.mueller+trick-redmine@suse.com
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li></ul><p>I looked through the testapi functions for what we would have to do for a simple demo mode.<br>
Only a few functions would need to be adjusted IMHO, because I imagine that if a user writes a test that is supposed<br>
to be run in demo mode, then they might want to decide themselves where to put a sleep.</p>
<p>Optionally add a factor for the default demo mode sleep amount.</p>
<a name="Functions-to-be-adjusted"></a>
<h2 >Functions to be adjusted<a href="#Functions-to-be-adjusted" class="wiki-anchor">¶</a></h2>
<a name="type_string"></a>
<h3 >type_string<a href="#type_string" class="wiki-anchor">¶</a></h3>
<p>set a default delay in demo mode</p>
<a name="assert_and_click"></a>
<h3 >assert_and_click<a href="#assert_and_click" class="wiki-anchor">¶</a></h3>
<ul>
<li>sleep 1s by defaut after needle match before clicking</li>
<li>Alternatively let people specify a callback to execute after needle match</li>
</ul>
<p>See also assert_and_dclick</p>
<a name="assert_screen-check_screen"></a>
<h3 >assert_screen, check_screen<a href="#assert_screen-check_screen" class="wiki-anchor">¶</a></h3>
<p>Add a sleep after the needle match by default, but let people configure it because it might not always be wanted here.<br>
Or also add a callback.</p>
<a name="send_key"></a>
<h3 >send_key<a href="#send_key" class="wiki-anchor">¶</a></h3>
<p>I can imagine that it could be useful to show a little popup in case a key or key combination is pressed, for example pressing ctrl-f5 to close some window can be unexpected</p>
<a name="New-functions"></a>
<h2 >New functions<a href="#New-functions" class="wiki-anchor">¶</a></h2>
<p>It might not be a good idea to change all existing functions.</p>
<a name="mouse_move"></a>
<h3 >mouse_move<a href="#mouse_move" class="wiki-anchor">¶</a></h3>
<p>Will move the mouse slowly from the current position (or optionally from the<br>
specified position) to the new position</p>
<a name="mouse_drag_move"></a>
<h3 >mouse_drag_move<a href="#mouse_drag_move" class="wiki-anchor">¶</a></h3>
<p>mouse_drag is simply implemented by setting the mouse to the new position<br>
after clicking. Either add a new option or add a new function that will slowly<br>
move the mouse</p>
<a name="sleep-or-demosleep"></a>
<h3 >sleep or demosleep<a href="#sleep-or-demosleep" class="wiki-anchor">¶</a></h3>
<p>Will sleep <code>$long</code> seconds in demo mode, and if defined, <code>$short</code> seconds in normal mode.</p>
<pre><code>sub demosleep ($long, $short) {
sleep $long && return if get_var('DEMO_MODE');
sleep $short if defined $short;
}
</code></pre>
<ul>
<li>function to get last match coordinates</li>
</ul>
<p>When playing with assert_and_click, I found out that there is no way<br>
for testapi users to get the position of the last needle match (except the<br>
undocumented way of accessing the global package vars).<br>
That would have avoided having to change assert_and_click; I could<br>
have just used assert_screen; (x,y) get_match_position; mouse_move(x,y).</p>