|
| 1 | +// Ensures that the font serif change is working as expected. |
| 2 | +go-to: "file://" + |DOC_PATH| + "/test_docs/index.html" |
| 3 | + |
| 4 | +// By default, it should be the serif fonts. |
| 5 | +store-value: (serif_font, '"Source Serif 4", NanumBarunGothic, serif') |
| 6 | +store-value: (serif_code_font, '"Source Code Pro", monospace') |
| 7 | +assert-css: ("body", {"font-family": |serif_font|}) |
| 8 | +assert-css: ("p code", {"font-family": |serif_code_font|}) |
| 9 | + |
| 10 | +// We now switch to the sans serif font |
| 11 | +click: "#settings-menu" |
| 12 | +wait-for: "#sans-serif-fonts" |
| 13 | +click: "#sans-serif-fonts" |
| 14 | + |
| 15 | +store-value: (font, '"Fira Sans", sans-serif') |
| 16 | +store-value: (code_font, '"Fira Mono", monospace') |
| 17 | +assert-css: ("body", {"font-family": |font|}) |
| 18 | +assert-css: ("p code", {"font-family": |code_font|}) |
| 19 | + |
| 20 | +// Reloading the page to ensure it is loaded correctly. |
| 21 | +reload: |
| 22 | +assert-css: ("body", {"font-family": |font|}) |
| 23 | +assert-css: ("p code", {"font-family": |code_font|}) |
| 24 | + |
| 25 | +// We switch back to the serif font |
| 26 | +click: "#settings-menu" |
| 27 | +wait-for: "#sans-serif-fonts" |
| 28 | +click: "#sans-serif-fonts" |
| 29 | + |
| 30 | +assert-css: ("body", {"font-family": |serif_font|}) |
| 31 | +assert-css: ("p code", {"font-family": |serif_code_font|}) |
0 commit comments