Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web UI for editing needles is tricky to use and allows creating invalid needles #4815

Open
ssssam opened this issue Sep 23, 2022 · 2 comments

Comments

@ssssam
Copy link
Contributor

ssssam commented Sep 23, 2022

I used the web UI to update a needle for a failed test. The failed test was:

https://openqa.gnome.org/tests/168#step/gnome_welcome/12

The screenshot needed updating and the green match area expanding as the window on display now fills the screen.

Using drag and drop to expand the green area to the edges is tricky, because the drag ends when the cursor crosses the edge of the screenshot. And when the cursor passes back onto the screenshot, it is still dragging the area edge even though now the mouse button is released.

Additionally, somehow invalid JSON was created and committed:

The new gnome_firstboot_password_2-20220923.json needle fails to match with an error:

[2022-09-23T16:38:13.717793Z] [debug] no match: -0.1s, best candidate: gnome_firstboot_password_2-20220923 (0.29)

The fix is to reduce the height of the invalid area, but ideally the web UI would guard against committing broken needles like that.

Another nice to have would be a way to edit the JSON file from the web UI directly, so that dragging the green areas isn't the only way to change them.

@ssssam ssssam changed the title Web UI for editing needles allows creating invalid needles Web UI for editing needles is tricky to use and allows creating invalid needles Sep 23, 2022
@Martchus
Copy link
Contributor

Using drag and drop to expand the green area to the edges is tricky, because the drag ends when the cursor crosses the edge of the screenshot.

That's true. If one moves the mouse too fast out of the screenshot than the area doesn't "catch up" and is therefore not extended to the very edge of the screenshot. When moving the mouse slowly that's not a problem but releasing the drag becomes tricky because one needs still take care to keep the mouse inside the screenshot area.

The easiest workaround is to move the area to the edges first and then extend the other sides. Of course that doesn't work if the area should tangent opposing edges.

I could also reproduce the invalid needles but only in Chromium and not in Firefox. In Chromium one can indeed get 769 for ypos + height (and 768 should be the maximum). I suppose the code should explicitly ensure that needles are within the boundaries of the screenshot.

Another nice to have would be a way to edit the JSON file from the web UI directly, so that dragging the green areas isn't the only way to change them.

That's true. Currently it isn't even possible to C&P from the "Review JSON" button so this needs improvement anyways in my opinion.

@stale
Copy link

stale bot commented Jan 5, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants