Skip to content

Commit 88f4425

Browse files
Update GUI test
1 parent ae66380 commit 88f4425

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
// If we have a long `<code>`, we need to ensure that it'll be fully displayed on mobile, meaning
22
// that it'll be on two lines.
3+
34
emulate: "iPhone 8" // it has the following size: (375, 667)
45
go-to: "file://" + |DOC_PATH| + "/test_docs/long_code_block/index.html"
5-
// We now check that the block is on two lines:
66
show-text: true // We need to enable text draw to be able to have the "real" size
7+
8+
// We now check that the block is on two lines:
79
// Little explanations for this test: if the text wasn't displayed on two lines, it would take
8-
// around 20px (which is the font size).
9-
assert-property: (".docblock p > code", {"offsetHeight": "44"})
10+
// around 24px (which is the font size).
11+
assert-size: (".docblock p > code", {"height": 48})
1012

1113
// Same check, but where the long code block is also a link
1214
go-to: "file://" + |DOC_PATH| + "/test_docs/long_code_block_link/index.html"
13-
assert-property: (".docblock p > a > code", {"offsetHeight": "44"})
15+
assert-size: (".docblock p > a > code", {"height": 48})

0 commit comments

Comments
 (0)