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

Add formspec rendering automated testing #8615

Closed
wants to merge 4 commits into from

Conversation

rubenwardy
Copy link
Member

@rubenwardy rubenwardy commented Jun 20, 2019

This implements unit testing of formspec rendering by using the mainmenu to render formspecs. It adds core.take_screenshot and core.on_step to the main menu API. The former is used to create images of the GUI, and the latter is used to interact with the render step.

The aim of this PR is to make PRs like #8524 and #7970 less risky.

To do

  • Compare output results
  • Integrate with CI
  • Nice side-by-side output on failure

How to test

Todo

@rubenwardy rubenwardy added @ Client / Audiovisuals WIP The PR is still being worked on by its author and not ready yet. Feature ✨ PRs that add or enhance a feature Formspec labels Jun 20, 2019
@Desour
Copy link
Member

Desour commented Jun 20, 2019

on_step should rather be something like register_on_render_step. core.run_callbacks can be used for this if you dofile or require core.get_builtin_path()..".."..DIR_DELIM..".."..DIR_DELIM.."builtin"..DIR_DELIM.."common"..DIR_DELIM.."game"..DIR_DELIM.."register.lua",

util/fstest/init.lua Outdated Show resolved Hide resolved
util/fstest/init.lua Outdated Show resolved Hide resolved
rubenwardy and others added 2 commits June 20, 2019 23:57
Co-Authored-By: DS <vorunbekannt75@web.de>
Co-Authored-By: DS <vorunbekannt75@web.de>
@rubenwardy
Copy link
Member Author

I think I opened this too early, so closing for now

@rubenwardy rubenwardy closed this Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Client / Audiovisuals Feature ✨ PRs that add or enhance a feature Formspec WIP The PR is still being worked on by its author and not ready yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants