mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:37:35 +00:00
headless-browser: Add ref tests support
The ref tests runner takes screenshots of both the input page and the expected page, then compares them. Ref testing allows us to catch painting bugs, which cannot be detected with the layout and text tests we already have. With ref tests, we'll likely want to reuse the same expectation page for multiple inputs. Therefore, there's a `manifest.json` file that describes the relationship between inputs and expected outputs.
This commit is contained in:
parent
582784d0cf
commit
0d66a80a0f
4 changed files with 112 additions and 25 deletions
3
Tests/LibWeb/Ref/manifest.json
Normal file
3
Tests/LibWeb/Ref/manifest.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"square-flex.html": "square-ref.html"
|
||||
}
|
11
Tests/LibWeb/Ref/square-flex.html
Normal file
11
Tests/LibWeb/Ref/square-flex.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<style>
|
||||
.box {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.item {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: pink;
|
||||
}
|
||||
</style><div class="box"><div class="item">
|
7
Tests/LibWeb/Ref/square-ref.html
Normal file
7
Tests/LibWeb/Ref/square-ref.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<style>
|
||||
.box {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: pink;
|
||||
}
|
||||
</style><div class="box"></div>
|
Loading…
Add table
Add a link
Reference in a new issue