-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GUI test for new "sans serif fonts" setting
- Loading branch information
1 parent
973847c
commit 62bfdcb
Showing
2 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Ensures that the font serif change is working as expected. | ||
go-to: "file://" + |DOC_PATH| + "/test_docs/index.html" | ||
|
||
// By default, it should be the serif fonts. | ||
store-value: (serif_font, '"Source Serif 4", NanumBarunGothic, serif') | ||
store-value: (serif_code_font, '"Source Code Pro", monospace') | ||
assert-css: ("body", {"font-family": |serif_font|}) | ||
assert-css: ("p code", {"font-family": |serif_code_font|}) | ||
|
||
// We now switch to the sans serif font | ||
click: "#settings-menu" | ||
wait-for: "#sans-serif-fonts" | ||
click: "#sans-serif-fonts" | ||
|
||
store-value: (font, '"Fira Sans", sans-serif') | ||
store-value: (code_font, '"Fira Mono", monospace') | ||
assert-css: ("body", {"font-family": |font|}) | ||
assert-css: ("p code", {"font-family": |code_font|}) | ||
|
||
// Reloading the page to ensure it is loaded correctly. | ||
reload: | ||
assert-css: ("body", {"font-family": |font|}) | ||
assert-css: ("p code", {"font-family": |code_font|}) | ||
|
||
// We switch back to the serif font | ||
click: "#settings-menu" | ||
wait-for: "#sans-serif-fonts" | ||
click: "#sans-serif-fonts" | ||
|
||
assert-css: ("body", {"font-family": |serif_font|}) | ||
assert-css: ("p code", {"font-family": |serif_code_font|}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters